Update comment

Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
This commit is contained in:
Edwin Cheng
2020-03-12 01:57:34 +08:00
parent 8c159b54e9
commit 8f7703b006

View File

@@ -158,9 +158,9 @@ fn assert_expand(
tt: &tt::Subtree, tt: &tt::Subtree,
) -> Result<tt::Subtree, mbe::ExpandError> { ) -> Result<tt::Subtree, mbe::ExpandError> {
// A hacky implementation for goto def and hover // A hacky implementation for goto def and hover
// We expand `assert!("", arg1, arg2)` to // We expand `assert!(cond, arg1, arg2)` to
// ``` // ```
// {(&(arg1), &(arg2));} // {(cond, &(arg1), &(arg2));}
// ```, // ```,
// which is wrong but useful. // which is wrong but useful.
@@ -539,8 +539,8 @@ mod tests {
r#" r#"
#[rustc_builtin_macro] #[rustc_builtin_macro]
macro_rules! assert { macro_rules! assert {
($fmt:expr) => ({ /* compiler built-in */ }); ($cond:expr) => ({ /* compiler built-in */ });
($fmt:expr, $($args:tt)*) => ({ /* compiler built-in */ }) ($cond:expr, $($args:tt)*) => ({ /* compiler built-in */ })
} }
assert!(true, "{} {:?}", arg1(a, b, c), arg2); assert!(true, "{} {:?}", arg1(a, b, c), arg2);
"#, "#,