rust/tests/ui/error-codes/E0152-duplicate-lang-items.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
562 B
Rust
Raw Normal View History

2025-03-13 17:30:30 -06:00
//! Validates the correct printing of E0152 in the case of duplicate "lang_item" function
//! definitions.
//!
//! Issue: <https://github.com/rust-lang/rust/issues/31788>
//@ normalize-stderr: "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib"
//@ dont-require-annotations: NOTE
2025-03-13 17:30:30 -06:00
#![feature(lang_items)]
extern crate core;
use core::panic::PanicInfo;
#[lang = "panic_impl"]
fn panic_impl(info: &PanicInfo) -> ! {
//~^ ERROR: found duplicate lang item `panic_impl`
//~| NOTE first defined in crate `std`
2025-03-13 17:30:30 -06:00
loop {}
}
fn main() {}