diff --git a/crates/hir_def/src/body/tests.rs b/crates/hir_def/src/body/tests.rs index baf1179f1f..f2b57aebe7 100644 --- a/crates/hir_def/src/body/tests.rs +++ b/crates/hir_def/src/body/tests.rs @@ -78,21 +78,32 @@ fn f() { fn macro_diag_builtin() { check_diagnostics( r#" +#[rustc_builtin_macro] +macro_rules! env {} + +#[rustc_builtin_macro] +macro_rules! include {} + +#[rustc_builtin_macro] +macro_rules! format_args { + () => {} +} + fn f() { // Test a handful of built-in (eager) macros: include!(invalid); - //^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation + //^^^^^^^^^^^^^^^^^ could not convert tokens include!("does not exist"); - //^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation + //^^^^^^^^^^^^^^^^^^^^^^^^^^ could not convert tokens env!(invalid); - //^^^^^^^^^^^^^ failed to parse or resolve macro invocation + //^^^^^^^^^^^^^ could not convert tokens // Lazy: format_args!(); - //^^^^^^^^^^^^^^ failed to parse or resolve macro invocation + //^^^^^^^^^^^^^^ no rule matches input tokens } "#, );