@@ -51,6 +51,7 @@ pub const fn panic(expr: &'static str) -> ! {
51
51
#[ inline]
52
52
#[ track_caller]
53
53
#[ lang = "panic_str" ] // needed for `non-fmt-panics` lint
54
+ #[ rustc_const_unstable( feature = "core_panic" , issue = "none" ) ]
54
55
pub const fn panic_str ( expr : & str ) -> ! {
55
56
panic_display ( & expr) ;
56
57
}
@@ -59,6 +60,7 @@ pub const fn panic_str(expr: &str) -> ! {
59
60
#[ track_caller]
60
61
#[ lang = "panic_display" ] // needed for const-evaluated panics
61
62
#[ rustc_do_not_const_check] // hooked by const-eval
63
+ #[ rustc_const_unstable( feature = "core_panic" , issue = "none" ) ]
62
64
pub const fn panic_display < T : fmt:: Display > ( x : & T ) -> ! {
63
65
panic_fmt ( format_args ! ( "{}" , * x) ) ;
64
66
}
@@ -89,6 +91,7 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
89
91
#[ track_caller]
90
92
#[ lang = "panic_fmt" ] // needed for const-evaluated panics
91
93
#[ rustc_do_not_const_check] // hooked by const-eval
94
+ #[ rustc_const_unstable( feature = "core_panic" , issue = "none" ) ]
92
95
pub const fn panic_fmt ( fmt : fmt:: Arguments < ' _ > ) -> ! {
93
96
if cfg ! ( feature = "panic_immediate_abort" ) {
94
97
super :: intrinsics:: abort ( )
@@ -109,6 +112,7 @@ pub const fn panic_fmt(fmt: fmt::Arguments<'_>) -> ! {
109
112
110
113
/// This function is used instead of panic_fmt in const eval.
111
114
#[ lang = "const_panic_fmt" ]
115
+ #[ rustc_const_unstable( feature = "core_panic" , issue = "none" ) ]
112
116
pub const fn const_panic_fmt ( fmt : fmt:: Arguments < ' _ > ) -> ! {
113
117
if let Some ( msg) = fmt. as_str ( ) {
114
118
panic_str ( msg) ;
0 commit comments