mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
Fix ide-diagnostics test fixture
This commit is contained in:
parent
c0e402637e
commit
3fa0bf0dd3
@ -157,6 +157,7 @@ struct S;
|
||||
fn macro_diag_builtin() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
//- minicore: fmt
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! env {}
|
||||
|
||||
@ -166,9 +167,6 @@ macro_rules! include {}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! compile_error {}
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! format_args { () => {} }
|
||||
|
||||
fn main() {
|
||||
// Test a handful of built-in (eager) macros:
|
||||
|
||||
@ -189,7 +187,7 @@ fn main() {
|
||||
// Lazy:
|
||||
|
||||
format_args!();
|
||||
//^^^^^^^^^^^ error: no rule matches input tokens
|
||||
//^^^^^^^^^^^ error: Syntax Error in Expansion: expected expression
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
@ -30,7 +30,50 @@ SOURCE_FILE
|
||||
FORMAT_ARGS_KW "format_args"
|
||||
L_PAREN "("
|
||||
LITERAL
|
||||
INT_NUMBER "0"
|
||||
STRING "\"\""
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
FORMAT_ARGS_ARG
|
||||
LITERAL
|
||||
INT_NUMBER "0"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
FORMAT_ARGS_ARG
|
||||
LITERAL
|
||||
INT_NUMBER "1"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
FORMAT_ARGS_ARG
|
||||
NAME
|
||||
IDENT "a"
|
||||
WHITESPACE " "
|
||||
EQ "="
|
||||
WHITESPACE " "
|
||||
BIN_EXPR
|
||||
LITERAL
|
||||
INT_NUMBER "2"
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
LITERAL
|
||||
INT_NUMBER "3"
|
||||
COMMA ","
|
||||
WHITESPACE " "
|
||||
FORMAT_ARGS_ARG
|
||||
BIN_EXPR
|
||||
PATH_EXPR
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "a"
|
||||
WHITESPACE " "
|
||||
PLUS "+"
|
||||
WHITESPACE " "
|
||||
PATH_EXPR
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "b"
|
||||
R_PAREN ")"
|
||||
SEMICOLON ";"
|
||||
WHITESPACE "\n "
|
||||
|
Loading…
Reference in New Issue
Block a user