Skip to content

Commit fc466ee

Browse files
committed
Unrolled build for #161011
Rollup merge of #161011 - DanielEScherzer:test-references-rust-2018, r=traviscross tests/ui/rust-2018: add annotations for reference rules
2 parents d453bdd + e6c3b3d commit fc466ee

20 files changed

Lines changed: 58 additions & 37 deletions

tests/ui/rust-2018/async-ident-allowed.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ edition:2015
2+
//@ reference: lex.keywords.strict.edition2018
23

34
#![deny(rust_2018_compatibility)]
45

tests/ui/rust-2018/async-ident-allowed.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: `async` is a keyword in the 2018 edition
2-
--> $DIR/async-ident-allowed.rs:9:9
2+
--> $DIR/async-ident-allowed.rs:10:9
33
|
44
LL | let async = 3;
55
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
99
note: the lint level is defined here
10-
--> $DIR/async-ident-allowed.rs:3:9
10+
--> $DIR/async-ident-allowed.rs:4:9
1111
|
1212
LL | #![deny(rust_2018_compatibility)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/rust-2018/async-ident.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
//@ edition:2015
55
//@ run-rustfix
6+
//@ reference: ident.raw.allowed
7+
//@ reference: lex.keywords.strict.edition2018
68

79
fn r#async() {} //~ ERROR async
810
//~^ WARN this is accepted in the current edition

tests/ui/rust-2018/async-ident.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
//@ edition:2015
55
//@ run-rustfix
6+
//@ reference: ident.raw.allowed
7+
//@ reference: lex.keywords.strict.edition2018
68

79
fn async() {} //~ ERROR async
810
//~^ WARN this is accepted in the current edition

tests/ui/rust-2018/async-ident.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: `async` is a keyword in the 2018 edition
2-
--> $DIR/async-ident.rs:7:4
2+
--> $DIR/async-ident.rs:9:4
33
|
44
LL | fn async() {}
55
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -14,7 +14,7 @@ LL | #![deny(keyword_idents)]
1414
= note: `#[deny(keyword_idents_2018)]` implied by `#[deny(keyword_idents)]`
1515

1616
error: `async` is a keyword in the 2018 edition
17-
--> $DIR/async-ident.rs:12:19
17+
--> $DIR/async-ident.rs:14:19
1818
|
1919
LL | ($async:expr, async) => {};
2020
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -23,7 +23,7 @@ LL | ($async:expr, async) => {};
2323
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
2424

2525
error: `async` is a keyword in the 2018 edition
26-
--> $DIR/async-ident.rs:17:6
26+
--> $DIR/async-ident.rs:19:6
2727
|
2828
LL | foo!(async);
2929
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -32,7 +32,7 @@ LL | foo!(async);
3232
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
3333

3434
error: `async` is a keyword in the 2018 edition
35-
--> $DIR/async-ident.rs:26:11
35+
--> $DIR/async-ident.rs:28:11
3636
|
3737
LL | trait async {}
3838
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -41,7 +41,7 @@ LL | trait async {}
4141
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
4242

4343
error: `async` is a keyword in the 2018 edition
44-
--> $DIR/async-ident.rs:30:10
44+
--> $DIR/async-ident.rs:32:10
4545
|
4646
LL | impl async for MyStruct {}
4747
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -50,7 +50,7 @@ LL | impl async for MyStruct {}
5050
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
5151

5252
error: `async` is a keyword in the 2018 edition
53-
--> $DIR/async-ident.rs:36:12
53+
--> $DIR/async-ident.rs:38:12
5454
|
5555
LL | static async: u32 = 0;
5656
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -59,7 +59,7 @@ LL | static async: u32 = 0;
5959
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
6060

6161
error: `async` is a keyword in the 2018 edition
62-
--> $DIR/async-ident.rs:42:11
62+
--> $DIR/async-ident.rs:44:11
6363
|
6464
LL | const async: u32 = 0;
6565
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -68,7 +68,7 @@ LL | const async: u32 = 0;
6868
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
6969

