Merge #9443
9443: internal: Add a simpler legacy macro scoping test r=jonas-schievink a=jonas-schievink This is a lot simpler to understand and debug than the `plain_macros_are_legacy_textual_scoped` test. bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
a0b8448b09
@ -335,6 +335,24 @@ macro_rules! declare_mod {
|
||||
);
|
||||
}
|
||||
|
||||
#[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