Skip to content

Commit

Permalink
Refer to concat and stringify macros by absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 27, 2021
1 parent 68d1f4c commit b577cd9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/ensure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,17 @@ macro_rules! __fancy_ensure {
if !(lhs $op rhs) {
#[allow(unused_imports)]
use $crate::private::{BothDebug, NotBothDebug};
return Err((lhs, rhs).__dispatch_ensure(concat!("Condition failed: `", stringify!($lhs), " ", stringify!($op), " ", stringify!($rhs), "`")));
return Err((lhs, rhs).__dispatch_ensure(
$crate::private::concat!(
"Condition failed: `",
$crate::private::stringify!($lhs),
" ",
$crate::private::stringify!($op),
" ",
$crate::private::stringify!($rhs),
"`",
),
));
}
}
}
Expand Down

0 comments on commit b577cd9

Please sign in to comment.