rust-lang / reference

The Rust Reference
https://doc.rust-lang.org/nightly/reference/
Apache License 2.0
1.25k stars 490 forks source link

trait bounds grammar: make `?` and `for<>` mutually exclusive #1650

Closed lukas-code closed 1 month ago

lukas-code commented 1 month ago

After https://github.com/rust-lang/rust/pull/127054, the T: ?Trait and T: for<...> Trait syntax is mutually exclusive, and this code no longer compiles:

fn foo<T: ?for<> Sized>() {}

Update the reference to reflect that.

before after

r? @compiler-errors