]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/call-deprecated.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / proc-macro / call-deprecated.rs
1 // check-pass
2 // aux-build:call-deprecated.rs
3
4 extern crate call_deprecated;
5
6 // These first two `#[allow(deprecated)]` attributes
7 // do nothing, since the AST nodes for `First` and `Second`
8 // haven't been assigned a `NodeId`.
9 // See #63221 for a discussion about how we should
10 // handle the interaction of 'inert' attributes and
11 // proc-macro attributes.
12
13 #[allow(deprecated)]
14 #[call_deprecated::attr] //~ WARN use of deprecated macro
15 struct First;
16
17 #[allow(deprecated)]
18 #[call_deprecated::attr_remove] //~ WARN use of deprecated macro
19 struct Second;
20
21 #[allow(deprecated)]
22 mod bar {
23     #[allow(deprecated)]
24     #[call_deprecated::attr]
25     struct Third;
26
27     #[allow(deprecated)]
28     #[call_deprecated::attr_remove]
29     struct Fourth;
30 }
31
32
33 fn main() {
34 }