This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree 2 files changed +7
-5
lines changed
crates/compiler-builtins-smoke-test
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,18 @@ test = false
11
11
bench = false
12
12
13
13
[features ]
14
- default = [" arch" , " unstable-float" ]
14
+ default = [" arch" , " compiler-builtins " , " unstable-float" ]
15
15
16
16
# Copied from `libm`'s root `Cargo.toml`'
17
- unstable-float = []
18
17
arch = []
18
+ compiler-builtins = []
19
+ unstable-float = []
19
20
20
21
[lints .rust ]
21
22
unexpected_cfgs = { level = " warn" , check-cfg = [
22
23
" cfg(arch_enabled)" ,
23
24
" cfg(assert_no_panic)" ,
24
25
" cfg(intrinsics_enabled)" ,
25
- ' cfg(feature, values("compiler-builtins"))' ,
26
26
' cfg(feature, values("force-soft-floats"))' ,
27
27
' cfg(feature, values("unstable"))' ,
28
28
' 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> {
248
248
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
249
249
cfg_if ! {
250
250
if #[ cfg( feature = "compiler-builtins" ) ] {
251
- unreachable!( )
251
+ let _ = f;
252
+ unimplemented!( )
252
253
} else {
253
254
fmt_any_hex( & self . 0 , f)
254
255
}
@@ -272,7 +273,8 @@ impl fmt::LowerHex for Hexf<i32> {
272
273
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
273
274
cfg_if ! {
274
275
if #[ cfg( feature = "compiler-builtins" ) ] {
275
- unreachable!( )
276
+ let _ = f;
277
+ unimplemented!( )
276
278
} else {
277
279
fmt:: LowerHex :: fmt( & self . 0 , f)
278
280
}
You can’t perform that action at this time.
0 commit comments