Skip to content

Commit 61efc3b

Browse files
committed
Update tests
1 parent 2664aad commit 61efc3b

File tree

154 files changed

+387
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+387
-252
lines changed

src/test/ui/associated-types/associated-types-overridden-binding-2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ trait I32Iterator = Iterator<Item = i32>;
1414

1515
fn main() {
1616
let _: &I32Iterator<Item = u32> = &vec![42].into_iter();
17+
//~^ ERROR type mismatch
1718
}

src/test/ui/associated-types/associated-types-overridden-binding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![feature(trait_alias)]
1212

1313
trait Foo: Iterator<Item = i32> {}
14-
trait Bar: Foo<Item = u32> {}
14+
trait Bar: Foo<Item = u32> {} //~ ERROR type annotations required
1515

1616
trait I32Iterator = Iterator<Item = i32>;
1717
trait U32Iterator = I32Iterator<Item = u32>;

src/test/ui/associated-types/associated-types-overridden-binding.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0284]: type annotations required: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
22
--> $DIR/associated-types-overridden-binding.rs:14:1
33
|
4-
LL | trait Bar: Foo<Item = u32> {}
4+
LL | trait Bar: Foo<Item = u32> {} //~ ERROR type annotations required
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: required by `Foo`

src/test/ui/await-keyword/2015-edition-warning.fixed

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@
55

66
mod outer_mod {
77
pub mod r#await {
8+
//~^ ERROR `await` is a keyword
9+
//~| WARN was previously accepted
810
pub struct r#await;
11+
//~^ ERROR `await` is a keyword
12+
//~| WARN was previously accepted
913
}
1014
}
1115
use outer_mod::r#await::r#await;
16+
//~^ ERROR `await` is a keyword
17+
//~| ERROR `await` is a keyword
18+
//~| WARN was previously accepted
19+
//~| WARN was previously accepted
1220

1321
fn main() {
1422
match r#await { r#await => {} }
23+
//~^ ERROR `await` is a keyword
24+
//~| ERROR `await` is a keyword
25+
//~| WARN was previously accepted
26+
//~| WARN was previously accepted
1527
}

src/test/ui/await-keyword/2015-edition-warning.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@
55

66
mod outer_mod {
77
pub mod await {
8+
//~^ ERROR `await` is a keyword
9+
//~| WARN was previously accepted
810
pub struct await;
11+
//~^ ERROR `await` is a keyword
12+
//~| WARN was previously accepted
913
}
1014
}
1115
use outer_mod::await::await;
16+
//~^ ERROR `await` is a keyword
17+
//~| ERROR `await` is a keyword
18+
//~| WARN was previously accepted
19+
//~| WARN was previously accepted
1220

1321
fn main() {
1422
match await { await => {} }
23+
//~^ ERROR `await` is a keyword
24+
//~| ERROR `await` is a keyword
25+
//~| WARN was previously accepted
26+
//~| WARN was previously accepted
1527
}

src/test/ui/await-keyword/2015-edition-warning.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | #![deny(keyword_idents)]
1313
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
1414

1515
error: `await` is a keyword in the 2018 edition
16-
--> $DIR/2015-edition-warning.rs:8:20
16+
--> $DIR/2015-edition-warning.rs:10:20
1717
|
1818
LL | pub struct await;
1919
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -22,7 +22,7 @@ LL | pub struct await;
2222
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
2323

2424
error: `await` is a keyword in the 2018 edition
25-
--> $DIR/2015-edition-warning.rs:11:16
25+
--> $DIR/2015-edition-warning.rs:15:16
2626
|
2727
LL | use outer_mod::await::await;
2828
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -31,7 +31,7 @@ LL | use outer_mod::await::await;
3131
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
3232

3333
error: `await` is a keyword in the 2018 edition
34-
--> $DIR/2015-edition-warning.rs:11:23
34+
--> $DIR/2015-edition-warning.rs:15:23
3535
|
3636
LL | use outer_mod::await::await;
3737
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -40,7 +40,7 @@ LL | use outer_mod::await::await;
4040
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
4141

4242
error: `await` is a keyword in the 2018 edition
43-
--> $DIR/2015-edition-warning.rs:14:11
43+
--> $DIR/2015-edition-warning.rs:22:11
4444
|
4545
LL | match await { await => {} }
4646
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
@@ -49,7 +49,7 @@ LL | match await { await => {} }
4949
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
5050

