From 17542d08b4316afd899dabc6c7fc4c66f257dacb Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 2 Dec 2020 17:00:48 +0100 Subject: Update/Fix tests --- crates/hir_def/src/body/tests.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'crates/hir_def') diff --git a/crates/hir_def/src/body/tests.rs b/crates/hir_def/src/body/tests.rs index baf1179f1..f2b57aebe 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 } "#, ); -- cgit v1.2.3