]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/import-prefix-macro.rs
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06fdc828722177f0763
[rust.git] / src / test / ui / imports / import-prefix-macro.rs
1 // run-pass
2 #![allow(unused_variables)]
3 mod a {
4     pub mod b {
5         pub mod c {
6             pub struct S;
7             pub struct Z;
8         }
9         pub struct W;
10     }
11 }
12
13 macro_rules! import {
14     (1 $p: path) => (use $p;);
15     (2 $p: path) => (use $p::{Z};);
16     (3 $p: path) => (use $p::*;);
17 }
18
19 import! { 1 a::b::c::S }
20 import! { 2 a::b::c }
21 import! { 3 a::b }
22
23 fn main() {
24     let s = S;
25     let z = Z;
26     let w = W;
27 }