aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/tests
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-03-17 20:40:36 +0000
committerJonas Schievink <[email protected]>2021-03-17 20:41:32 +0000
commitc64adfe706183ccce9764853ee9c7231c57c16ab (patch)
treeaf759a4222a13c4b07823e61bc16dedfb93b3a97 /crates/hir_def/src/nameres/tests
parentbba474bb52e75baf4cabb3fc73f2a4c818816857 (diff)
Use first early expansion error during nameres
Diffstat (limited to 'crates/hir_def/src/nameres/tests')
-rw-r--r--crates/hir_def/src/nameres/tests/diagnostics.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs
index c22ef46fd..6becd9ff1 100644
--- a/crates/hir_def/src/nameres/tests/diagnostics.rs
+++ b/crates/hir_def/src/nameres/tests/diagnostics.rs
@@ -200,3 +200,20 @@ fn builtin_macro_fails_expansion() {
200 "#, 200 "#,
201 ); 201 );
202} 202}
203
204#[test]
205fn good_out_dir_diagnostic() {
206 check_diagnostics(
207 r#"
208 #[rustc_builtin_macro]
209 macro_rules! include { () => {} }
210 #[rustc_builtin_macro]
211 macro_rules! env { () => {} }
212 #[rustc_builtin_macro]
213 macro_rules! concat { () => {} }
214
215 include!(concat!(env!("OUT_DIR"), "/out.rs"));
216 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `OUT_DIR` not set, enable "load out dirs from check" to fix
217 "#,
218 );
219}