mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
b8f08fe023
Collect item bounds for RPITITs from trait where clauses just like associated types We collect item bounds from trait where clauses for *associated types*, i.e. this: ```rust trait Foo where Self::Assoc: Send { type Assoc; } ``` Becomes this: ```rust trait Foo { type Assoc: Send; } ``` Today, with RPITITs/AFIT and return-type notation, we don't do that, i.e.: ```rust trait Foo where Self::method(..): Send { fn method() -> impl Sized; } fn is_send(_: impl Send) {} fn test<T: Foo>() { is_send(T::method()); } ``` ...which fails on nightly today. Turns out it's super easy to fix this, and we just need to use the `associated_type_bounds` lowering function in `explicit_item_bounds_with_filter`, which has that logic baked in. |
||
---|---|---|
.. | ||
assembly | ||
auxiliary | ||
codegen | ||
codegen-units | ||
coverage | ||
coverage-run-rustdoc | ||
crashes | ||
debuginfo | ||
incremental | ||
mir-opt | ||
pretty | ||
run-make | ||
rustdoc | ||
rustdoc-gui | ||
rustdoc-js | ||
rustdoc-js-std | ||
rustdoc-json | ||
rustdoc-ui | ||
ui | ||
ui-fulldeps | ||
COMPILER_TESTS.md |