|
| 1 | +error[E0658]: attributes on expressions are experimental |
| 2 | + --> $DIR/allowed-positions.rs:106:25 |
| 3 | + | |
| 4 | +LL | let _closure_expr = #[coverage(off)] || (); |
| 5 | + | ^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information |
| 8 | + = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable |
| 9 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 10 | + |
1 | 11 | error[E0788]: attribute should be applied to a function definition or closure
|
2 |
| - --> $DIR/allowed-positions.rs:11:1 |
| 12 | + --> $DIR/allowed-positions.rs:14:1 |
| 13 | + | |
| 14 | +LL | #[coverage(off)] |
| 15 | + | ^^^^^^^^^^^^^^^^ |
| 16 | +LL | type MyTypeAlias = (); |
| 17 | + | ---------------------- not a function or closure |
| 18 | + |
| 19 | +error[E0788]: attribute should be applied to a function definition or closure |
| 20 | + --> $DIR/allowed-positions.rs:17:1 |
3 | 21 | |
|
4 | 22 | LL | #[coverage(off)]
|
5 | 23 | | ^^^^^^^^^^^^^^^^
|
6 |
| -LL | / trait Trait { |
| 24 | +LL | / trait MyTrait { |
7 | 25 | LL | | #[coverage(off)]
|
8 |
| -LL | | const X: u32; |
| 26 | +LL | | const TRAIT_ASSOC_CONST: u32; |
9 | 27 | ... |
|
10 |
| -LL | | fn g(); |
| 28 | +LL | | fn trait_assoc_fn(); |
| 29 | +LL | | } |
| 30 | + | |_- not a function or closure |
| 31 | + |
| 32 | +error[E0788]: attribute should be applied to a function definition or closure |
| 33 | + --> $DIR/allowed-positions.rs:61:1 |
| 34 | + | |
| 35 | +LL | #[coverage(off)] |
| 36 | + | ^^^^^^^^^^^^^^^^ |
| 37 | +LL | / struct MyStruct { |
| 38 | +LL | | #[coverage(off)] |
| 39 | +LL | | field: u32, |
11 | 40 | LL | | }
|
12 | 41 | | |_- not a function or closure
|
13 | 42 |
|
14 | 43 | error[E0788]: attribute should be applied to a function definition or closure
|
15 |
| - --> $DIR/allowed-positions.rs:52:5 |
| 44 | + --> $DIR/allowed-positions.rs:63:5 |
| 45 | + | |
| 46 | +LL | #[coverage(off)] |
| 47 | + | ^^^^^^^^^^^^^^^^ |
| 48 | +LL | field: u32, |
| 49 | + | ---------- not a function or closure |
| 50 | + |
| 51 | +error[E0788]: attribute should be applied to a function definition or closure |
| 52 | + --> $DIR/allowed-positions.rs:88:5 |
16 | 53 | |
|
17 | 54 | LL | #[coverage(off)]
|
18 | 55 | | ^^^^^^^^^^^^^^^^
|
19 | 56 | LL | let _ = ();
|
20 | 57 | | ----------- not a function or closure
|
21 | 58 |
|
22 | 59 | error[E0788]: attribute should be applied to a function definition or closure
|
23 |
| - --> $DIR/allowed-positions.rs:56:9 |
| 60 | + --> $DIR/allowed-positions.rs:94:5 |
| 61 | + | |
| 62 | +LL | #[coverage(off)] |
| 63 | + | ^^^^^^^^^^^^^^^^ |
| 64 | +LL | let _let_closure = || (); |
| 65 | + | ------------------------- not a function or closure |
| 66 | + |
| 67 | +error[E0788]: attribute should be applied to a function definition or closure |
| 68 | + --> $DIR/allowed-positions.rs:110:9 |
24 | 69 | |
|
25 | 70 | LL | #[coverage(off)]
|
26 | 71 | | ^^^^^^^^^^^^^^^^
|
27 | 72 | LL | () => (),
|
28 | 73 | | -------- not a function or closure
|
29 | 74 |
|
30 | 75 | error[E0788]: attribute should be applied to a function definition or closure
|
31 |
| - --> $DIR/allowed-positions.rs:60:5 |
| 76 | + --> $DIR/allowed-positions.rs:114:5 |
32 | 77 | |
|
33 | 78 | LL | #[coverage(off)]
|
34 | 79 | | ^^^^^^^^^^^^^^^^
|
35 | 80 | LL | return ();
|
36 | 81 | | --------- not a function or closure
|
37 | 82 |
|
38 | 83 | error[E0788]: attribute should be applied to a function definition or closure
|
39 |
| - --> $DIR/allowed-positions.rs:13:5 |
| 84 | + --> $DIR/allowed-positions.rs:19:5 |
40 | 85 | |
|
41 | 86 | LL | #[coverage(off)]
|
42 | 87 | | ^^^^^^^^^^^^^^^^
|
43 |
| -LL | const X: u32; |
44 |
| - | ------------- not a function or closure |
| 88 | +LL | const TRAIT_ASSOC_CONST: u32; |
| 89 | + | ----------------------------- not a function or closure |
45 | 90 |
|
46 | 91 | error[E0788]: attribute should be applied to a function definition or closure
|
47 |
| - --> $DIR/allowed-positions.rs:16:5 |
| 92 | + --> $DIR/allowed-positions.rs:22:5 |
48 | 93 | |
|
49 | 94 | LL | #[coverage(off)]
|
50 | 95 | | ^^^^^^^^^^^^^^^^
|
51 |
| -LL | type T; |
52 |
| - | ------- not a function or closure |
| 96 | +LL | type TraitAssocType; |
| 97 | + | -------------------- not a function or closure |
53 | 98 |
|
54 | 99 | error[E0788]: attribute should be applied to a function definition or closure
|
55 |
| - --> $DIR/allowed-positions.rs:21:5 |
| 100 | + --> $DIR/allowed-positions.rs:25:5 |
56 | 101 | |
|
57 | 102 | LL | #[coverage(off)]
|
58 | 103 | | ^^^^^^^^^^^^^^^^
|
59 |
| -LL | fn f(&self); |
60 |
| - | ------------ not a function or closure |
| 104 | +LL | fn trait_method(&self); |
| 105 | + | ----------------------- not a function or closure |
61 | 106 |
|
62 | 107 | error[E0788]: attribute should be applied to a function definition or closure
|
63 |
| - --> $DIR/allowed-positions.rs:24:5 |
| 108 | + --> $DIR/allowed-positions.rs:31:5 |
64 | 109 | |
|
65 | 110 | LL | #[coverage(off)]
|
66 | 111 | | ^^^^^^^^^^^^^^^^
|
67 |
| -LL | fn g(); |
68 |
| - | ------- not a function or closure |
| 112 | +LL | fn trait_assoc_fn(); |
| 113 | + | -------------------- not a function or closure |
69 | 114 |
|
70 | 115 | error[E0788]: attribute should be applied to a function definition or closure
|
71 |
| - --> $DIR/allowed-positions.rs:32:5 |
| 116 | + --> $DIR/allowed-positions.rs:39:5 |
72 | 117 | |
|
73 | 118 | LL | #[coverage(off)]
|
74 | 119 | | ^^^^^^^^^^^^^^^^
|
75 |
| -LL | type T = Self; |
76 |
| - | -------------- not a function or closure |
| 120 | +LL | type TraitAssocType = Self; |
| 121 | + | --------------------------- not a function or closure |
77 | 122 |
|
78 | 123 | error[E0788]: attribute should be applied to a function definition or closure
|
79 |
| - --> $DIR/allowed-positions.rs:35:5 |
| 124 | + --> $DIR/allowed-positions.rs:56:5 |
80 | 125 | |
|
81 | 126 | LL | #[coverage(off)]
|
82 | 127 | | ^^^^^^^^^^^^^^^^
|
83 |
| -LL | type U = impl Trait; |
84 |
| - | -------------------- not a function or closure |
| 128 | +LL | type T = impl Copy; |
| 129 | + | ------------------- not a function or closure |
85 | 130 |
|
86 | 131 | error[E0788]: attribute should be applied to a function definition or closure
|
87 |
| - --> $DIR/allowed-positions.rs:43:5 |
| 132 | + --> $DIR/allowed-positions.rs:76:5 |
88 | 133 | |
|
89 | 134 | LL | #[coverage(off)]
|
90 | 135 | | ^^^^^^^^^^^^^^^^
|
91 | 136 | LL | static X: u32;
|
92 | 137 | | -------------- not a function or closure
|
93 | 138 |
|
94 | 139 | error[E0788]: attribute should be applied to a function definition or closure
|
95 |
| - --> $DIR/allowed-positions.rs:46:5 |
| 140 | + --> $DIR/allowed-positions.rs:79:5 |
96 | 141 | |
|
97 | 142 | LL | #[coverage(off)]
|
98 | 143 | | ^^^^^^^^^^^^^^^^
|
99 | 144 | LL | type T;
|
100 | 145 | | ------- not a function or closure
|
101 | 146 |
|
102 |
| -error: unconstrained opaque type |
103 |
| - --> $DIR/allowed-positions.rs:36:14 |
104 |
| - | |
105 |
| -LL | type U = impl Trait; |
106 |
| - | ^^^^^^^^^^ |
| 147 | +error[E0788]: attribute should be applied to a function definition or closure |
| 148 | + --> $DIR/allowed-positions.rs:82:5 |
107 | 149 | |
|
108 |
| - = note: `U` must be used in combination with a concrete type within the same impl |
| 150 | +LL | #[coverage(off)] |
| 151 | + | ^^^^^^^^^^^^^^^^ |
| 152 | +LL | fn foreign_fn(); |
| 153 | + | ---------------- not a function or closure |
109 | 154 |
|
110 |
| -error: aborting due to 13 previous errors |
| 155 | +error: aborting due to 18 previous errors |
111 | 156 |
|
112 |
| -For more information about this error, try `rustc --explain E0788`. |
| 157 | +Some errors have detailed explanations: E0658, E0788. |
| 158 | +For more information about an error, try `rustc --explain E0658`. |
0 commit comments