rust/tests/ui/panic-handler/panic-handler-requires-panic-info.rs
David Wood 322cc31504
tests: {Meta,Pointee}Sized in non-minicore tests
As before, add `MetaSized` and `PointeeSized` traits to all of the
non-minicore `no_core` tests so that they don't fail for lack of
language items.
2025-06-16 23:04:33 +00:00

22 lines
359 B
Rust

//@ compile-flags:-C panic=abort
#![feature(lang_items)]
#![feature(no_core)]
#![no_core]
#![no_main]
#[panic_handler]
fn panic() -> ! {
//~^ ERROR requires `panic_info` lang_item
loop {}
}
#[lang = "pointee_sized"]
pub trait PointeeSized {}
#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}
#[lang = "sized"]
trait Sized: MetaSized {}