rust/tests/ui/rfcs/rfc-2091-track-caller/error-with-main.rs

5 lines
134 B
Rust

#[track_caller] //~ ERROR `main` function is not allowed to be
fn main() {
panic!("{}: oh no", std::panic::Location::caller());
}