]> git.lizzy.rs Git - rust.git/blob - tests/ui/panics/panic-2021.rs
Rollup merge of #106618 - jmillikin:os-net-rustdoc-wasm32, r=JohnTitor
[rust.git] / tests / ui / panics / panic-2021.rs
1 // edition:2021
2
3 fn main() {
4     panic!(123); //~ ERROR: format argument must be a string literal
5     panic!("{}"); //~ ERROR: 1 positional argument in format string
6     core::panic!("{}"); //~ ERROR: 1 positional argument in format string
7     assert!(false, 123); //~ ERROR: format argument must be a string literal
8     assert!(false, "{}"); //~ ERROR: 1 positional argument in format string
9 }