File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
crates/compiler-builtins-smoke-test Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,18 @@ test = false
1111bench = false
1212
1313[features ]
14- default = [" arch" , " unstable-float" ]
14+ default = [" arch" , " compiler-builtins " , " unstable-float" ]
1515
1616# Copied from `libm`'s root `Cargo.toml`'
17- unstable-float = []
1817arch = []
18+ compiler-builtins = []
19+ unstable-float = []
1920
2021[lints .rust ]
2122unexpected_cfgs = { level = " warn" , check-cfg = [
2223 " cfg(arch_enabled)" ,
2324 " cfg(assert_no_panic)" ,
2425 " cfg(intrinsics_enabled)" ,
25- ' cfg(feature, values("compiler-builtins"))' ,
2626 ' cfg(feature, values("force-soft-floats"))' ,
2727 ' cfg(feature, values("unstable"))' ,
2828 ' cfg(feature, values("unstable-intrinsics"))' ,
Original file line number Diff line number Diff line change @@ -248,7 +248,8 @@ impl<F: Float> fmt::LowerHex for Hexf<F> {
248248 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
249249 cfg_if ! {
250250 if #[ cfg( feature = "compiler-builtins" ) ] {
251- unreachable!( )
251+ let _ = f;
252+ unimplemented!( )
252253 } else {
253254 fmt_any_hex( & self . 0 , f)
254255 }
@@ -272,7 +273,8 @@ impl fmt::LowerHex for Hexf<i32> {
272273 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
273274 cfg_if ! {
274275 if #[ cfg( feature = "compiler-builtins" ) ] {
275- unreachable!( )
276+ let _ = f;
277+ unimplemented!( )
276278 } else {
277279 fmt:: LowerHex :: fmt( & self . 0 , f)
278280 }
You can’t perform that action at this time.
0 commit comments