Skip to content

Commit

Permalink
nr2.0: Add macros 2.0 resolution testcase.
Browse files Browse the repository at this point in the history
gcc/testsuite/ChangeLog:

	* rust/compile/name_resolution10.rs: New test.
  • Loading branch information
CohenArthur committed Aug 3, 2023
1 parent 88d2584 commit f7d9373
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gcc/testsuite/rust/compile/name_resolution10.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// { dg-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }

#![feature(decl_macro)]

pub mod foo {
pub mod bar {
pub mod baz {
// macros 2.0 get inserted in Ribs like items
pub macro boof() {}
}
}
}

#[macro_export]
fn main() {
foo::bar::baz::boof!();
crate::foo::bar::baz::boof!();
self::foo::bar::baz::boof!();
}

0 comments on commit f7d9373

Please sign in to comment.