mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
parent
678c74430b
commit
6c1d292569
@ -134,3 +134,31 @@ fn f() {
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dollar_crate_in_builtin_macro() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
#[macro_export]
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! format_args {}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! arg {
|
||||
() => {}
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! outer {
|
||||
() => {
|
||||
$crate::format_args!( "", $crate::arg!(1) )
|
||||
};
|
||||
}
|
||||
|
||||
fn f() {
|
||||
outer!();
|
||||
//^^^^^^^^ leftover tokens
|
||||
}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user