File tree 6 files changed +34
-3
lines changed
6 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 3
3
trait T {
4
4
type A : S < C < X = 0i32 > = 34 > ;
5
5
//~^ ERROR associated type bindings are not allowed here
6
+ //~| ERROR associated type bindings are not allowed here
6
7
}
7
8
8
9
trait S {
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ error[E0229]: associated type bindings are not allowed here
4
4
LL | type A: S<C<X = 0i32> = 34>;
5
5
| ^^^^^^^^ associated type not allowed here
6
6
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
8
16
9
17
For more information about this error, try `rustc --explain E0229`.
Original file line number Diff line number Diff line change 6
6
trait T {
7
7
type A : S < C < X = 0i32 > = 34 > ;
8
8
//~^ ERROR associated type bindings are not allowed here
9
+ //~| ERROR associated type bindings are not allowed here
9
10
}
10
11
11
12
trait S {
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ error[E0229]: associated type bindings are not allowed here
4
4
LL | type A: S<C<X = 0i32> = 34>;
5
5
| ^^^^^^^^ associated type not allowed here
6
6
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
8
16
9
17
For 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 {
6
6
7
7
pub type Foo < V > = impl Trait < V :: Assoc > ;
8
8
//~^ ERROR
9
+ //~| ERROR
9
10
10
11
pub trait Trait < U > { }
11
12
Original file line number Diff line number Diff line change @@ -9,6 +9,18 @@ help: consider restricting type parameter `V`
9
9
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
10
10
| ++++++++++++++++
11
11
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
13
25
14
26
For more information about this error, try `rustc --explain E0220`.
You can’t perform that action at this time.
0 commit comments