diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-10-29 03:11:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 03:11:41 -0700 |
| commit | b8f08fe023f9d18b5047cbc6a9607c8c90c5ac04 (patch) | |
| tree | ef24f9918826e2c53946425028195333112e8537 /compiler/rustc_codegen_llvm/src | |
| parent | e97286e7389794e2bfc45a3c3702aa932b725d99 (diff) | |
| parent | 6ab87f82384d0265b486ba2aa41dcf942bd42c4f (diff) | |
| download | rust-b8f08fe023f9d18b5047cbc6a9607c8c90c5ac04.tar.gz rust-b8f08fe023f9d18b5047cbc6a9607c8c90c5ac04.zip | |
Rollup merge of #132194 - compiler-errors:rpitit-super-wc, r=spastorino
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
