Update/Fix tests

This commit is contained in:
Jonas Schievink 2020-12-02 17:00:48 +01:00
parent a634243634
commit 17542d08b4

View file

@ -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
}
"#,
);