aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-12-02 16:00:48 +0000
committerJonas Schievink <[email protected]>2020-12-03 14:48:29 +0000
commit17542d08b4316afd899dabc6c7fc4c66f257dacb (patch)
tree9461276ce400d7deaf98a6aa6791bb025225caba /crates/hir_def
parenta6342436343e01b32d4482a48994b8c22bcbe659 (diff)
Update/Fix tests
Diffstat (limited to 'crates/hir_def')
-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 );