summaryrefslogtreecommitdiffstats
path: root/src/test/ui/panics/panic-2021.rs
blob: e606612e1086248f13b8988f3242b3b87df9d832 (plain)
1
2
3
4
5
6
7
8
9
// edition:2021

fn main() {
    panic!(123); //~ ERROR: format argument must be a string literal
    panic!("{}"); //~ ERROR: 1 positional argument in format string
    core::panic!("{}"); //~ ERROR: 1 positional argument in format string
    assert!(false, 123); //~ ERROR: format argument must be a string literal
    assert!(false, "{}"); //~ ERROR: 1 positional argument in format string
}