Skip to content

Commit 8f7703b

Browse files
edwin0chengbjorn3
andcommitted
Update comment
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
1 parent 8c159b5 commit 8f7703b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/ra_hir_expand/src/builtin_macro.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ fn assert_expand(
158158
tt: &tt::Subtree,
159159
) -> Result<tt::Subtree, mbe::ExpandError> {
160160
// A hacky implementation for goto def and hover
161-
// We expand `assert!("", arg1, arg2)` to
161+
// We expand `assert!(cond, arg1, arg2)` to
162162
// ```
163-
// {(&(arg1), &(arg2));}
163+
// {(cond, &(arg1), &(arg2));}
164164
// ```,
165165
// which is wrong but useful.
166166

@@ -539,8 +539,8 @@ mod tests {
539539
r#"
540540
#[rustc_builtin_macro]
541541
macro_rules! assert {
542-
($fmt:expr) => ({ /* compiler built-in */ });
543-
($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ })
542+
($cond:expr) => ({ /* compiler built-in */ });
543+
($cond:expr, $($args:tt)*) => ({ /* compiler built-in */ })
544544
}
545545
assert!(true, "{} {:?}", arg1(a, b, c), arg2);
546546
"#,

0 commit comments

Comments
 (0)