Skip to content

Commit a1d0312

Browse files
committed
updated tr.po after merge
1 parent 63d8e5a commit a1d0312

File tree

1 file changed

+45
-33
lines changed

1 file changed

+45
-33
lines changed

po/tr.po

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7559,7 +7559,6 @@ msgid "\"yikes, something went wrong\""
75597559
msgstr ""
75607560

75617561
#: src/closures/exercise.md src/closures/solution.md
7562-
#: src/unsafe-rust/dereferencing.md
75637562
msgid "\"uhoh\""
75647563
msgstr ""
75657564

@@ -11271,35 +11270,34 @@ msgstr ""
1127111270
msgid "Creating pointers is safe, but dereferencing them requires `unsafe`:"
1127211271
msgstr ""
1127311272

11274-
#: src/unsafe-rust/dereferencing.md
11275-
msgid "\"careful!\""
11276-
msgstr ""
11277-
1127811273
#: src/unsafe-rust/dereferencing.md
1127911274
msgid ""
11280-
"// SAFETY: r1 and r2 were obtained from references and so are guaranteed to\n"
11281-
" // be non-null and properly aligned, the objects underlying the "
11282-
"references\n"
11283-
" // from which they were obtained are live throughout the whole unsafe\n"
11284-
" // block, and they are not accessed either through the references or\n"
11285-
" // concurrently through any other pointers.\n"
11286-
msgstr ""
11287-
11288-
#: src/unsafe-rust/dereferencing.md
11289-
msgid "\"r1 is: {}\""
11275+
"// SAFETY: p1 and p2 were created by taking raw pointers to a local, so "
11276+
"they\n"
11277+
" // are guaranteed to be non-null, aligned, and point into a single "
11278+
"(stack-)\n"
11279+
" // allocated object.\n"
11280+
" //\n"
11281+
" // The object underlying the raw pointers lives for the entire function, "
11282+
"so\n"
11283+
" // it is not deallocated while the raw pointers still exist. It is not\n"
11284+
" // accessed through references while the raw pointers exist, nor is it\n"
11285+
" // accessed from other threads concurrently.\n"
1129011286
msgstr ""
1129111287

1129211288
#: src/unsafe-rust/dereferencing.md
11293-
msgid "\"r2 is: {}\""
11289+
msgid "// Mutation may soundly be observed through a raw pointer, like in C.\n"
1129411290
msgstr ""
1129511291

1129611292
#: src/unsafe-rust/dereferencing.md
1129711293
msgid ""
11298-
"// NOT SAFE. DO NOT DO THIS.\n"
11294+
"// UNSOUND. DO NOT DO THIS.\n"
1129911295
" /*\n"
11300-
" let r3: &String = unsafe { &*r1 };\n"
11301-
" drop(s);\n"
11302-
" println!(\"r3 is: {}\", *r3);\n"
11296+
" let r: &i32 = unsafe { &*p1 };\n"
11297+
" dbg!(r);\n"
11298+
" x = 50;\n"
11299+
" dbg!(r); // Object underlying the reference has been mutated. This is "
11300+
"UB.\n"
1130311301
" */"
1130411302
msgstr ""
1130511303

@@ -11346,9 +11344,12 @@ msgstr ""
1134611344

1134711345
#: src/unsafe-rust/dereferencing.md
1134811346
msgid ""
11349-
"The \"NOT SAFE\" section gives an example of a common kind of UB bug: `*r1` "
11350-
"has the `'static` lifetime, so `r3` has type `&'static String`, and thus "
11351-
"outlives `s`. Creating a reference from a pointer requires _great care_."
11347+
"The \"UNSOUND\" section gives an example of a common kind of UB bug: naïvely "
11348+
"taking a reference to the dereference of a raw pointer sidesteps the "
11349+
"compiler's knowledge of what object the reference is actually pointing to. "
11350+
"As such, the borrow checker does not freeze `x` and so we are able to modify "
11351+
"it despite the existence of a reference to it. Creating a reference from a "
11352+
"pointer requires _great care_."
1135211353
msgstr ""
1135311354

