rust/tests/ui/macros/paths-in-macro-invocations.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
538 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
// aux-build:two_macros-rpass.rs
2016-11-28 07:57:17 +00:00
extern crate two_macros_rpass as two_macros;
2016-11-28 07:57:17 +00:00
::two_macros::macro_one!();
two_macros::macro_one!();
mod foo { pub use two_macros::macro_one as bar; }
trait T {
foo::bar!();
::foo::bar!();
}
struct S {
x: foo::bar!(i32),
y: ::foo::bar!(i32),
}
impl S {
foo::bar!();
::foo::bar!();
}
fn main() {
foo::bar!();
::foo::bar!();
let _ = foo::bar!(0);
let _ = ::foo::bar!(0);
let foo::bar!(_) = 0;
let ::foo::bar!(_) = 0;
}