]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2397-do-not-recommend/incorrect-locations.rs
Auto merge of #106503 - cjgillot:remap-nofilter, r=oli-obk
[rust.git] / tests / ui / rfc-2397-do-not-recommend / incorrect-locations.rs
1 #![feature(do_not_recommend)]
2
3 #[do_not_recommend]
4 //~^ `#[do_not_recommend]` can only be placed
5 const CONST: () = ();
6
7 #[do_not_recommend]
8 //~^ `#[do_not_recommend]` can only be placed
9 static Static: () = ();
10
11 #[do_not_recommend]
12 //~^ `#[do_not_recommend]` can only be placed
13 type Type = ();
14
15 #[do_not_recommend]
16 //~^ `#[do_not_recommend]` can only be placed
17 enum Enum {
18 }
19
20 #[do_not_recommend]
21 //~^ `#[do_not_recommend]` can only be placed
22 extern {
23 }
24
25 #[do_not_recommend]
26 //~^ `#[do_not_recommend]` can only be placed
27 fn fun() {
28 }
29
30 #[do_not_recommend]
31 //~^ `#[do_not_recommend]` can only be placed
32 struct Struct {
33 }
34
35 #[do_not_recommend]
36 //~^ `#[do_not_recommend]` can only be placed
37 trait Trait {
38 }
39
40 #[do_not_recommend]
41 impl Trait for i32 {
42 }
43
44 fn main() {
45 }