From 4cfc767d7fadeab025227d67f104065c9e8a55d3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Jun 2021 22:06:28 +0300 Subject: internal: test diagnostic severeties and presense of fixes --- crates/ide_diagnostics/src/handlers/macro_error.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/ide_diagnostics/src/handlers/macro_error.rs') 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 { macro_rules! include { () => {} } include!("doesntexist"); -//^^^^^^^^^^^^^^^^^^^^^^^^ failed to load file `doesntexist` +//^^^^^^^^^^^^^^^^^^^^^^^^ error: failed to load file `doesntexist` "#, ); } @@ -66,7 +66,7 @@ macro_rules! env { () => {} } macro_rules! concat { () => {} } include!(concat!(env!("OUT_DIR"), "/out.rs")); -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `OUT_DIR` not set, enable "run build scripts" to fix +//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `OUT_DIR` not set, enable "run build scripts" to fix "#, ); } @@ -108,23 +108,23 @@ fn main() { // Test a handful of built-in (eager) macros: include!(invalid); - //^^^^^^^^^^^^^^^^^ could not convert tokens + //^^^^^^^^^^^^^^^^^ error: could not convert tokens include!("does not exist"); - //^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to load file `does not exist` + //^^^^^^^^^^^^^^^^^^^^^^^^^^ error: failed to load file `does not exist` env!(invalid); - //^^^^^^^^^^^^^ could not convert tokens + //^^^^^^^^^^^^^ error: could not convert tokens env!("OUT_DIR"); - //^^^^^^^^^^^^^^^ `OUT_DIR` not set, enable "run build scripts" to fix + //^^^^^^^^^^^^^^^ error: `OUT_DIR` not set, enable "run build scripts" to fix compile_error!("compile_error works"); - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ compile_error works + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: compile_error works // Lazy: format_args!(); - //^^^^^^^^^^^^^^ no rule matches input tokens + //^^^^^^^^^^^^^^ error: no rule matches input tokens } "#, ); @@ -141,7 +141,7 @@ fn f() { m!(); m!(hi); - //^^^^^^ leftover tokens + //^^^^^^ error: leftover tokens } "#, ); @@ -166,7 +166,7 @@ macro_rules! outer { fn f() { outer!(); -} //^^^^^^^^ leftover tokens +} //^^^^^^^^ error: leftover tokens "#, ) } -- cgit v1.2.3