2024-02-16 14:02:50 -06:00
|
|
|
//@ edition:2021
|
2021-10-07 05:45:01 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
debug_assert!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
assert!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
panic!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
|
|
|
|
std::debug_assert!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
std::assert!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
std::panic!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
|
|
|
|
core::debug_assert!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
core::assert!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
core::panic!(false, 123);
|
|
|
|
//~^ ERROR must be a string literal
|
|
|
|
}
|