Skip to content

Commit 906deae

Browse files
committed
Auto merge of #56244 - oli-obk:loud_ui_errors, r=nikomatsakis
Report failing tests without `//~ ERROR` comments r? @nikomatsakis
2 parents 431e0ab + ff97569 commit 906deae

File tree

165 files changed

+440
-339
lines changed

Some content is hidden

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

165 files changed

+440
-339
lines changed

src/test/rustdoc-ui/doc-without-codeblock.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//~ ERROR Missing code example in this documentation
12
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
23
// file at the top-level directory of this distribution and at
34
// http://rust-lang.org/COPYRIGHT.
@@ -11,10 +12,13 @@
1112
#![deny(missing_doc_code_examples)]
1213

1314
/// Some docs.
15+
//~^ ERROR Missing code example in this documentation
1416
pub struct Foo;
1517

1618
/// And then, the princess died.
19+
//~^ ERROR Missing code example in this documentation
1720
pub mod foo {
1821
/// Or maybe not because she saved herself!
22+
//~^ ERROR Missing code example in this documentation
1923
pub fn bar() {}
2024
}

src/test/rustdoc-ui/doc-without-codeblock.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
error: Missing code example in this documentation
22
|
33
note: lint level defined here
4-
--> $DIR/doc-without-codeblock.rs:11:9
4+
--> $DIR/doc-without-codeblock.rs:12:9
55
|
66
LL | #![deny(missing_doc_code_examples)]
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^
88

99
error: Missing code example in this documentation
10-
--> $DIR/doc-without-codeblock.rs:13:1
10+
--> $DIR/doc-without-codeblock.rs:14:1
1111
|
1212
LL | /// Some docs.
1313
| ^^^^^^^^^^^^^^
1414

1515
error: Missing code example in this documentation
16-
--> $DIR/doc-without-codeblock.rs:16:1
16+
--> $DIR/doc-without-codeblock.rs:18:1
1717
|
1818
LL | /// And then, the princess died.
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

2121
error: Missing code example in this documentation
22-
--> $DIR/doc-without-codeblock.rs:18:5
22+
--> $DIR/doc-without-codeblock.rs:21:5
2323
|
2424
LL | /// Or maybe not because she saved herself!
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/rustdoc-ui/intra-link-span-ice-55723.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
// https://github.com/rust-lang/rust/issues/55723
1818

1919
/// ## For example:
20-
///
20+
///
2121
/// (arr[i])
22+
//~^ ERROR `[i]` cannot be resolved, ignoring it...
2223
pub fn test_ice() {
2324
unimplemented!();
2425
}

src/test/rustdoc-ui/private-item-doc-test.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ mod foo {
1616
/// ```
1717
/// assert!(false);
1818
/// ```
19+
//~^^^^^ ERROR Documentation test in private item
1920
fn bar() {}
2021
}

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

+1
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

+1-1
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

+1-1
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

+12
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

+12
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

+5-5
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

+6-4
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

+8-8
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

+1
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

+6-6
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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | t.0 = S(1);
99
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait
1010

1111
error[E0382]: assign to part of moved value: `u`
12-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:31:9
12+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:34:9
1313
|
1414
LL | drop(u);
1515
| - value moved here
@@ -19,7 +19,7 @@ LL | u.0 = S(1);
1919
= note: move occurs because `u` has type `Tpair`, which does not implement the `Copy` trait
2020

2121
error[E0382]: assign to part of moved value: `v`
22-
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:39:9
22+
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:45:9
2323
|
2424
LL | drop(v);
2525
| - value moved here

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

+9
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,32 @@ fn main() {
2121
let mut t: Tuple = (S(0), 0);
2222
drop(t);
2323
t.0 = S(1);
24+
//[nll]~^ ERROR assign to part of moved value
2425
t.1 = 2;
2526
println!("{:?} {:?}", t.0, t.1);
27+
//[ast]~^ ERROR use of moved value
28+
//[ast]~^^ ERROR use of moved value
2629
}
2730

2831
{
2932
let mut u: Tpair = Tpair(S(0), 0);
3033
drop(u);
3134
u.0 = S(1);
35+
//[nll]~^ ERROR assign to part of moved value
3236
u.1 = 2;
3337
println!("{:?} {:?}", u.0, u.1);
38+
//[ast]~^ ERROR use of moved value
39+
//[ast]~^^ ERROR use of moved value
3440
}
3541

3642
{
3743
let mut v: Spair = Spair { x: S(0), y: 0 };
3844
drop(v);
3945
v.x = S(1);
46+
//[nll]~^ ERROR assign to part of moved value
4047
v.y = 2;
4148
println!("{:?} {:?}", v.x, v.y);
49+
//[ast]~^ ERROR use of moved value
50+
//[ast]~^^ ERROR use of moved value
4251
}
4352
}

src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ impl Value {
1313
fn foo(val: Value) {
1414
let _reviewers_original: Vec<Value> = match val.as_array() {
1515
Some(array) => {
16-
*array
16+
*array //~ ERROR cannot move out of borrowed content
1717
}
1818
None => vec![]
1919
};

src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0507]: cannot move out of borrowed content
22
--> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13
33
|
4-
LL | *array
4+
LL | *array //~ ERROR cannot move out of borrowed content
55
| ^^^^^^
66
| |
77
| cannot move out of borrowed content

0 commit comments

Comments
 (0)