7070
error: `async` is a keyword in the 2018 edition
71-
--> $DIR/async-ident.rs:48:15
71+
--> $DIR/async-ident.rs:50:15
7272
|
7373
LL | impl Foo { fn async() {} }
7474
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -77,7 +77,7 @@ LL | impl Foo { fn async() {} }
7777
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
7878

7979
error: `async` is a keyword in the 2018 edition
80-
--> $DIR/async-ident.rs:53:12
80+
--> $DIR/async-ident.rs:55:12
8181
|
8282
LL | struct async {}
8383
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -86,7 +86,7 @@ LL | struct async {}
8686
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
8787

8888
error: `async` is a keyword in the 2018 edition
89-
--> $DIR/async-ident.rs:56:9
89+
--> $DIR/async-ident.rs:58:9
9090
|
9191
LL | let async: async = async {};
9292
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -95,7 +95,7 @@ LL | let async: async = async {};
9595
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
9696

9797
error: `async` is a keyword in the 2018 edition
98-
--> $DIR/async-ident.rs:56:16
98+
--> $DIR/async-ident.rs:58:16
9999
|
100100
LL | let async: async = async {};
101101
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -104,7 +104,7 @@ LL | let async: async = async {};
104104
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
105105

106106
error: `async` is a keyword in the 2018 edition
107-
--> $DIR/async-ident.rs:56:24
107+
--> $DIR/async-ident.rs:58:24
108108
|
109109
LL | let async: async = async {};
110110
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -113,7 +113,7 @@ LL | let async: async = async {};
113113
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
114114

115115
error: `async` is a keyword in the 2018 edition
116-
--> $DIR/async-ident.rs:67:19
116+
--> $DIR/async-ident.rs:69:19
117117
|
118118
LL | () => (pub fn async() {})
119119
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
@@ -122,7 +122,7 @@ LL | () => (pub fn async() {})
122122
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
123123

124124
error: `async` is a keyword in the 2018 edition
125-
--> $DIR/async-ident.rs:74:6
125+
--> $DIR/async-ident.rs:76:6
126126
|
127127
LL | (async) => (1)
128128
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`

tests/ui/rust-2018/dyn-keyword.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ edition:2015
22
//@ run-rustfix
3+
//@ reference: ident.raw.allowed
4+
//@ reference: lex.keywords.strict.edition2018
35

46
#![allow(unused_variables)]
57
#![deny(keyword_idents)]

tests/ui/rust-2018/dyn-keyword.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ edition:2015
22
//@ run-rustfix
3+
//@ reference: ident.raw.allowed
4+
//@ reference: lex.keywords.strict.edition2018
35

46
#![allow(unused_variables)]
57
#![deny(keyword_idents)]

tests/ui/rust-2018/dyn-keyword.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: `dyn` is a keyword in the 2018 edition
2-
--> $DIR/dyn-keyword.rs:8:9
2+
--> $DIR/dyn-keyword.rs:10:9
33
|
44
LL | let dyn = ();
55
| ^^^ help: you can use a raw identifier to stay compatible: `r#dyn`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2018/new-keywords.html>
99
note: the lint level is defined here
10-
--> $DIR/dyn-keyword.rs:5:9
10+
--> $DIR/dyn-keyword.rs:7:9
1111
|
1212
LL | #![deny(keyword_idents)]
1313
| ^^^^^^^^^^^^^^

tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ edition: 2015
22
//@ run-rustfix
3+
//@ reference: paths.qualifiers.global-root.edition2018
34

45
#![deny(absolute_paths_not_starting_with_crate)]
56

tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ edition: 2015
22
//@ run-rustfix
3+
//@ reference: paths.qualifiers.global-root.edition2018
34

45
#![deny(absolute_paths_not_starting_with_crate)]
56

0 commit comments

Comments
 (0)