File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ use crate::panic::{Location, PanicInfo};
3636#[ cfg_attr( not( feature = "panic_immediate_abort" ) , inline( never) ) ]
3737#[ cfg_attr( feature = "panic_immediate_abort" , inline) ]
3838#[ track_caller]
39+ #[ rustc_const_unstable( feature = "core_panic" , issue = "none" ) ]
3940#[ lang = "panic" ] // needed by codegen for panic on overflow and other `Assert` MIR terminators
4041pub const fn panic ( expr : & ' static str ) -> ! {
4142 // Use Arguments::new_v1 instead of format_args!("{}", expr) to potentially
Original file line number Diff line number Diff line change @@ -727,7 +727,7 @@ impl Duration {
727727 pub const fn from_secs_f64 ( secs : f64 ) -> Duration {
728728 match Duration :: try_from_secs_f64 ( secs) {
729729 Ok ( v) => v,
730- Err ( e) => crate :: panicking :: panic ( e. description ( ) ) ,
730+ Err ( e) => panic ! ( "{}" , e. description( ) ) ,
731731 }
732732 }
733733
@@ -788,7 +788,7 @@ impl Duration {
788788 pub const fn from_secs_f32 ( secs : f32 ) -> Duration {
789789 match Duration :: try_from_secs_f32 ( secs) {
790790 Ok ( v) => v,
791- Err ( e) => crate :: panicking :: panic ( e. description ( ) ) ,
791+ Err ( e) => panic ! ( "{}" , e. description( ) ) ,
792792 }
793793 }
794794
You can’t perform that action at this time.
0 commit comments