]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/derive-helper-legacy-limits.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / proc-macro / derive-helper-legacy-limits.rs
1 // Support for legacy derive helpers is limited and heuristic-based
2 // (that's exactly the reason why they are deprecated).
3
4 // edition:2018
5 // aux-build:test-macros.rs
6
7 #[macro_use]
8 extern crate test_macros;
9
10 use derive as my_derive;
11
12 #[my_derive(Empty)]
13 #[empty_helper] // OK
14 struct S1;
15
16 // Legacy helper detection doesn't see through `derive` renaming.
17 #[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope
18 #[my_derive(Empty)]
19 struct S2;
20
21 fn main() {}