We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
assert_biteq!
1 parent 9f9ac74 commit d752721Copy full SHA for d752721
library/coretests/tests/floats/mod.rs
@@ -28,10 +28,11 @@ macro_rules! assert_biteq {
28
29
// Hack to get the width from a value
30
let bits = (l.to_bits() - l.to_bits()).leading_zeros();
31
+ let nl = if stringify!($($tt)*).is_empty() { "" } else { "\n" };
32
assert!(
33
l.to_bits() == r.to_bits(),
- "{}\nl: {l:?} ({lb:#0width$x})\nr: {r:?} ({rb:#0width$x})",
34
- format_args!($($tt)*),
+ "{msg}{nl}l: {l:?} ({lb:#0width$x})\nr: {r:?} ({rb:#0width$x})",
35
+ msg = format_args!($($tt)*),
36
lb = l.to_bits(),
37
rb = r.to_bits(),
38
width = ((bits / 4) + 2) as usize,
0 commit comments