diff options
Diffstat (limited to 'crates/ide_diagnostics/src/handlers/macro_error.rs')
-rw-r--r-- | crates/ide_diagnostics/src/handlers/macro_error.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ide_diagnostics/src/handlers/macro_error.rs b/crates/ide_diagnostics/src/handlers/macro_error.rs index d4d928ad1..356f089b2 100644 --- a/crates/ide_diagnostics/src/handlers/macro_error.rs +++ b/crates/ide_diagnostics/src/handlers/macro_error.rs | |||
@@ -27,7 +27,7 @@ mod tests { | |||
27 | macro_rules! include { () => {} } | 27 | macro_rules! include { () => {} } |
28 | 28 | ||
29 | include!("doesntexist"); | 29 | include!("doesntexist"); |
30 | //^^^^^^^^^^^^^^^^^^^^^^^^ failed to load file `doesntexist` | 30 | //^^^^^^^^^^^^^^^^^^^^^^^^ error: failed to load file `doesntexist` |
31 | "#, | 31 | "#, |
32 | ); | 32 | ); |
33 | } | 33 | } |
@@ -66,7 +66,7 @@ macro_rules! env { () => {} } | |||
66 | macro_rules! concat { () => {} } | 66 | macro_rules! concat { () => {} } |
67 | 67 | ||
68 | include!(concat!(env!("OUT_DIR"), "/out.rs")); | 68 | include!(concat!(env!("OUT_DIR"), "/out.rs")); |
69 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `OUT_DIR` not set, enable "run build scripts" to fix | 69 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `OUT_DIR` not set, enable "run build scripts" to fix |
70 | "#, | 70 | "#, |
71 | ); | 71 | ); |
72 | } | 72 | } |
@@ -108,23 +108,23 @@ fn main() { | |||
108 | // Test a handful of built-in (eager) macros: | 108 | // Test a handful of built-in (eager) macros: |
109 | 109 | ||
110 | include!(invalid); | 110 | include!(invalid); |
111 | //^^^^^^^^^^^^^^^^^ could not convert tokens | 111 | //^^^^^^^^^^^^^^^^^ error: could not convert tokens |
112 | include!("does not exist"); | 112 | include!("does not exist"); |
113 | //^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to load file `does not exist` | 113 | //^^^^^^^^^^^^^^^^^^^^^^^^^^ error: failed to load file `does not exist` |
114 | 114 | ||
115 | env!(invalid); | 115 | env!(invalid); |
116 | //^^^^^^^^^^^^^ could not convert tokens | 116 | //^^^^^^^^^^^^^ error: could not convert tokens |
117 | 117 | ||
118 | env!("OUT_DIR"); | 118 | env!("OUT_DIR"); |
119 | //^^^^^^^^^^^^^^^ `OUT_DIR` not set, enable "run build scripts" to fix | 119 | //^^^^^^^^^^^^^^^ error: `OUT_DIR` not set, enable "run build scripts" to fix |
120 | 120 | ||
121 | compile_error!("compile_error works"); | 121 | compile_error!("compile_error works"); |
122 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ compile_error works | 122 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: compile_error works |
123 | 123 | ||
124 | // Lazy: | 124 | // Lazy: |
125 | 125 | ||
126 | format_args!(); | 126 | format_args!(); |
127 | //^^^^^^^^^^^^^^ no rule matches input tokens | 127 | //^^^^^^^^^^^^^^ error: no rule matches input tokens |
128 | } | 128 | } |
129 | "#, | 129 | "#, |
130 | ); | 130 | ); |
@@ -141,7 +141,7 @@ fn f() { | |||
141 | m!(); | 141 | m!(); |
142 | 142 | ||
143 | m!(hi); | 143 | m!(hi); |
144 | //^^^^^^ leftover tokens | 144 | //^^^^^^ error: leftover tokens |
145 | } | 145 | } |
146 | "#, | 146 | "#, |
147 | ); | 147 | ); |
@@ -166,7 +166,7 @@ macro_rules! outer { | |||
166 | 166 | ||
167 | fn f() { | 167 | fn f() { |
168 | outer!(); | 168 | outer!(); |
169 | } //^^^^^^^^ leftover tokens | 169 | } //^^^^^^^^ error: leftover tokens |
170 | "#, | 170 | "#, |
171 | ) | 171 | ) |
172 | } | 172 | } |