5151
error: `await` is a keyword in the 2018 edition
52-
--> $DIR/2015-edition-warning.rs:14:19
52+
--> $DIR/2015-edition-warning.rs:22:19
5353
|
5454
LL | match await { await => {} }
5555
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`

src/test/ui/await-keyword/2018-edition-error.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
#![allow(non_camel_case_types)]
33

44
mod outer_mod {
5-
pub mod await {
6-
pub struct await;
5+
pub mod await { //~ ERROR `await` is a keyword
6+
pub struct await; //~ ERROR `await` is a keyword
77
}
88
}
9-
use self::outer_mod::await::await;
9+
use self::outer_mod::await::await; //~ ERROR `await` is a keyword
10+
//~^ ERROR `await` is a keyword
1011

1112
fn main() {
12-
match await { await => () }
13+
match await { await => () } //~ ERROR `await` is a keyword
14+
//~^ ERROR `await` is a keyword
1315
}

src/test/ui/await-keyword/2018-edition-error.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
error[E0721]: `await` is a keyword in the 2018 edition
22
--> $DIR/2018-edition-error.rs:5:13
33
|
4-
LL | pub mod await {
4+
LL | pub mod await { //~ ERROR `await` is a keyword
55
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
66

77
error[E0721]: `await` is a keyword in the 2018 edition
88
--> $DIR/2018-edition-error.rs:6:20
99
|
10-
LL | pub struct await;
10+
LL | pub struct await; //~ ERROR `await` is a keyword
1111
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
1212

1313
error[E0721]: `await` is a keyword in the 2018 edition
1414
--> $DIR/2018-edition-error.rs:9:22
1515
|
16-
LL | use self::outer_mod::await::await;
16+
LL | use self::outer_mod::await::await; //~ ERROR `await` is a keyword
1717
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
1818

1919
error[E0721]: `await` is a keyword in the 2018 edition
2020
--> $DIR/2018-edition-error.rs:9:29
2121
|
22-
LL | use self::outer_mod::await::await;
22+
LL | use self::outer_mod::await::await; //~ ERROR `await` is a keyword
2323
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
2424

2525
error[E0721]: `await` is a keyword in the 2018 edition
26-
--> $DIR/2018-edition-error.rs:12:11
26+
--> $DIR/2018-edition-error.rs:13:11
2727
|
28-
LL | match await { await => () }
28+
LL | match await { await => () } //~ ERROR `await` is a keyword
2929
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
3030

3131
error[E0721]: `await` is a keyword in the 2018 edition
32-
--> $DIR/2018-edition-error.rs:12:19
32+
--> $DIR/2018-edition-error.rs:13:19
3333
|
34-
LL | match await { await => () }
34+
LL | match await { await => () } //~ ERROR `await` is a keyword
3535
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
3636

3737
error: aborting due to 6 previous errors

src/test/ui/await-keyword/post_expansion_error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ macro_rules! r#await {
66

77
fn main() {
88
await!()
9+
//~^ ERROR `await` is a keyword
910
}

src/test/ui/borrowck/issue-54499-field-mutation-of-moved-out-with-mut.ast.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0382]: use of moved value: `t.0`
2-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:25:31
2+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:26:31
33
|
44
LL | drop(t);
55
| - value moved here
@@ -10,7 +10,7 @@ LL | println!("{:?} {:?}", t.0, t.1);
1010
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
1111

1212
error[E0382]: use of moved value: `t.1`
13-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:25:36
13+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:26:36
1414
|
1515
LL | drop(t);
1616
| - value moved here
@@ -21,7 +21,7 @@ LL | println!("{:?} {:?}", t.0, t.1);
2121
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
2222

2323
error[E0382]: use of moved value: `u.0`
24-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:33:31
24+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:37:31
2525
|
2626
LL | drop(u);
2727
| - value moved here
@@ -32,7 +32,7 @@ LL | println!("{:?} {:?}", u.0, u.1);
3232
= note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
3333

3434
error[E0382]: use of moved value: `u.1`
35-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:33:36
35+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:37:36
3636
|
3737
LL | drop(u);
3838
| - value moved here
@@ -43,7 +43,7 @@ LL | println!("{:?} {:?}", u.0, u.1);
4343
= note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
4444

4545
error[E0382]: use of moved value: `v.x`
46-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:41:31
46+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:48:31
4747
|
4848
LL | drop(v);
4949
| - value moved here
@@ -54,7 +54,7 @@ LL | println!("{:?} {:?}", v.x, v.y);
5454
= note: move occurs because `v` has type `Spair`, which does not implement the `Copy` trait
5555

5656
error[E0382]: use of moved value: `v.y`
57-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:41:36
57+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:48:36
5858
|
5959
LL | drop(v);
6060
| - value moved here

0 commit comments

Comments
 (0)