-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better error for binder on associated type bound
- Loading branch information
1 parent
1f7fb64
commit b65265b
Showing
4 changed files
with
56 additions
and
13 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
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
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,11 @@ | ||
#![feature(generic_associated_types)] | ||
|
||
trait Trait { | ||
type Bound<'a>; | ||
} | ||
|
||
fn foo() where Trait<for<'a> Bound<'a> = &'a ()> { | ||
//~^ ERROR `for<...>` is not allowed on associated type bounds | ||
} | ||
|
||
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,8 @@ | ||
error: `for<...>` is not allowed on associated type bounds | ||
--> $DIR/binder-on-bound.rs:7:22 | ||
| | ||
LL | fn foo() where Trait<for<'a> Bound<'a> = &'a ()> { | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|