Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 9, 2020
1 parent 1fce203 commit 6a8cf4a
Show file tree
Hide file tree
Showing 175 changed files with 270 additions and 176 deletions.
2 changes: 1 addition & 1 deletion src/test/incremental/const-generics/issue-62536.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// revisions:cfail1
#![feature(const_generics)]
//[cfail1]~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//[cfail1]~^ WARN the feature `const_generics` is incomplete

struct S<T, const N: usize>([T; N]);

Expand Down
2 changes: 1 addition & 1 deletion src/test/incremental/const-generics/issue-64087.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// revisions:cfail1
#![feature(const_generics)]
//[cfail1]~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//[cfail1]~^ WARN the feature `const_generics` is incomplete

fn combinator<T, const S: usize>() -> [T; S] {}
//[cfail1]~^ ERROR mismatched types
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/array-slice-vec/match_arr_unknown_len.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

fn is_123<const N: usize>(x: [u32; N]) -> bool {
match x {
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/array-slice-vec/match_arr_unknown_len.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/match_arr_unknown_len.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error[E0308]: mismatched types
--> $DIR/match_arr_unknown_len.rs:6:9
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/associated-type-bounds/duplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#![feature(associated_type_bounds)]
#![feature(type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)] //~ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash [incomplete_features]
#![feature(impl_trait_in_bindings)] //~ WARN the feature `impl_trait_in_bindings` is incomplete
#![feature(untagged_unions)]

use std::iter;
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/associated-type-bounds/duplicate.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/duplicate.rs:5:12
|
LL | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information

error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
--> $DIR/duplicate.rs:10:36
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/associated-type-bounds/dyn-lcsit.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/dyn-lcsit.rs:4:12
|
LL | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information

warning: 1 warning emitted

3 changes: 2 additions & 1 deletion src/test/ui/associated-type-bounds/lcsit.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lcsit.rs:4:12
|
LL | #![feature(impl_trait_in_bindings)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information

warning: 1 warning emitted

3 changes: 2 additions & 1 deletion src/test/ui/binding/const-param.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-param.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error[E0158]: const parameters cannot be referenced in patterns
--> $DIR/const-param.rs:7:9
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/apit-with-const-param.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// check-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

trait Trait {}

Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/apit-with-const-param.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/apit-with-const-param.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/argument_order.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

struct Bad<const N: usize, T> { //~ ERROR type parameters must be declared prior
arr: [u8; { N }],
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/argument_order.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ error: type parameters must be declared prior to const parameters
LL | struct Bad<const N: usize, T> {
| -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const N: usize>`

warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/argument_order.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error: aborting due to previous error; 1 warning emitted

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

#[allow(dead_code)]
struct ArithArrayLen<const N: usize>([u32; 0 + N]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/array-size-in-generic-struct-param.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error: constant expression depends on a generic parameter
--> $DIR/array-size-in-generic-struct-param.rs:5:38
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/array-wrapper-struct-ctor.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

#![allow(dead_code)]

Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/array-wrapper-struct-ctor.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/array-wrapper-struct-ctor.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/broken-mir-1.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

pub trait Foo {
fn foo(&self);
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/broken-mir-1.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/broken-mir-1.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/broken-mir-2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

use std::fmt::Debug;

Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/broken-mir-2.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/broken-mir-2.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error[E0277]: arrays only have std trait implementations for lengths 0..=32
--> $DIR/broken-mir-2.rs:7:36
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/cannot-infer-const-args.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

fn foo<const X: usize>() -> usize {
0
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/cannot-infer-const-args.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cannot-infer-const-args.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error[E0282]: type annotations needed
--> $DIR/cannot-infer-const-args.rs:9:5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// check-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

// This test confirms that the types can be inferred correctly for this example with const
// generics. Previously this would ICE, and more recently error.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cannot-infer-type-for-const-param.rs:2:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/concrete-const-as-fn-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

struct A<const N: usize>; // ok

Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/concrete-const-as-fn-arg.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/concrete-const-as-fn-arg.rs:4:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/concrete-const-impl-method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

pub struct A<const N: u32>;

Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/concrete-const-impl-method.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/concrete-const-impl-method.rs:5:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/condition-in-trait-const-arg.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

trait IsZeroTrait<const IS_ZERO: bool>{}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/condition-in-trait-const-arg.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion src/test/ui/const-generics/const-arg-in-fn.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

fn const_u32_identity<const X: u32>() -> u32 {
X
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/const-arg-in-fn.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-arg-in-fn.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: 1 warning emitted

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

type Array<T, const N: usize> = [T; N];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-arg-type-arg-misordered.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error[E0747]: constant provided when a type was expected
--> $DIR/const-arg-type-arg-misordered.rs:6:35
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/const-expression-parameter.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
//~^ WARN the feature `const_generics` is incomplete

fn i32_identity<const X: i32>() -> i32 {
5
Expand Down
3 changes: 2 additions & 1 deletion src/test/ui/const-generics/const-expression-parameter.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ error: expected one of `,` or `>`, found `+`
LL | i32_identity::<1 + 2>();
| ^ expected one of `,` or `>`

warning: the feature `const_generics` is incomplete and may cause the compiler to crash
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-expression-parameter.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

error: aborting due to previous error; 1 warning emitted

Loading

0 comments on commit 6a8cf4a

Please sign in to comment.