diff options
Diffstat (limited to 'src/test/ui/rfc-2091-track-caller/error-with-main.rs')
-rw-r--r-- | src/test/ui/rfc-2091-track-caller/error-with-main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2091-track-caller/error-with-main.rs b/src/test/ui/rfc-2091-track-caller/error-with-main.rs new file mode 100644 index 000000000..b2ea31bb5 --- /dev/null +++ b/src/test/ui/rfc-2091-track-caller/error-with-main.rs @@ -0,0 +1,4 @@ +#[track_caller] //~ ERROR `main` function is not allowed to be +fn main() { + panic!("{}: oh no", std::panic::Location::caller()); +} |