From 5f80364ede59d2507205246b383c25cb4dfb67ff Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 17 Mar 2021 21:56:09 +0100 Subject: Improve diagnostic when including nonexistent file --- crates/hir_def/src/body/tests.rs | 2 +- crates/hir_def/src/nameres/tests/diagnostics.rs | 2 +- 2 files changed, 2 insertions(+), 2 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 f8e6f70e8..faa133297 100644 --- a/crates/hir_def/src/body/tests.rs +++ b/crates/hir_def/src/body/tests.rs @@ -137,7 +137,7 @@ fn f() { include!(invalid); //^^^^^^^^^^^^^^^^^ could not convert tokens include!("does not exist"); - //^^^^^^^^^^^^^^^^^^^^^^^^^^ could not convert tokens + //^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to load file `does not exist` env!(invalid); //^^^^^^^^^^^^^ could not convert tokens diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index 6becd9ff1..a89061c2e 100644 --- a/crates/hir_def/src/nameres/tests/diagnostics.rs +++ b/crates/hir_def/src/nameres/tests/diagnostics.rs @@ -196,7 +196,7 @@ fn builtin_macro_fails_expansion() { macro_rules! include { () => {} } include!("doesntexist"); - //^^^^^^^^^^^^^^^^^^^^^^^^ could not convert tokens + //^^^^^^^^^^^^^^^^^^^^^^^^ failed to load file `doesntexist` "#, ); } -- cgit v1.2.3