]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/const_panic_stability.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / const_panic_stability.rs
CommitLineData
3c0e092e
XL
1// revisions: e2018 e2021
2//[e2018] edition:2018
3//[e2021] edition:2021
4//[e2018] check-pass
5#![crate_type = "lib"]
6#![stable(feature = "foo", since = "1.0.0")]
7#![feature(staged_api)]
8
9#[stable(feature = "foo", since = "1.0.0")]
10#[rustc_const_stable(feature = "foo", since = "1.0.0")]
11const fn foo() {
12 assert!(false);
13 assert!(false, "foo");
14 panic!({ "foo" });
15 //[e2018]~^ WARNING panic message is not a string literal
16 //[e2021]~^^ ERROR format argument must be a string literal
17}