]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/derive-helper-shadowing-2.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / proc-macro / derive-helper-shadowing-2.rs
1 // If a derive macro introduces a helper attribute with the same name as that macro,
2 // then make sure that it's usable without ambiguities.
3
4 // check-pass
5 // aux-build:derive-helper-shadowing-2.rs
6
7 #[macro_use]
8 extern crate derive_helper_shadowing_2;
9
10 #[derive(same_name)]
11 struct S {
12     #[same_name] // OK, no ambiguity, derive helpers have highest priority
13     field: u8,
14 }
15
16 fn main() {}