Skip to content

Report failing tests without //~ ERROR comments #56244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/test/rustdoc-ui/doc-without-codeblock.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//~ ERROR Missing code example in this documentation
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
Expand All @@ -11,10 +12,13 @@
#![deny(missing_doc_code_examples)]

/// Some docs.
//~^ ERROR Missing code example in this documentation
pub struct Foo;

/// And then, the princess died.
//~^ ERROR Missing code example in this documentation
pub mod foo {
/// Or maybe not because she saved herself!
//~^ ERROR Missing code example in this documentation
pub fn bar() {}
}
8 changes: 4 additions & 4 deletions src/test/rustdoc-ui/doc-without-codeblock.stderr
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
error: Missing code example in this documentation
|
note: lint level defined here
--> $DIR/doc-without-codeblock.rs:11:9
--> $DIR/doc-without-codeblock.rs:12:9
|
LL | #![deny(missing_doc_code_examples)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: Missing code example in this documentation
--> $DIR/doc-without-codeblock.rs:13:1
--> $DIR/doc-without-codeblock.rs:14:1
|
LL | /// Some docs.
| ^^^^^^^^^^^^^^

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

error: Missing code example in this documentation
--> $DIR/doc-without-codeblock.rs:18:5
--> $DIR/doc-without-codeblock.rs:21:5
|
LL | /// Or maybe not because she saved herself!
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion src/test/rustdoc-ui/intra-link-span-ice-55723.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
// https://github.com/rust-lang/rust/issues/55723

/// ## For example:
///
///
/// (arr[i])
//~^ ERROR `[i]` cannot be resolved, ignoring it...
pub fn test_ice() {
unimplemented!();
}
1 change: 1 addition & 0 deletions src/test/rustdoc-ui/private-item-doc-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ mod foo {
/// ```
/// assert!(false);
/// ```
//~^^^^^ ERROR Documentation test in private item
fn bar() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ trait I32Iterator = Iterator<Item = i32>;

fn main() {
let _: &I32Iterator<Item = u32> = &vec![42].into_iter();
//~^ ERROR type mismatch
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#![feature(trait_alias)]

trait Foo: Iterator<Item = i32> {}
trait Bar: Foo<Item = u32> {}
trait Bar: Foo<Item = u32> {} //~ ERROR type annotations required

trait I32Iterator = Iterator<Item = i32>;
trait U32Iterator = I32Iterator<Item = u32>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0284]: type annotations required: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:14:1
|
LL | trait Bar: Foo<Item = u32> {}
LL | trait Bar: Foo<Item = u32> {} //~ ERROR type annotations required
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: required by `Foo`
Expand Down
12 changes: 12 additions & 0 deletions src/test/ui/await-keyword/2015-edition-warning.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@

mod outer_mod {
pub mod r#await {
//~^ ERROR `await` is a keyword
//~| WARN was previously accepted
pub struct r#await;
//~^ ERROR `await` is a keyword
//~| WARN was previously accepted
}
}
use outer_mod::r#await::r#await;
//~^ ERROR `await` is a keyword
//~| ERROR `await` is a keyword
//~| WARN was previously accepted
//~| WARN was previously accepted

fn main() {
match r#await { r#await => {} }
//~^ ERROR `await` is a keyword
//~| ERROR `await` is a keyword
//~| WARN was previously accepted
//~| WARN was previously accepted
}
12 changes: 12 additions & 0 deletions src/test/ui/await-keyword/2015-edition-warning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@

mod outer_mod {
pub mod await {
//~^ ERROR `await` is a keyword
//~| WARN was previously accepted
pub struct await;
//~^ ERROR `await` is a keyword
//~| WARN was previously accepted
}
}
use outer_mod::await::await;
//~^ ERROR `await` is a keyword
//~| ERROR `await` is a keyword
//~| WARN was previously accepted
//~| WARN was previously accepted

fn main() {
match await { await => {} }
//~^ ERROR `await` is a keyword
//~| ERROR `await` is a keyword
//~| WARN was previously accepted
//~| WARN was previously accepted
}
10 changes: 5 additions & 5 deletions src/test/ui/await-keyword/2015-edition-warning.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LL | #![deny(keyword_idents)]
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

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

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

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

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

error: `await` is a keyword in the 2018 edition
--> $DIR/2015-edition-warning.rs:14:19
--> $DIR/2015-edition-warning.rs:22:19
|
LL | match await { await => {} }
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`
Expand Down
10 changes: 6 additions & 4 deletions src/test/ui/await-keyword/2018-edition-error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
#![allow(non_camel_case_types)]

mod outer_mod {
pub mod await {
pub struct await;
pub mod await { //~ ERROR `await` is a keyword
pub struct await; //~ ERROR `await` is a keyword
}
}
use self::outer_mod::await::await;
use self::outer_mod::await::await; //~ ERROR `await` is a keyword
//~^ ERROR `await` is a keyword

fn main() {
match await { await => () }
match await { await => () } //~ ERROR `await` is a keyword
//~^ ERROR `await` is a keyword
}
16 changes: 8 additions & 8 deletions src/test/ui/await-keyword/2018-edition-error.stderr
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
error[E0721]: `await` is a keyword in the 2018 edition
--> $DIR/2018-edition-error.rs:5:13
|
LL | pub mod await {
LL | pub mod await { //~ ERROR `await` is a keyword
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#await`

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

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

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

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

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

error: aborting due to 6 previous errors
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/await-keyword/post_expansion_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ macro_rules! r#await {

fn main() {
await!()
//~^ ERROR `await` is a keyword
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0382]: use of moved value: `t.0`
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:25:31
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:26:31
|
LL | drop(t);
| - value moved here
Expand All @@ -10,7 +10,7 @@ LL | println!("{:?} {:?}", t.0, t.1);
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait

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

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

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

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

error[E0382]: use of moved value: `v.y`
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:41:36
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:48:36
|
LL | drop(v);
| - value moved here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LL | t.0 = S(1);
= note: move occurs because `t` has type `(S, i32)`, which does not implement the `Copy` trait

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

error[E0382]: assign to part of moved value: `v`
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:39:9
--> $DIR/issue-54499-field-mutation-of-moved-out-with-mut.rs:45:9
|
LL | drop(v);
| - value moved here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,32 @@ fn main() {
let mut t: Tuple = (S(0), 0);
drop(t);
t.0 = S(1);
//[nll]~^ ERROR assign to part of moved value
t.1 = 2;
println!("{:?} {:?}", t.0, t.1);
//[ast]~^ ERROR use of moved value
//[ast]~^^ ERROR use of moved value
}

{
let mut u: Tpair = Tpair(S(0), 0);
drop(u);
u.0 = S(1);
//[nll]~^ ERROR assign to part of moved value
u.1 = 2;
println!("{:?} {:?}", u.0, u.1);
//[ast]~^ ERROR use of moved value
//[ast]~^^ ERROR use of moved value
}

{
let mut v: Spair = Spair { x: S(0), y: 0 };
drop(v);
v.x = S(1);
//[nll]~^ ERROR assign to part of moved value
v.y = 2;
println!("{:?} {:?}", v.x, v.y);
//[ast]~^ ERROR use of moved value
//[ast]~^^ ERROR use of moved value
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Value {
fn foo(val: Value) {
let _reviewers_original: Vec<Value> = match val.as_array() {
Some(array) => {
*array
*array //~ ERROR cannot move out of borrowed content
}
None => vec![]
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0507]: cannot move out of borrowed content
--> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13
|
LL | *array
LL | *array //~ ERROR cannot move out of borrowed content
| ^^^^^^
| |
| cannot move out of borrowed content
Expand Down
Loading