File tree Expand file tree Collapse file tree 6 files changed +34
-3
lines changed Expand file tree Collapse file tree 6 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 33trait T {
44 type A : S < C < X = 0i32 > = 34 > ;
55 //~^ ERROR associated type bindings are not allowed here
6+ //~| ERROR associated type bindings are not allowed here
67}
78
89trait S {
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ error[E0229]: associated type bindings are not allowed here
44LL | type A: S<C<X = 0i32> = 34>;
55 | ^^^^^^^^ associated type not allowed here
66
7- error: aborting due to 1 previous error
7+ error[E0229]: associated type bindings are not allowed here
8+ --> $DIR/invalid_associated_const.rs:4:17
9+ |
10+ LL | type A: S<C<X = 0i32> = 34>;
11+ | ^^^^^^^^ associated type not allowed here
12+ |
13+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
14+
15+ error: aborting due to 2 previous errors
816
917For more information about this error, try `rustc --explain E0229`.
Original file line number Diff line number Diff line change 66trait T {
77 type A : S < C < X = 0i32 > = 34 > ;
88 //~^ ERROR associated type bindings are not allowed here
9+ //~| ERROR associated type bindings are not allowed here
910}
1011
1112trait S {
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ error[E0229]: associated type bindings are not allowed here
44LL | type A: S<C<X = 0i32> = 34>;
55 | ^^^^^^^^ associated type not allowed here
66
7- error: aborting due to 1 previous error
7+ error[E0229]: associated type bindings are not allowed here
8+ --> $DIR/issue-102467.rs:7:17
9+ |
10+ LL | type A: S<C<X = 0i32> = 34>;
11+ | ^^^^^^^^ associated type not allowed here
12+ |
13+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
14+
15+ error: aborting due to 2 previous errors
816
917For more information about this error, try `rustc --explain E0229`.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ pub trait TraitWithAssoc {
66
77pub type Foo < V > = impl Trait < V :: Assoc > ;
88//~^ ERROR
9+ //~| ERROR
910
1011pub trait Trait < U > { }
1112
Original file line number Diff line number Diff line change @@ -9,6 +9,18 @@ help: consider restricting type parameter `V`
99LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
1010 | ++++++++++++++++
1111
12- error: aborting due to 1 previous error
12+ error[E0220]: associated type `Assoc` not found for `V`
13+ --> $DIR/issue-96287.rs:7:33
14+ |
15+ LL | pub type Foo<V> = impl Trait<V::Assoc>;
16+ | ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
17+ |
18+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
19+ help: consider restricting type parameter `V`
20+ |
21+ LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
22+ | ++++++++++++++++
23+
24+ error: aborting due to 2 previous errors
1325
1426For more information about this error, try `rustc --explain E0220`.
You can’t perform that action at this time.
0 commit comments