reference icon indicating copy to clipboard operation
reference copied to clipboard

The Rust Reference

Results 338 reference issues
Sort by recently updated
recently updated
newest added

Continuation of #639. This should only be merged after the feature is stabilized.

S-waiting-on-author

[This sentence says:](https://github.com/rust-lang/reference/blame/c97d14fa6fed0baa9255432b8a93cb70614f80e3/src/items/use-declarations.md#L58-L59) > Like items, `use` declarations are private to the containing module, by default. However, I think this should say: > Like items, `use` declarations are private to...

https://doc.rust-lang.org/reference/items/implementations.html#generic-implementations > Generic parameters _constrain_ an implementation if the parameter appears at least once in one of: > - ... > - As an [associated type](https://doc.rust-lang.org/reference/items/associated-items.html#associated-types) in the [bounds](https://doc.rust-lang.org/reference/trait-bounds.html) of...

https://doc.rust-lang.org/stable/reference/expressions/match-expr.html says: > A match behaves differently depending on whether or not the scrutinee expression is a [place expression or value expression](https://doc.rust-lang.org/stable/reference/expressions.html#place-expressions-and-value-expressions). And a little lower, > When the scrutinee...

Language Cleanup

The `Attributes on block expressions` section specifies when _inner_ attributes are allowed in blocks, it's unclear whether that applies to _outer_ attributes too? Even more confusing is that the example...

A-attributes

[This recently posted article](https://lucumr.pocoo.org/2022/1/30/unsafe-rust/) makes that point that, because the [default representation](https://doc.rust-lang.org/stable/reference/type-layout.html#the-default-representation) makes no guarantees of data layout, one must use `write_unaligned` to write to the fields of a struct...

A-type-layout

This clarifies where exactly `impl Trait` can be used. This also includes changes from https://github.com/rust-lang/rust/pull/93082.

The current documentation for `#[inline]` places huge emphasis on its effect as an inlining hint. I was recently referred to the reference when I tried to inform another user that...

The syntax is documented in the reference: https://doc.rust-lang.org/stable/reference/patterns.html#identifier-pattern, but afaict not the meaning. **Impact** Experienced users can still get tripped up by things like: https://stackoverflow.com/questions/69845063/why-does-a-level-of-indirection-allow-omitting-mut (I'm a Rust n00b, but...

A-patterns

The documentation was a bit unclear, and after reading it, it was unclear to me what a concrete example of the behaviour described by the following sentence was: > This...