]> git.lizzy.rs Git - rust.git/blob - tests/ui/specialization/specialization-overlap-hygiene.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / specialization / specialization-overlap-hygiene.rs
1 #![feature(decl_macro)]
2
3 struct X;
4
5 macro_rules! define_f_legacy { () => {
6     fn f() {}
7 }}
8 macro define_g_modern() {
9     fn g() {}
10 }
11
12 impl X {
13    fn f() {} //~ ERROR duplicate definitions with name `f`
14    fn g() {} // OK
15 }
16 impl X {
17     define_f_legacy!();
18 }
19 impl X {
20     define_g_modern!();
21 }
22
23 fn main() {}