]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/issue-44128.rs
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[rust.git] / src / test / ui / hygiene / issue-44128.rs
1 // check-pass
2 #![allow(unused_must_use)]
3 #![feature(decl_macro)]
4
5 pub macro create_struct($a:ident) {
6     struct $a;
7     impl Clone for $a {
8         fn clone(&self) -> Self {
9             $a
10         }
11     }
12 }
13
14 fn main() {
15     create_struct!(Test);
16     Test.clone();
17 }