diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_expand/src/builtin_macro.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs index 01f78fc77..f9d3787f6 100644 --- a/crates/ra_hir_expand/src/builtin_macro.rs +++ b/crates/ra_hir_expand/src/builtin_macro.rs | |||
@@ -158,9 +158,9 @@ fn assert_expand( | |||
158 | tt: &tt::Subtree, | 158 | tt: &tt::Subtree, |
159 | ) -> Result<tt::Subtree, mbe::ExpandError> { | 159 | ) -> Result<tt::Subtree, mbe::ExpandError> { |
160 | // A hacky implementation for goto def and hover | 160 | // A hacky implementation for goto def and hover |
161 | // We expand `assert!("", arg1, arg2)` to | 161 | // We expand `assert!(cond, arg1, arg2)` to |
162 | // ``` | 162 | // ``` |
163 | // {(&(arg1), &(arg2));} | 163 | // {(cond, &(arg1), &(arg2));} |
164 | // ```, | 164 | // ```, |
165 | // which is wrong but useful. | 165 | // which is wrong but useful. |
166 | 166 | ||
@@ -539,8 +539,8 @@ mod tests { | |||
539 | r#" | 539 | r#" |
540 | #[rustc_builtin_macro] | 540 | #[rustc_builtin_macro] |
541 | macro_rules! assert { | 541 | macro_rules! assert { |
542 | ($fmt:expr) => ({ /* compiler built-in */ }); | 542 | ($cond:expr) => ({ /* compiler built-in */ }); |
543 | ($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ }) | 543 | ($cond:expr, $($args:tt)*) => ({ /* compiler built-in */ }) |
544 | } | 544 | } |
545 | assert!(true, "{} {:?}", arg1(a, b, c), arg2); | 545 | assert!(true, "{} {:?}", arg1(a, b, c), arg2); |
546 | "#, | 546 | "#, |