Skip to content

Commit b32b6e8

Browse files
committed
fix tests
1 parent 0cec1b9 commit b32b6e8

5 files changed

+6
-36
lines changed

src/test/ui/anon-params-denied-2018.rs

-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
// Tests that anonymous parameters are a hard error in edition 2018.
122

133
// edition:2018

src/test/ui/anon-params-denied-2018.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: expected one of `:` or `@`, found `)`
2-
--> $DIR/anon-params-denied-2018.rs:18:15
2+
--> $DIR/anon-params-denied-2018.rs:6:15
33
|
44
LL | fn foo(i32); //~ expected one of `:` or `@`, found `)`
55
| ^ expected one of `:` or `@` here
66

77
error: expected one of `:` or `@`, found `,`
8-
--> $DIR/anon-params-denied-2018.rs:20:36
8+
--> $DIR/anon-params-denied-2018.rs:8:36
99
|
1010
LL | fn bar_with_default_impl(String, String) {}
1111
| ^ expected one of `:` or `@` here

src/test/ui/anon-params-deprecated.fixed

-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
#![warn(anonymous_parameters)]
122
// Test for the anonymous_parameters deprecation lint (RFC 1685)
133

src/test/ui/anon-params-deprecated.rs

-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
#![warn(anonymous_parameters)]
122
// Test for the anonymous_parameters deprecation lint (RFC 1685)
133

src/test/ui/anon-params-deprecated.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
warning: anonymous parameters are deprecated and will be removed in the next edition.
2-
--> $DIR/anon-params-deprecated.rs:19:12
2+
--> $DIR/anon-params-deprecated.rs:9:12
33
|
44
LL | fn foo(i32); //~ WARNING anonymous parameters are deprecated
55
| ^^^ help: Try naming the parameter or explicitly ignoring it: `_: i32`
66
|
77
note: lint level defined here
8-
--> $DIR/anon-params-deprecated.rs:11:9
8+
--> $DIR/anon-params-deprecated.rs:1:9
99
|
1010
LL | #![warn(anonymous_parameters)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1313
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
1414

1515
warning: anonymous parameters are deprecated and will be removed in the next edition.
16-
--> $DIR/anon-params-deprecated.rs:22:30
16+
--> $DIR/anon-params-deprecated.rs:12:30
1717
|
1818
LL | fn bar_with_default_impl(String, String) {}
1919
| ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String`
@@ -22,7 +22,7 @@ LL | fn bar_with_default_impl(String, String) {}
2222
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
2323

2424
warning: anonymous parameters are deprecated and will be removed in the next edition.
25-
--> $DIR/anon-params-deprecated.rs:22:38
25+
--> $DIR/anon-params-deprecated.rs:12:38
2626
|
2727
LL | fn bar_with_default_impl(String, String) {}
2828
| ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String`

0 commit comments

Comments
 (0)