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.
Rollup merge of rust-lang#138173 - compiler-errors:incoherent-negativ…
…e-impl, r=oli-obk Delay bug for negative auto trait rather than ICEing Fixes rust-lang#138149 r? oli-obk
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
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 @@ | ||
auto trait MyTrait {} | ||
//~^ ERROR auto traits are experimental and possibly buggy | ||
|
||
impl<T> !MyTrait for *mut T {} | ||
//~^ ERROR negative trait bounds are not fully implemented | ||
|
||
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,23 @@ | ||
error[E0658]: auto traits are experimental and possibly buggy | ||
--> $DIR/ungated-impl.rs:1:1 | ||
| | ||
LL | auto trait MyTrait {} | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information | ||
= help: add `#![feature(auto_traits)]` to the crate attributes to enable | ||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
|
||
error[E0658]: negative trait bounds are not fully implemented; use marker types for now | ||
--> $DIR/ungated-impl.rs:4:9 | ||
| | ||
LL | impl<T> !MyTrait for *mut T {} | ||
| ^^^^^^^^ | ||
| | ||
= note: see issue #68318 <https://github.com/rust-lang/rust/issues/68318> for more information | ||
= help: add `#![feature(negative_impls)]` to the crate attributes to enable | ||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |