Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 299d696

Browse files
committedSep 11, 2019
Stabilize param_attrs in Rust 1.39.0
1 parent 34e82a7 commit 299d696

23 files changed

+93
-204
lines changed
 

‎src/doc/unstable-book/src/language-features/param-attrs.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎src/libsyntax/feature_gate/accepted.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ declare_features! (
243243
(accepted, async_await, "1.39.0", Some(50547), None),
244244
/// Allows mixing bind-by-move in patterns and references to those identifiers in guards.
245245
(accepted, bind_by_move_pattern_guards, "1.39.0", Some(15287), None),
246+
/// Allows attributes in formal function parameters.
247+
(accepted, param_attrs, "1.39.0", Some(60406), None),
246248

247249
// -------------------------------------------------------------------------
248250
// feature-group-end: accepted features

‎src/libsyntax/feature_gate/active.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,6 @@ declare_features! (
489489
/// Allows the user of associated type bounds.
490490
(active, associated_type_bounds, "1.34.0", Some(52662), None),
491491

492-
/// Attributes on formal function params.
493-
(active, param_attrs, "1.36.0", Some(60406), None),
494-
495492
/// Allows calling constructor functions in `const fn`.
496493
(active, const_constructor, "1.37.0", Some(61456), None),
497494

‎src/libsyntax/feature_gate/check.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ pub fn check_crate(krate: &ast::Crate,
892892
}
893893
}
894894

895-
gate_all!(param_attrs, "attributes on function parameters are unstable");
896895
gate_all!(let_chains, "`let` expressions in this position are experimental");
897896
gate_all!(async_closure, "async closures are unstable");
898897
gate_all!(yields, generators, "yield syntax is experimental");

‎src/libsyntax/parse/attr.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ const DEFAULT_UNEXPECTED_INNER_ATTR_ERR_MSG: &str = "an inner attribute is not \
1919
permitted in this context";
2020

2121
impl<'a> Parser<'a> {
22-
crate fn parse_param_attributes(&mut self) -> PResult<'a, Vec<ast::Attribute>> {
23-
let attrs = self.parse_outer_attributes()?;
24-
self.sess.gated_spans.param_attrs.borrow_mut()
25-
.extend(attrs.iter().map(|a| a.span));
26-
Ok(attrs)
27-
}
28-
2922
/// Parses attributes that appear before an item.
3023
crate fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<ast::Attribute>> {
3124
let mut attrs: Vec<ast::Attribute> = Vec::new();

‎src/libsyntax/parse/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>;
4242
/// used and should be feature gated accordingly in `check_crate`.
4343
#[derive(Default)]
4444
pub struct GatedSpans {
45-
/// Spans collected for gating `param_attrs`, e.g. `fn foo(#[attr] x: u8) {}`.
46-
pub param_attrs: Lock<Vec<Span>>,
4745
/// Spans collected for gating `let_chains`, e.g. `if a && let b = c {}`.
4846
pub let_chains: Lock<Vec<Span>>,
4947
/// Spans collected for gating `async_closure`, e.g. `async || ..`.

‎src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ impl<'a> Parser<'a> {
979979
is_name_required: impl Fn(&token::Token) -> bool,
980980
) -> PResult<'a, Param> {
981981
let lo = self.token.span;
982-
let attrs = self.parse_param_attributes()?;
982+
let attrs = self.parse_outer_attributes()?;
983983
if let Some(mut param) = self.parse_self_param()? {
984984
param.attrs = attrs.into();
985985
return self.recover_bad_self_param(param, is_trait_item);
@@ -1362,7 +1362,7 @@ impl<'a> Parser<'a> {
13621362
/// Returns the parsed optional self parameter with attributes and whether a self
13631363
/// shortcut was used.
13641364
fn parse_self_parameter_with_attrs(&mut self) -> PResult<'a, Option<Param>> {
1365-
let attrs = self.parse_param_attributes()?;
1365+
let attrs = self.parse_outer_attributes()?;
13661366
let param_opt = self.parse_self_param()?;
13671367
Ok(param_opt.map(|mut param| {
13681368
param.attrs = attrs.into();

‎src/libsyntax/parse/parser/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ impl<'a> Parser<'a> {
11761176
/// Parses a parameter in a closure header (e.g., `|arg, arg|`).
11771177
fn parse_fn_block_param(&mut self) -> PResult<'a, Param> {
11781178
let lo = self.token.span;
1179-
let attrs = self.parse_param_attributes()?;
1179+
let attrs = self.parse_outer_attributes()?;
11801180
let pat = self.parse_pat(PARAM_EXPECTED)?;
11811181
let t = if self.eat(&token::Colon) {
11821182
self.parse_ty()?

‎src/test/ui/lint/lint-unused-mut-variables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Exercise the unused_mut attribute in some positive and negative cases
44

55
#![deny(unused_mut)]
6-
#![feature(async_closure, param_attrs)]
6+
#![feature(async_closure)]
77

88
async fn baz_async(
99
mut a: i32,

‎src/test/ui/lint/lint-unused-variables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// compile-flags: --cfg something
22
// edition:2018
33

4-
#![feature(async_closure, param_attrs)]
4+
#![feature(async_closure)]
55
#![deny(unused_variables)]
66

77
async fn foo_async(

‎src/test/ui/parser/fn-arg-doc-comment.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@ pub fn f(
22
/// Comment
33
//~^ ERROR documentation comments cannot be applied to function parameters
44
//~| NOTE doc comments are not allowed here
5-
//~| ERROR attributes on function parameters are unstable
6-
//~| NOTE https://github.com/rust-lang/rust/issues/60406
75
id: u8,
86
/// Other
97
//~^ ERROR documentation comments cannot be applied to function parameters
108
//~| NOTE doc comments are not allowed here
11-
//~| ERROR attributes on function parameters are unstable
12-
//~| NOTE https://github.com/rust-lang/rust/issues/60406
139
a: u8,
1410
) {}
1511

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: attributes cannot be applied to a function parameter's type
2-
--> $DIR/fn-arg-doc-comment.rs:16:12
2+
--> $DIR/fn-arg-doc-comment.rs:12:12
33
|
44
LL | fn bar(id: #[allow(dead_code)] i32) {}
55
| ^^^^^^^^^^^^^^^^^^^ attributes are not allowed here
@@ -11,31 +11,13 @@ LL | /// Comment
1111
| ^^^^^^^^^^^ doc comments are not allowed here
1212

1313
error: documentation comments cannot be applied to function parameters
14-
--> $DIR/fn-arg-doc-comment.rs:8:5
14+
--> $DIR/fn-arg-doc-comment.rs:6:5
1515
|
1616
LL | /// Other
1717
| ^^^^^^^^^ doc comments are not allowed here
1818

19-
error[E0658]: attributes on function parameters are unstable
20-
--> $DIR/fn-arg-doc-comment.rs:2:5
21-
|
22-
LL | /// Comment
23-
| ^^^^^^^^^^^
24-
|
25-
= note: for more information, see https://github.com/rust-lang/rust/issues/60406
26-
= help: add `#![feature(param_attrs)]` to the crate attributes to enable
27-
28-
error[E0658]: attributes on function parameters are unstable
29-
--> $DIR/fn-arg-doc-comment.rs:8:5
30-
|
31-
LL | /// Other
32-
| ^^^^^^^^^
33-
|
34-
= note: for more information, see https://github.com/rust-lang/rust/issues/60406
35-
= help: add `#![feature(param_attrs)]` to the crate attributes to enable
36-
3719
error[E0308]: mismatched types
38-
--> $DIR/fn-arg-doc-comment.rs:22:7
20+
--> $DIR/fn-arg-doc-comment.rs:18:7
3921
|
4022
LL | f("", "");
4123
| ^^ expected u8, found reference
@@ -44,7 +26,7 @@ LL | f("", "");
4426
found type `&'static str`
4527

4628
error[E0308]: mismatched types
47-
--> $DIR/fn-arg-doc-comment.rs:22:11
29+
--> $DIR/fn-arg-doc-comment.rs:18:11
4830
|
4931
LL | f("", "");
5032
| ^^ expected u8, found reference
@@ -53,15 +35,14 @@ LL | f("", "");
5335
found type `&'static str`
5436

5537
error[E0308]: mismatched types
56-
--> $DIR/fn-arg-doc-comment.rs:29:9
38+
--> $DIR/fn-arg-doc-comment.rs:25:9
5739
|
5840
LL | bar("");
5941
| ^^ expected i32, found reference
6042
|
6143
= note: expected type `i32`
6244
found type `&'static str`
6345

64-
error: aborting due to 8 previous errors
46+
error: aborting due to 6 previous errors
6547

66-
Some errors have detailed explanations: E0308, E0658.
67-
For more information about an error, try `rustc --explain E0308`.
48+
For more information about this error, try `rustc --explain E0308`.

‎src/test/ui/rfc-2565-param-attrs/param-attrs-2018.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition:2018
22

3-
#![feature(param_attrs)]
4-
53
trait Trait2015 { fn foo(#[allow(C)] i32); }
64
//~^ ERROR expected one of `:`, `@`, or `|`, found `)`
75

‎src/test/ui/rfc-2565-param-attrs/param-attrs-2018.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `:`, `@`, or `|`, found `)`
2-
--> $DIR/param-attrs-2018.rs:5:41
2+
--> $DIR/param-attrs-2018.rs:3:41
33
|
44
LL | trait Trait2015 { fn foo(#[allow(C)] i32); }
55
| ^ expected one of `:`, `@`, or `|` here

‎src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// compile-flags: --cfg something
33

44
#![deny(unused_mut)]
5-
#![feature(param_attrs)]
65

76
extern "C" {
87
fn ffi(

‎src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(param_attrs)]
2-
31
extern "C" {
42
fn ffi(
53
/// Foo

‎src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,311 +1,311 @@
11
error: expected an inert attribute, found an attribute macro
2-
--> $DIR/param-attrs-builtin-attrs.rs:7:9
2+
--> $DIR/param-attrs-builtin-attrs.rs:5:9
33
|
44
LL | #[test] a: i32,
55
| ^^^^^^^
66

77
error: expected an inert attribute, found an attribute macro
8-
--> $DIR/param-attrs-builtin-attrs.rs:23:5
8+
--> $DIR/param-attrs-builtin-attrs.rs:21:5
99
|
1010
LL | #[test] a: u32,
1111
| ^^^^^^^
1212

1313
error: expected an inert attribute, found an attribute macro
14-
--> $DIR/param-attrs-builtin-attrs.rs:38:5
14+
--> $DIR/param-attrs-builtin-attrs.rs:36:5
1515
|
1616
LL | #[test] a: u32,
1717
| ^^^^^^^
1818

1919
error: expected an inert attribute, found an attribute macro
20-
--> $DIR/param-attrs-builtin-attrs.rs:58:9
20+
--> $DIR/param-attrs-builtin-attrs.rs:56:9
2121
|
2222
LL | #[test] a: i32,
2323
| ^^^^^^^
2424

2525
error: expected an inert attribute, found an attribute macro
26-
--> $DIR/param-attrs-builtin-attrs.rs:79:9
26+
--> $DIR/param-attrs-builtin-attrs.rs:77:9
2727
|
2828
LL | #[test] a: i32,
2929
| ^^^^^^^
3030

3131
error: expected an inert attribute, found an attribute macro
32-
--> $DIR/param-attrs-builtin-attrs.rs:98:9
32+
--> $DIR/param-attrs-builtin-attrs.rs:96:9
3333
|
3434
LL | #[test] a: i32,
3535
| ^^^^^^^
3636

3737
error: expected an inert attribute, found an attribute macro
38-
--> $DIR/param-attrs-builtin-attrs.rs:117:9
38+
--> $DIR/param-attrs-builtin-attrs.rs:115:9
3939
|
4040
LL | #[test] a: i32,
4141
| ^^^^^^^
4242

4343
error: expected an inert attribute, found an attribute macro
44-
--> $DIR/param-attrs-builtin-attrs.rs:134:9
44+
--> $DIR/param-attrs-builtin-attrs.rs:132:9
4545
|
4646
LL | #[test] a: u32,
4747
| ^^^^^^^
4848

4949
error: documentation comments cannot be applied to function parameters
50-
--> $DIR/param-attrs-builtin-attrs.rs:5:9
50+
--> $DIR/param-attrs-builtin-attrs.rs:3:9
5151
|
5252
LL | /// Foo
5353
| ^^^^^^^ doc comments are not allowed here
5454

5555
error: documentation comments cannot be applied to function parameters
56-
--> $DIR/param-attrs-builtin-attrs.rs:9:9
56+
--> $DIR/param-attrs-builtin-attrs.rs:7:9
5757
|
5858
LL | /// Bar
5959
| ^^^^^^^ doc comments are not allowed here
6060

6161
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
62-
--> $DIR/param-attrs-builtin-attrs.rs:11:9
62+
--> $DIR/param-attrs-builtin-attrs.rs:9:9
6363
|
6464
LL | #[must_use]
6565
| ^^^^^^^^^^^
6666

6767
error: documentation comments cannot be applied to function parameters
68-
--> $DIR/param-attrs-builtin-attrs.rs:13:9
68+
--> $DIR/param-attrs-builtin-attrs.rs:11:9
6969
|
7070
LL | /// Baz
7171
| ^^^^^^^ doc comments are not allowed here
7272

7373
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
74-
--> $DIR/param-attrs-builtin-attrs.rs:15:9
74+
--> $DIR/param-attrs-builtin-attrs.rs:13:9
7575
|
7676
LL | #[no_mangle] b: i32,
7777
| ^^^^^^^^^^^^
7878

7979
error: documentation comments cannot be applied to function parameters
80-
--> $DIR/param-attrs-builtin-attrs.rs:21:5
80+
--> $DIR/param-attrs-builtin-attrs.rs:19:5
8181
|
8282
LL | /// Foo
8383
| ^^^^^^^ doc comments are not allowed here
8484

8585
error: documentation comments cannot be applied to function parameters
86-
--> $DIR/param-attrs-builtin-attrs.rs:25:5
86+
--> $DIR/param-attrs-builtin-attrs.rs:23:5
8787
|
8888
LL | /// Bar
8989
| ^^^^^^^ doc comments are not allowed here
9090

9191
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
92-
--> $DIR/param-attrs-builtin-attrs.rs:27:5
92+
--> $DIR/param-attrs-builtin-attrs.rs:25:5
9393
|
9494
LL | #[must_use]
9595
| ^^^^^^^^^^^
9696

9797
error: documentation comments cannot be applied to function parameters
98-
--> $DIR/param-attrs-builtin-attrs.rs:29:5
98+
--> $DIR/param-attrs-builtin-attrs.rs:27:5
9999
|
100100
LL | /// Baz
101101
| ^^^^^^^ doc comments are not allowed here
102102

103103
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
104-
--> $DIR/param-attrs-builtin-attrs.rs:31:5
104+
--> $DIR/param-attrs-builtin-attrs.rs:29:5
105105
|
106106
LL | #[no_mangle] b: i32,
107107
| ^^^^^^^^^^^^
108108

109109
error: documentation comments cannot be applied to function parameters
110-
--> $DIR/param-attrs-builtin-attrs.rs:36:5
110+
--> $DIR/param-attrs-builtin-attrs.rs:34:5
111111
|
112112
LL | /// Foo
113113
| ^^^^^^^ doc comments are not allowed here
114114

115115
error: documentation comments cannot be applied to function parameters
116-
--> $DIR/param-attrs-builtin-attrs.rs:40:5
116+
--> $DIR/param-attrs-builtin-attrs.rs:38:5
117117
|
118118
LL | /// Bar
119119
| ^^^^^^^ doc comments are not allowed here
120120

121121
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
122-
--> $DIR/param-attrs-builtin-attrs.rs:42:5
122+
--> $DIR/param-attrs-builtin-attrs.rs:40:5
123123
|
124124
LL | #[must_use]
125125
| ^^^^^^^^^^^
126126

127127
error: documentation comments cannot be applied to function parameters
128-
--> $DIR/param-attrs-builtin-attrs.rs:44:5
128+
--> $DIR/param-attrs-builtin-attrs.rs:42:5
129129
|
130130
LL | /// Baz
131131
| ^^^^^^^ doc comments are not allowed here
132132

133133
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
134-
--> $DIR/param-attrs-builtin-attrs.rs:46:5
134+
--> $DIR/param-attrs-builtin-attrs.rs:44:5
135135
|
136136
LL | #[no_mangle] b: i32,
137137
| ^^^^^^^^^^^^
138138

139139
error: documentation comments cannot be applied to function parameters
140-
--> $DIR/param-attrs-builtin-attrs.rs:53:9
140+
--> $DIR/param-attrs-builtin-attrs.rs:51:9
141141
|
142142
LL | /// Foo
143143
| ^^^^^^^ doc comments are not allowed here
144144

145145
error: documentation comments cannot be applied to function parameters
146-
--> $DIR/param-attrs-builtin-attrs.rs:56:9
146+
--> $DIR/param-attrs-builtin-attrs.rs:54:9
147147
|
148148
LL | /// Bar
149149
| ^^^^^^^ doc comments are not allowed here
150150

151151
error: documentation comments cannot be applied to function parameters
152-
--> $DIR/param-attrs-builtin-attrs.rs:60:9
152+
--> $DIR/param-attrs-builtin-attrs.rs:58:9
153153
|
154154
LL | /// Baz
155155
| ^^^^^^^ doc comments are not allowed here
156156

157157
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
158-
--> $DIR/param-attrs-builtin-attrs.rs:62:9
158+
--> $DIR/param-attrs-builtin-attrs.rs:60:9
159159
|
160160
LL | #[must_use]
161161
| ^^^^^^^^^^^
162162

163163
error: documentation comments cannot be applied to function parameters
164-
--> $DIR/param-attrs-builtin-attrs.rs:64:9
164+
--> $DIR/param-attrs-builtin-attrs.rs:62:9
165165
|
166166
LL | /// Qux
167167
| ^^^^^^^ doc comments are not allowed here
168168

169169
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
170-
--> $DIR/param-attrs-builtin-attrs.rs:66:9
170+
--> $DIR/param-attrs-builtin-attrs.rs:64:9
171171
|
172172
LL | #[no_mangle] b: i32,
173173
| ^^^^^^^^^^^^
174174

175175
error: documentation comments cannot be applied to function parameters
176-
--> $DIR/param-attrs-builtin-attrs.rs:74:9
176+
--> $DIR/param-attrs-builtin-attrs.rs:72:9
177177
|
178178
LL | /// Foo
179179
| ^^^^^^^ doc comments are not allowed here
180180

181181
error: documentation comments cannot be applied to function parameters
182-
--> $DIR/param-attrs-builtin-attrs.rs:77:9
182+
--> $DIR/param-attrs-builtin-attrs.rs:75:9
183183
|
184184
LL | /// Bar
185185
| ^^^^^^^ doc comments are not allowed here
186186

187187
error: documentation comments cannot be applied to function parameters
188-
--> $DIR/param-attrs-builtin-attrs.rs:81:9
188+
--> $DIR/param-attrs-builtin-attrs.rs:79:9
189189
|
190190
LL | /// Baz
191191
| ^^^^^^^ doc comments are not allowed here
192192

193193
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
194-
--> $DIR/param-attrs-builtin-attrs.rs:83:9
194+
--> $DIR/param-attrs-builtin-attrs.rs:81:9
195195
|
196196
LL | #[must_use]
197197
| ^^^^^^^^^^^
198198

199199
error: documentation comments cannot be applied to function parameters
200-
--> $DIR/param-attrs-builtin-attrs.rs:85:9
200+
--> $DIR/param-attrs-builtin-attrs.rs:83:9
201201
|
202202
LL | /// Qux
203203
| ^^^^^^^ doc comments are not allowed here
204204

205205
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
206-
--> $DIR/param-attrs-builtin-attrs.rs:87:9
206+
--> $DIR/param-attrs-builtin-attrs.rs:85:9
207207
|
208208
LL | #[no_mangle] b: i32,
209209
| ^^^^^^^^^^^^
210210

211211
error: documentation comments cannot be applied to function parameters
212-
--> $DIR/param-attrs-builtin-attrs.rs:93:9
212+
--> $DIR/param-attrs-builtin-attrs.rs:91:9
213213
|
214214
LL | /// Foo
215215
| ^^^^^^^ doc comments are not allowed here
216216

217217
error: documentation comments cannot be applied to function parameters
218-
--> $DIR/param-attrs-builtin-attrs.rs:96:9
218+
--> $DIR/param-attrs-builtin-attrs.rs:94:9
219219
|
220220
LL | /// Bar
221221
| ^^^^^^^ doc comments are not allowed here
222222

223223
error: documentation comments cannot be applied to function parameters
224-
--> $DIR/param-attrs-builtin-attrs.rs:100:9
224+
--> $DIR/param-attrs-builtin-attrs.rs:98:9
225225
|
226226
LL | /// Baz
227227
| ^^^^^^^ doc comments are not allowed here
228228

229229
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
230-
--> $DIR/param-attrs-builtin-attrs.rs:102:9
230+
--> $DIR/param-attrs-builtin-attrs.rs:100:9
231231
|
232232
LL | #[must_use]
233233
| ^^^^^^^^^^^
234234

235235
error: documentation comments cannot be applied to function parameters
236-
--> $DIR/param-attrs-builtin-attrs.rs:104:9
236+
--> $DIR/param-attrs-builtin-attrs.rs:102:9
237237
|
238238
LL | /// Qux
239239
| ^^^^^^^ doc comments are not allowed here
240240

241241
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
242-
--> $DIR/param-attrs-builtin-attrs.rs:106:9
242+
--> $DIR/param-attrs-builtin-attrs.rs:104:9
243243
|
244244
LL | #[no_mangle] b: i32,
245245
| ^^^^^^^^^^^^
246246

247247
error: documentation comments cannot be applied to function parameters
248-
--> $DIR/param-attrs-builtin-attrs.rs:112:9
248+
--> $DIR/param-attrs-builtin-attrs.rs:110:9
249249
|
250250
LL | /// Foo
251251
| ^^^^^^^ doc comments are not allowed here
252252

253253
error: documentation comments cannot be applied to function parameters
254-
--> $DIR/param-attrs-builtin-attrs.rs:115:9
254+
--> $DIR/param-attrs-builtin-attrs.rs:113:9
255255
|
256256
LL | /// Bar
257257
| ^^^^^^^ doc comments are not allowed here
258258

259259
error: documentation comments cannot be applied to function parameters
260-
--> $DIR/param-attrs-builtin-attrs.rs:119:9
260+
--> $DIR/param-attrs-builtin-attrs.rs:117:9
261261
|
262262
LL | /// Baz
263263
| ^^^^^^^ doc comments are not allowed here
264264

265265
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
266-
--> $DIR/param-attrs-builtin-attrs.rs:121:9
266+
--> $DIR/param-attrs-builtin-attrs.rs:119:9
267267
|
268268
LL | #[must_use]
269269
| ^^^^^^^^^^^
270270

271271
error: documentation comments cannot be applied to function parameters
272-
--> $DIR/param-attrs-builtin-attrs.rs:123:9
272+
--> $DIR/param-attrs-builtin-attrs.rs:121:9
273273
|
274274
LL | /// Qux
275275
| ^^^^^^^ doc comments are not allowed here
276276

277277
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
278-
--> $DIR/param-attrs-builtin-attrs.rs:125:9
278+
--> $DIR/param-attrs-builtin-attrs.rs:123:9
279279
|
280280
LL | #[no_mangle] b: i32,
281281
| ^^^^^^^^^^^^
282282

283283
error: documentation comments cannot be applied to function parameters
284-
--> $DIR/param-attrs-builtin-attrs.rs:132:9
284+
--> $DIR/param-attrs-builtin-attrs.rs:130:9
285285
|
286286
LL | /// Foo
287287
| ^^^^^^^ doc comments are not allowed here
288288

289289
error: documentation comments cannot be applied to function parameters
290-
--> $DIR/param-attrs-builtin-attrs.rs:136:9
290+
--> $DIR/param-attrs-builtin-attrs.rs:134:9
291291
|
292292
LL | /// Bar
293293
| ^^^^^^^ doc comments are not allowed here
294294

295295
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
296-
--> $DIR/param-attrs-builtin-attrs.rs:138:9
296+
--> $DIR/param-attrs-builtin-attrs.rs:136:9
297297
|
298298
LL | #[must_use]
299299
| ^^^^^^^^^^^
300300

301301
error: documentation comments cannot be applied to function parameters
302-
--> $DIR/param-attrs-builtin-attrs.rs:140:9
302+
--> $DIR/param-attrs-builtin-attrs.rs:138:9
303303
|
304304
LL | /// Baz
305305
| ^^^^^^^ doc comments are not allowed here
306306

307307
error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters
308-
--> $DIR/param-attrs-builtin-attrs.rs:142:9
308+
--> $DIR/param-attrs-builtin-attrs.rs:140:9
309309
|
310310
LL | #[no_mangle] b: i32
311311
| ^^^^^^^^^^^^

‎src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// compile-flags: --cfg something
22
// edition:2018
33

4-
#![feature(async_closure, param_attrs)]
4+
#![feature(async_closure)]
55
#![deny(unused_variables)]
66

77
extern "C" {

‎src/test/ui/rfc-2565-param-attrs/param-attrs-feature-gate.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎src/test/ui/rfc-2565-param-attrs/param-attrs-feature-gate.stderr

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎src/test/ui/rfc-2565-param-attrs/param-attrs-pretty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
// check-pass
44

5-
#![feature(param_attrs)]
65
#![feature(c_variadic)]
76

87
extern crate param_attrs;

‎src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// aux-build:ident-mac.rs
22

3-
#![feature(param_attrs)]
43
#![feature(c_variadic)]
54

65
extern crate ident_mac;

‎src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,149 @@
11
error: expected an inert attribute, found an attribute macro
2-
--> $DIR/proc-macro-cannot-be-used.rs:11:21
2+
--> $DIR/proc-macro-cannot-be-used.rs:10:21
33
|
44
LL | extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); }
55
| ^^^^^
66

77
error: expected an inert attribute, found an attribute macro
8-
--> $DIR/proc-macro-cannot-be-used.rs:11:38
8+
--> $DIR/proc-macro-cannot-be-used.rs:10:38
99
|
1010
LL | extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); }
1111
| ^^^^^
1212

1313
error: expected an inert attribute, found an attribute macro
14-
--> $DIR/proc-macro-cannot-be-used.rs:15:38
14+
--> $DIR/proc-macro-cannot-be-used.rs:14:38
1515
|
1616
LL | unsafe extern "C" fn cvar(arg1: i32, #[id] mut args: ...) {}
1717
| ^^^^^
1818

1919
error: expected an inert attribute, found an attribute macro
20-
--> $DIR/proc-macro-cannot-be-used.rs:18:28
20+
--> $DIR/proc-macro-cannot-be-used.rs:17:28
2121
|
2222
LL | type Alias = extern "C" fn(#[id] u8, #[id] ...);
2323
| ^^^^^
2424

2525
error: expected an inert attribute, found an attribute macro
26-
--> $DIR/proc-macro-cannot-be-used.rs:18:38
26+
--> $DIR/proc-macro-cannot-be-used.rs:17:38
2727
|
2828
LL | type Alias = extern "C" fn(#[id] u8, #[id] ...);
2929
| ^^^^^
3030

3131
error: expected an inert attribute, found an attribute macro
32-
--> $DIR/proc-macro-cannot-be-used.rs:22:9
32+
--> $DIR/proc-macro-cannot-be-used.rs:21:9
3333
|
3434
LL | fn free(#[id] arg1: u8) {
3535
| ^^^^^
3636

3737
error: expected an inert attribute, found an attribute macro
38-
--> $DIR/proc-macro-cannot-be-used.rs:24:16
38+
--> $DIR/proc-macro-cannot-be-used.rs:23:16
3939
|
4040
LL | let lam = |#[id] W(x), #[id] y| ();
4141
| ^^^^^
4242

4343
error: expected an inert attribute, found an attribute macro
44-
--> $DIR/proc-macro-cannot-be-used.rs:24:28
44+
--> $DIR/proc-macro-cannot-be-used.rs:23:28
4545
|
4646
LL | let lam = |#[id] W(x), #[id] y| ();
4747
| ^^^^^
4848

4949
error: expected an inert attribute, found an attribute macro
50-
--> $DIR/proc-macro-cannot-be-used.rs:30:18
50+
--> $DIR/proc-macro-cannot-be-used.rs:29:18
5151
|
5252
LL | fn inherent1(#[id] self, #[id] arg1: u8) {}
5353
| ^^^^^
5454

5555
error: expected an inert attribute, found an attribute macro
56-
--> $DIR/proc-macro-cannot-be-used.rs:30:30
56+
--> $DIR/proc-macro-cannot-be-used.rs:29:30
5757
|
5858
LL | fn inherent1(#[id] self, #[id] arg1: u8) {}
5959
| ^^^^^
6060

6161
error: expected an inert attribute, found an attribute macro
62-
--> $DIR/proc-macro-cannot-be-used.rs:33:18
62+
--> $DIR/proc-macro-cannot-be-used.rs:32:18
6363
|
6464
LL | fn inherent2(#[id] &self, #[id] arg1: u8) {}
6565
| ^^^^^
6666

6767
error: expected an inert attribute, found an attribute macro
68-
--> $DIR/proc-macro-cannot-be-used.rs:33:31
68+
--> $DIR/proc-macro-cannot-be-used.rs:32:31
6969
|
7070
LL | fn inherent2(#[id] &self, #[id] arg1: u8) {}
7171
| ^^^^^
7272

7373
error: expected an inert attribute, found an attribute macro
74-
--> $DIR/proc-macro-cannot-be-used.rs:36:22
74+
--> $DIR/proc-macro-cannot-be-used.rs:35:22
7575
|
7676
LL | fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {}
7777
| ^^^^^
7878

7979
error: expected an inert attribute, found an attribute macro
80-
--> $DIR/proc-macro-cannot-be-used.rs:36:42
80+
--> $DIR/proc-macro-cannot-be-used.rs:35:42
8181
|
8282
LL | fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {}
8383
| ^^^^^
8484

8585
error: expected an inert attribute, found an attribute macro
86-
--> $DIR/proc-macro-cannot-be-used.rs:39:22
86+
--> $DIR/proc-macro-cannot-be-used.rs:38:22
8787
|
8888
LL | fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {}
8989
| ^^^^^
9090

9191
error: expected an inert attribute, found an attribute macro
92-
--> $DIR/proc-macro-cannot-be-used.rs:39:45
92+
--> $DIR/proc-macro-cannot-be-used.rs:38:45
9393
|
9494
LL | fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {}
9595
| ^^^^^
9696

9797
error: expected an inert attribute, found an attribute macro
98-
--> $DIR/proc-macro-cannot-be-used.rs:45:15
98+
--> $DIR/proc-macro-cannot-be-used.rs:44:15
9999
|
100100
LL | fn trait1(#[id] self, #[id] arg1: u8);
101101
| ^^^^^
102102

103103
error: expected an inert attribute, found an attribute macro
104-
--> $DIR/proc-macro-cannot-be-used.rs:45:27
104+
--> $DIR/proc-macro-cannot-be-used.rs:44:27
105105
|
106106
LL | fn trait1(#[id] self, #[id] arg1: u8);
107107
| ^^^^^
108108

109109
error: expected an inert attribute, found an attribute macro
110-
--> $DIR/proc-macro-cannot-be-used.rs:48:15
110+
--> $DIR/proc-macro-cannot-be-used.rs:47:15
111111
|
112112
LL | fn trait2(#[id] &self, #[id] arg1: u8);
113113
| ^^^^^
114114

115115
error: expected an inert attribute, found an attribute macro
116-
--> $DIR/proc-macro-cannot-be-used.rs:48:28
116+
--> $DIR/proc-macro-cannot-be-used.rs:47:28
117117
|
118118
LL | fn trait2(#[id] &self, #[id] arg1: u8);
119119
| ^^^^^
120120

121121
error: expected an inert attribute, found an attribute macro
122-
--> $DIR/proc-macro-cannot-be-used.rs:51:19
122+
--> $DIR/proc-macro-cannot-be-used.rs:50:19
123123
|
124124
LL | fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8);
125125
| ^^^^^
126126

127127
error: expected an inert attribute, found an attribute macro
128-
--> $DIR/proc-macro-cannot-be-used.rs:51:39
128+
--> $DIR/proc-macro-cannot-be-used.rs:50:39
129129
|
130130
LL | fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8);
131131
| ^^^^^
132132

133133
error: expected an inert attribute, found an attribute macro
134-
--> $DIR/proc-macro-cannot-be-used.rs:54:19
134+
--> $DIR/proc-macro-cannot-be-used.rs:53:19
135135
|
136136
LL | fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
137137
| ^^^^^
138138

139139
error: expected an inert attribute, found an attribute macro
140-
--> $DIR/proc-macro-cannot-be-used.rs:54:42
140+
--> $DIR/proc-macro-cannot-be-used.rs:53:42
141141
|
142142
LL | fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
143143
| ^^^^^
144144

145145
error: expected an inert attribute, found an attribute macro
146-
--> $DIR/proc-macro-cannot-be-used.rs:54:58
146+
--> $DIR/proc-macro-cannot-be-used.rs:53:58
147147
|
148148
LL | fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
149149
| ^^^^^

0 commit comments

Comments
 (0)
Please sign in to comment.