-
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.
Rollup merge of #120472 - Nilstrieb:die, r=compiler-errors
Make duplicate lang items fatal Prevents terminal spam.
- Loading branch information
Showing
5 changed files
with
26 additions
and
64 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,10 @@ | ||
// normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib" | ||
#![feature(lang_items)] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
//~^ ERROR: duplicate lang item | ||
|
||
#[lang = "tuple_trait"] | ||
pub trait Tuple {} | ||
// no error |
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,13 @@ | ||
error[E0152]: found duplicate lang item `sized` | ||
--> $DIR/duplicate.rs:5:1 | ||
| | ||
LL | trait Sized {} | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
= note: the lang item is first defined in crate `core` (which `std` depends on) | ||
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib | ||
= note: second definition in the local crate (`duplicate`) | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0152`. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.