1135411355
#: src/unsafe-rust/mutable-static.md
@@ -11365,8 +11366,15 @@ msgstr ""
1136511366

1136611367
#: src/unsafe-rust/mutable-static.md
1136711368
msgid ""
11368-
"However, since data races can occur, it is unsafe to read and write mutable "
11369-
"static variables:"
11369+
"However, mutable static variables are unsafe to read and write because "
11370+
"multiple threads could do so concurrently without synchronization, "
11371+
"constituting a data race."
11372+
msgstr ""
11373+
11374+
#: src/unsafe-rust/mutable-static.md
11375+
msgid ""
11376+
"Using mutable statics soundly requires reasoning about concurrency without "
11377+
"the compiler's help:"
1137011378
msgstr ""
1137111379

1137211380
#: src/unsafe-rust/mutable-static.md
@@ -11376,17 +11384,16 @@ msgstr ""
1137611384

1137711385
#: src/unsafe-rust/mutable-static.md
1137811386
msgid ""
11379-
"The program here is safe because it is single-threaded. However, the Rust "
11387+
"The program here is sound because it is single-threaded. However, the Rust "
1138011388
"compiler reasons about functions individually so can't assume that. Try "
1138111389
"removing the `unsafe` and see how the compiler explains that it is undefined "
1138211390
"behavior to access a mutable static from multiple threads."
1138311391
msgstr ""
1138411392

1138511393
#: src/unsafe-rust/mutable-static.md
1138611394
msgid ""
11387-
"Rust 2024 edition goes further and makes accessing a mutable static by "
11388-
"reference an error by default. We work around this in the example with "
11389-
"`#[allow(static_mut_refs)]`. Don't do this."
11395+
"The 2024 Rust edition goes further and makes accessing a mutable static by "
11396+
"reference an error by default."
1139011397
msgstr ""
1139111398

1139211399
#: src/unsafe-rust/mutable-static.md
@@ -11439,15 +11446,16 @@ msgid ""
1143911446
msgstr ""
1144011447

1144111448
#: src/unsafe-rust/unsafe-functions.md
11442-
msgid "There are two main categories:"
11449+
msgid "Unsafe functions may come from two places:"
1144311450
msgstr ""
1144411451

1144511452
#: src/unsafe-rust/unsafe-functions.md
11446-
msgid "Rust functions declared unsafe with `unsafe fn`."
11453+
#, fuzzy
11454+
msgid "Rust functions declared unsafe."
1144711455
msgstr "Rust fonksiyonları `unsafe fn` ile emniyetli olmadığı bildirildi."
1144811456

1144911457
#: src/unsafe-rust/unsafe-functions.md
11450-
msgid "Foreign functions in `extern \"C\"` blocks."
11458+
msgid "Unsafe foreign functions in `extern \"C\"` blocks."
1145111459
msgstr ""
1145211460

1145311461
#: src/unsafe-rust/unsafe-functions.md
@@ -11503,7 +11511,11 @@ msgid ""
1150311511
msgstr ""
1150411512

1150511513
#: src/unsafe-rust/unsafe-functions/extern-c.md
11506-
msgid "Functions in a foreign language may also be unsafe:"
11514+
msgid ""
11515+
"You can declare foreign functions for access from Rust with `unsafe extern`. "
11516+
"This is unsafe because the compiler has to way to reason about their "
11517+
"behavior. Functions declared in an `extern` block must be marked as `safe` "
11518+
"or `unsafe`, depending on whether they have preconditions for safe use:"
1150711519
msgstr ""
1150811520

1150911521
#: src/unsafe-rust/unsafe-functions/extern-c.md src/unsafe-rust/exercise.md

0 commit comments

Comments
 (0)