We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a360ecd commit 1f89e90Copy full SHA for 1f89e90
tests/ui/lang-items/duplicate.rs
@@ -0,0 +1,10 @@
1
+// normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib"
2
+#![feature(lang_items)]
3
+
4
+#[lang = "sized"]
5
+trait Sized {}
6
+//~^ ERROR: duplicate lang item
7
8
+#[lang = "tuple_trait"]
9
+pub trait Tuple {}
10
+// no error
tests/ui/lang-items/duplicate.stderr
@@ -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`)
11
+error: aborting due to 1 previous error
12
13
+For more information about this error, try `rustc --explain E0152`.
0 commit comments