reference
reference copied to clipboard
The Rust Reference
The current page on [`#[non_exhaustive]`](https://github.com/rust-lang/reference/blob/b5c68b02984f74e99d1f1b332029e05f607e2660/src/attributes/type_system.md#the-non_exhaustive-attribute) doesn't really say much about unit structs. I think it could use some clarification. For example, the visibility of the unit struct const is lowered...
In order to fix some of the issues around overly conservative generator captures (rust-lang/rust#69663), I am working on changing the analysis to be based on liveness of values rather than...
As prompted by discussion in rust-lang/rust#52652 The current docs say it will abort, however that behavior was actually reverted in rust-lang/rust#48445 and is not what currently happens in stable.
Tracking issue: rust-lang/rust#42202 @rustbot label +S-waiting-on-stabilization
There are various places in the grammar that restrict expressions with various types of braces. These restrictions also apply recursively into the expressions. This should be captured somehow. Examples: if-expr.md...
https://doc.rust-lang.org/reference/items/unions.html says: > Writes to `Copy` or `ManuallyDrop` union fields do not require reads for running destructors, so these writes don't have to be placed in `unsafe` blocks but later...
After reading the [Method Call Expression](https://doc.rust-lang.org/reference/expressions/method-call-expr.html) section, I am still confused about the method resolution. For example, the following code outputs `in inherent impl` instead of `in trait impl`. But...
cc @pnkfelix https://github.com/rust-lang/rfcs/pull/2294 https://github.com/rust-lang/rust/issues/51114
The changes for https://github.com/rust-lang/rust/pull/85769 need to documented (probably around [here](https://github.com/rust-lang/reference/blob/master/src/const_eval.md)). See https://github.com/rust-lang/rust/pull/85769#issuecomment-854363720 for the stabilization report.
Some undefined behavior found during CTFE is now treated as an error as of https://github.com/rust-lang/rust/pull/86194. I think https://github.com/rust-lang/reference/blob/master/src/const_eval.md should detail which errors are detected, but Ralf indicated in https://github.com/rust-lang/rust/pull/86194#issuecomment-864803029 that...