File tree 3 files changed +23
-21
lines changed
3 files changed +23
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ //! Validates the correct printing of E0152 in the case of duplicate "lang_item" function
2
+ //! definitions.
3
+ //!
4
+ //! Issue: <https://github.com/rust-lang/rust/issues/31788>
5
+
6
+ //@ error-pattern: first defined in crate `std`
7
+ //@ normalize-stderr: "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib"
8
+ #![ feature( lang_items) ]
9
+
10
+ extern crate core;
11
+
12
+ use core:: panic:: PanicInfo ;
13
+
14
+ #[ lang = "panic_impl" ]
15
+ fn panic_impl ( info : & PanicInfo ) -> ! {
16
+ //~^ ERROR: found duplicate lang item `panic_impl`
17
+ loop { }
18
+ }
19
+
20
+ fn main ( ) { }
Original file line number Diff line number Diff line change 1
1
error[E0152]: found duplicate lang item `panic_impl`
2
- --> $DIR/duplicate_entry_error .rs:13 :1
2
+ --> $DIR/E0152-duplicate-lang-items .rs:15 :1
3
3
|
4
4
LL | / fn panic_impl(info: &PanicInfo) -> ! {
5
5
LL | |
6
6
LL | | loop {}
7
7
LL | | }
8
8
| |_^
9
9
|
10
- = note: the lang item is first defined in crate `std` (which `duplicate_entry_error ` depends on)
10
+ = note: the lang item is first defined in crate `std` (which `E0152_duplicate_lang_items ` depends on)
11
11
= note: first definition in `std` loaded from SYSROOT/libstd-*.rlib
12
- = note: second definition in the local crate (`duplicate_entry_error `)
12
+ = note: second definition in the local crate (`E0152_duplicate_lang_items `)
13
13
14
14
error: aborting due to 1 previous error
15
15
You can’t perform that action at this time.
0 commit comments