mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Update/Fix tests
This commit is contained in:
parent
a634243634
commit
17542d08b4
1 changed files with 15 additions and 4 deletions
|
@ -78,21 +78,32 @@ fn f() {
|
|||
fn macro_diag_builtin() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! env {}
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! include {}
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! format_args {
|
||||
() => {}
|
||||
}
|
||||
|
||||
fn f() {
|
||||
// Test a handful of built-in (eager) macros:
|
||||
|
||||
include!(invalid);
|
||||
//^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
||||
//^^^^^^^^^^^^^^^^^ could not convert tokens
|
||||
include!("does not exist");
|
||||
//^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
||||
//^^^^^^^^^^^^^^^^^^^^^^^^^^ could not convert tokens
|
||||
|
||||
env!(invalid);
|
||||
//^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
||||
//^^^^^^^^^^^^^ could not convert tokens
|
||||
|
||||
// Lazy:
|
||||
|
||||
format_args!();
|
||||
//^^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
||||
//^^^^^^^^^^^^^^ no rule matches input tokens
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue