Skip to content

Commit

Permalink
Rollup merge of rust-lang#102338 - compiler-errors:assoc-ty-binding-i…
Browse files Browse the repository at this point in the history
…n-assoc-ty-binding, r=cjgillot

Deny associated type bindings within associated type bindings

Fixes rust-lang#102335

This was made worse by rust-lang#100865, which unified the way we generate substs for GATs and non-generic associated types. However, the issue was not _caused_ by rust-lang#100865, evidenced by the test I added for GATs:

```rust
trait T {
    type A: S<C<(), i32 = ()> = ()>;
    //~^ ERROR associated type bindings are not allowed here
}

trait Q {}

trait S {
    type C<T>: Q;
}

fn main() {}
```

^ which passes on beta (where GATs are stable) and presumably ever since GATs support was added to `create_substs_for_associated_item` in astconv.
  • Loading branch information
JohnTitor authored Sep 28, 2022
2 parents 7d8d8f3 + 6784b45 commit b9c8fb0
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit b9c8fb0

Please sign in to comment.