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:
bors[bot] 2021-07-01 15:29:28 +00:00 committed by GitHub
commit a0b8448b09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(