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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

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`

0 commit comments

Comments
 (0)