aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_def/src/body/tests.rs19
1 files changed, 15 insertions, 4 deletions
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() {
78fn macro_diag_builtin() { 78fn macro_diag_builtin() {
79 check_diagnostics( 79 check_diagnostics(
80 r#" 80 r#"
81#[rustc_builtin_macro]
82macro_rules! env {}
83
84#[rustc_builtin_macro]
85macro_rules! include {}
86
87#[rustc_builtin_macro]
88macro_rules! format_args {
89 () => {}
90}
91
81fn f() { 92fn f() {
82 // Test a handful of built-in (eager) macros: 93 // Test a handful of built-in (eager) macros:
83 94
84 include!(invalid); 95 include!(invalid);
85 //^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation 96 //^^^^^^^^^^^^^^^^^ could not convert tokens
86 include!("does not exist"); 97 include!("does not exist");
87 //^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation 98 //^^^^^^^^^^^^^^^^^^^^^^^^^^ could not convert tokens
88 99
89 env!(invalid); 100 env!(invalid);
90 //^^^^^^^^^^^^^ failed to parse or resolve macro invocation 101 //^^^^^^^^^^^^^ could not convert tokens
91 102
92 // Lazy: 103 // Lazy:
93 104
94 format_args!(); 105 format_args!();
95 //^^^^^^^^^^^^^^ failed to parse or resolve macro invocation 106 //^^^^^^^^^^^^^^ no rule matches input tokens
96} 107}
97 "#, 108 "#,
98 ); 109 );