mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
Add a simpler legacy macro scoping test
This commit is contained in:
parent
e8b9f43084
commit
33d5793f19
@ -335,6 +335,24 @@ mod prelude {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn legacy_macro_use_before_def() {
|
||||
check(
|
||||
r#"
|
||||
m!();
|
||||
|
||||
macro_rules! m {
|
||||
() => {
|
||||
struct S;
|
||||
}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
crate
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn plain_macros_are_legacy_textual_scoped() {
|
||||
check(
|
||||
|
Loading…
Reference in New Issue
Block a user