rust/tests/ui/rfcs/rfc-2091-track-caller/error-with-start.rs
Eduardo Sánchez Muñoz 17dfabff9c Change start to #[start] in some diagnosis
They refer to a function with the `start` attribute, but not necessarily named `start`.
2023-09-22 15:58:43 +02:00

8 lines
232 B
Rust

#![feature(start)]
#[start]
#[track_caller] //~ ERROR `#[start]` function is not allowed to be `#[track_caller]`
fn start(_argc: isize, _argv: *const *const u8) -> isize {
panic!("{}: oh no", std::panic::Location::caller());
}