forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand where negative supertrait specific error is shown
Fix rust-lang#58857.
- Loading branch information
1 parent
ad293f1
commit 363024d
Showing
3 changed files
with
43 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
struct Conj<A> {a : A} | ||
trait Valid {} | ||
|
||
impl<A: !Valid> Conj<A>{} | ||
//~^ ERROR negative trait bounds are not supported | ||
|
||
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: negative trait bounds are not supported | ||
--> $DIR/issue-58857.rs:4:7 | ||
| | ||
LL | impl<A: !Valid> Conj<A>{} | ||
| ^^^^^^^^ help: remove the trait bound | ||
|
||
error: aborting due to previous error | ||
|