mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +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() {
|
fn macro_diag_builtin() {
|
||||||
check_diagnostics(
|
check_diagnostics(
|
||||||
r#"
|
r#"
|
||||||
|
#[rustc_builtin_macro]
|
||||||
|
macro_rules! env {}
|
||||||
|
|
||||||
|
#[rustc_builtin_macro]
|
||||||
|
macro_rules! include {}
|
||||||
|
|
||||||
|
#[rustc_builtin_macro]
|
||||||
|
macro_rules! format_args {
|
||||||
|
() => {}
|
||||||
|
}
|
||||||
|
|
||||||
fn f() {
|
fn f() {
|
||||||
// Test a handful of built-in (eager) macros:
|
// Test a handful of built-in (eager) macros:
|
||||||
|
|
||||||
include!(invalid);
|
include!(invalid);
|
||||||
//^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
//^^^^^^^^^^^^^^^^^ could not convert tokens
|
||||||
include!("does not exist");
|
include!("does not exist");
|
||||||
//^^^^^^^^^^^^^^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
//^^^^^^^^^^^^^^^^^^^^^^^^^^ could not convert tokens
|
||||||
|
|
||||||
env!(invalid);
|
env!(invalid);
|
||||||
//^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
//^^^^^^^^^^^^^ could not convert tokens
|
||||||
|
|
||||||
// Lazy:
|
// Lazy:
|
||||||
|
|
||||||
format_args!();
|
format_args!();
|
||||||
//^^^^^^^^^^^^^^ failed to parse or resolve macro invocation
|
//^^^^^^^^^^^^^^ no rule matches input tokens
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue