reference
reference copied to clipboard
The Rust Reference
This adds the chapter on scopes. I tried to make this accurate and complete, but it is probably neither. There are some things that are intentionally not covered, such as...
https://doc.rust-lang.org/reference/types/closure.html#other-traits > A closure is Send if all variables captured by non-unique immutable reference are Sync, and all values captured by unique immutable or mutable reference, copy, or move are...
It seems people are interpreting this line in the [Modules](https://doc.rust-lang.org/reference/items/modules.html) page of the reference... > It is encouraged to use the new naming convention as it is more consistent, and...
According to rust-lang/rust#28442 , visibility modifier for variant will lead to compilation error. Consider removing the section or adding some notes about that.
In #1037 a question came up about the exact wording around the introduction of the [destructors chapter](https://github.com/rust-lang/reference/blob/0fe357f176673b4bb9a093504a8ae1dcaf4c6f8f/src/destructors.md) which says > When an initialized variable or temporary goes out of scope...
Migrated from https://github.com/rust-lang/rust/issues/38011 ------------------------------------- Default type parameters (e g `struct Foo(A)`) is a language feature, but they are not mentioned in the [language reference](https://doc.rust-lang.org/reference.html#type-parameters). It would be nice if such...
This was originally discussed with a full formal proof in https://github.com/rust-lang/rust/blob/5187be620c76a313a19b9b596e1bce3a80a345dd/src/grammar/raw-string-literal-ambiguity.md but that file was removed as part of the "legacy" grammar of Rust. Over the years the file has...
With const generic defaults stabilized (#90207), the reference should talk more about what the restrictions are. * What are valid expressions for the default? I assume it has to be...
### tl;dr: Rust documentation is unclear on reborrowing, should explain details in the Reference As it stands, there is only one mention of "reborrowing" in the Reference, [in this section...
This PR updates the closure types page so it includes up to date information on the new behavior introduced by RFC2229/Edition 2021 cc: @arora-aman r? @nikomatsakis Closes #1066