diff --git a/src/behavior-considered-undefined.md b/src/behavior-considered-undefined.md index 068fd6ab0e..cd85a03255 100644 --- a/src/behavior-considered-undefined.md +++ b/src/behavior-considered-undefined.md @@ -16,7 +16,7 @@ called *sound*; if `unsafe` code can be misused by safe code to exhibit undefined behavior, it is *unsound*. > [!WARNING] -> The following list is not exhaustive; it may grow or shrink. There is no formal model of Rust's semantics for what is and is not allowed in unsafe code, so there may be more behavior considered unsafe. We also reserve the right to make some of the behavior in that list defined in the future. In other words, this list does not say that anything will *definitely* always be undefined in all future Rust version (but we might make such commitments for some list items in the future). +> The following list is not exhaustive; it may grow or shrink. There is no formal model of Rust's semantics for what is and is not allowed in unsafe code, so there may be more behavior considered unsafe. We also reserve the right to make some of the behavior in that list defined in the future. In other words, this list does not say that anything will *definitely* always be undefined in all future Rust versions (but we might make such commitments for some list items in the future). > > Please read the [Rustonomicon] before writing unsafe code. diff --git a/src/items/functions.md b/src/items/functions.md index cf3d114886..1586adc33c 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -122,7 +122,7 @@ r[items.fn.generics.param-names] Inside the function signature and body, the name of the type parameter can be used as a type name. r[items.fn.generics.param-bounds] -[Trait] bounds can be specified for type parameters to allow methods with that trait to be called on values of that type. This is specified using the `where` syntax: +[Trait] bounds can be specified for type parameters to allow methods from that trait to be called on values of that type. This is specified using the `where` syntax: ```rust # use std::fmt::Debug; diff --git a/src/patterns.md b/src/patterns.md index f30d9d73d0..845f22c3db 100644 --- a/src/patterns.md +++ b/src/patterns.md @@ -365,10 +365,10 @@ r[patterns.wildcard.intro] The _wildcard pattern_ (an underscore symbol) matches any value. It is used to ignore values when they don't matter. r[patterns.wildcard.struct-matcher] -Inside other patterns it matches a single data field (as opposed to the `..` which matches the remaining fields). +Inside other patterns, it matches a single data field (as opposed to the `..`, which matches the remaining fields). r[patterns.wildcard.no-binding] -Unlike identifier patterns, it does not copy, move or borrow the value it matches. +Unlike identifier patterns, it does not copy, move, or borrow the value it matches. Examples: diff --git a/src/types/closure.md b/src/types/closure.md index ecc8c726ef..578e29faf9 100644 --- a/src/types/closure.md +++ b/src/types/closure.md @@ -145,7 +145,7 @@ let mut u = (t, String::from("U")); let c = || { println!("{:?}", u); // u captured by ImmBorrow - u.1.truncate(0); // u.0 captured by MutBorrow + u.1.truncate(0); // u.1 captured by MutBorrow move_value(u.0.0); // u.0.0 captured by ByValue }; c();