-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d25a25
commit 79f3fe4
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Regression test for <https://github.com/rust-lang/rust/issues/102467>. | ||
// It ensures that the expected error is displayed. | ||
|
||
#![feature(associated_const_equality)] | ||
|
||
trait T { | ||
type A: S<C<X = 0i32> = 34>; | ||
//~^ ERROR associated type bindings are not allowed here | ||
} | ||
|
||
trait S { | ||
const C: i32; | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0229]: associated type bindings are not allowed here | ||
--> $DIR/issue-102467.rs:7:17 | ||
| | ||
LL | type A: S<C<X = 0i32> = 34>; | ||
| ^^^^^^^^ associated type not allowed here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0229`. |