From db9b8cef86fc6b7b754869fa0d4b0449bab6b38f Mon Sep 17 00:00:00 2001 From: Ellen Date: Sat, 23 Oct 2021 16:57:49 +0100 Subject: update tests --- .../const-generics/hash-tyvid-regression-2.rs | 2 +- .../const-generics/const-generic-defaults.rs | 1 - .../ui/const-generics/argument_order.full.stderr | 18 ------------- .../ui/const-generics/argument_order.min.stderr | 30 ---------------------- src/test/ui/const-generics/argument_order.rs | 5 ---- src/test/ui/const-generics/argument_order.stderr | 18 +++++++++++++ .../const-arg-type-arg-misordered.stderr | 3 --- .../const-param-before-other-params.full.stderr | 8 ------ .../const-param-before-other-params.min.stderr | 14 ---------- .../const-param-before-other-params.rs | 5 ---- .../const-param-before-other-params.stderr | 8 ++++++ .../defaults/auxiliary/const_defaulty.rs | 2 -- .../complex-generic-default-expr.min.stderr | 4 +-- .../defaults/complex-generic-default-expr.rs | 3 +-- .../const-generics/defaults/complex-unord-param.rs | 6 +---- .../ui/const-generics/defaults/const-default.rs | 2 -- .../defaults/const-param-as-default-value.rs | 1 - .../defaults/const-param-in-ty-defaults.rs | 1 - .../const-generics/defaults/default-annotation.rs | 1 - .../default-const-param-cannot-reference-self.rs | 2 -- ...efault-const-param-cannot-reference-self.stderr | 6 ++--- .../ui/const-generics/defaults/default-on-impl.rs | 2 -- .../const-generics/defaults/default-on-impl.stderr | 2 +- .../defaults/default-param-wf-concrete.rs | 1 - .../defaults/default-param-wf-concrete.stderr | 2 +- .../ui/const-generics/defaults/doesnt_infer.rs | 2 -- .../ui/const-generics/defaults/doesnt_infer.stderr | 2 +- src/test/ui/const-generics/defaults/external.rs | 2 -- .../ui/const-generics/defaults/forward-declared.rs | 2 -- .../defaults/forward-declared.stderr | 8 +++--- .../defaults/generic-expr-default-concrete.rs | 2 +- .../generic-expr-default-mismatched-types.rs | 2 +- .../defaults/generic-expr-default.rs | 2 +- .../defaults/intermixed-lifetime.full.stderr | 14 ---------- .../defaults/intermixed-lifetime.min.stderr | 14 ---------- .../const-generics/defaults/intermixed-lifetime.rs | 2 -- .../defaults/intermixed-lifetime.stderr | 14 ++++++++++ src/test/ui/const-generics/defaults/mismatch.rs | 2 -- .../ui/const-generics/defaults/mismatch.stderr | 10 ++++---- .../defaults/needs-feature.min.stderr | 8 ------ .../ui/const-generics/defaults/needs-feature.rs | 12 --------- .../param-order-err-pretty-prints-default.rs | 1 - .../param-order-err-pretty-prints-default.stderr | 2 +- .../const-generics/defaults/pretty-printing-ast.rs | 1 - .../defaults/pretty-printing-ast.stdout | 1 - .../const-generics/defaults/repr-c-issue-82792.rs | 2 -- .../ui/const-generics/defaults/rp_impl_trait.rs | 2 -- .../const-generics/defaults/rp_impl_trait_fail.rs | 2 -- .../defaults/rp_impl_trait_fail.stderr | 6 ++--- .../ui/const-generics/defaults/simple-defaults.rs | 1 - .../ui/const-generics/defaults/trait_objects.rs | 2 -- .../const-generics/defaults/trait_objects_fail.rs | 2 -- .../defaults/trait_objects_fail.stderr | 4 +-- .../defaults/type-default-const-param-name.rs | 2 -- src/test/ui/const-generics/defaults/wfness.rs | 2 -- src/test/ui/const-generics/defaults/wfness.stderr | 8 +++--- src/test/ui/const-generics/defaults/wrong-order.rs | 2 -- .../ui/const-generics/defaults/wrong-order.stderr | 4 +-- .../unused-complex-default-expr.rs | 2 +- src/test/ui/const-generics/invalid-enum.rs | 2 +- .../min_const_generics/const_default_first.rs | 3 +-- .../min_const_generics/const_default_first.stderr | 2 +- .../min_const_generics/default_function_param.rs | 1 - .../default_function_param.stderr | 2 +- .../min_const_generics/default_trait_param.rs | 2 +- .../min_const_generics/default_trait_param.stderr | 12 --------- .../min_const_generics/type_and_const_defaults.rs | 1 - .../params-in-ct-in-ty-param-lazy-norm.min.stderr | 2 -- src/test/ui/const-generics/type-after-const-ok.rs | 7 +---- src/test/ui/derives/derive-macro-const-default.rs | 2 -- src/test/ui/generics/issue-59508-1.rs | 3 +-- .../missing-items/missing-type-parameter2.rs | 3 --- 72 files changed, 83 insertions(+), 250 deletions(-) delete mode 100644 src/test/ui/const-generics/argument_order.full.stderr delete mode 100644 src/test/ui/const-generics/argument_order.min.stderr create mode 100644 src/test/ui/const-generics/argument_order.stderr delete mode 100644 src/test/ui/const-generics/const-param-before-other-params.full.stderr delete mode 100644 src/test/ui/const-generics/const-param-before-other-params.min.stderr create mode 100644 src/test/ui/const-generics/const-param-before-other-params.stderr delete mode 100644 src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr delete mode 100644 src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr create mode 100644 src/test/ui/const-generics/defaults/intermixed-lifetime.stderr delete mode 100644 src/test/ui/const-generics/defaults/needs-feature.min.stderr delete mode 100644 src/test/ui/const-generics/defaults/needs-feature.rs delete mode 100644 src/test/ui/const-generics/min_const_generics/default_trait_param.stderr (limited to 'src') diff --git a/src/test/incremental/const-generics/hash-tyvid-regression-2.rs b/src/test/incremental/const-generics/hash-tyvid-regression-2.rs index bba22bf5dc1..5cdd43cd782 100644 --- a/src/test/incremental/const-generics/hash-tyvid-regression-2.rs +++ b/src/test/incremental/const-generics/hash-tyvid-regression-2.rs @@ -1,5 +1,5 @@ // revisions: cfail -#![feature(generic_const_exprs, adt_const_params, const_generics_defaults)] +#![feature(generic_const_exprs, adt_const_params)] #![allow(incomplete_features)] // regression test for #77650 struct C([T; N.get()]) diff --git a/src/test/rustdoc/const-generics/const-generic-defaults.rs b/src/test/rustdoc/const-generics/const-generic-defaults.rs index efe35bf7aa4..8035f826775 100644 --- a/src/test/rustdoc/const-generics/const-generic-defaults.rs +++ b/src/test/rustdoc/const-generics/const-generic-defaults.rs @@ -1,5 +1,4 @@ #![crate_name = "foo"] -#![feature(const_generics_defaults)] // @has foo/struct.Foo.html '//pre[@class="rust struct"]' \ // 'pub struct Foo(_);' diff --git a/src/test/ui/const-generics/argument_order.full.stderr b/src/test/ui/const-generics/argument_order.full.stderr deleted file mode 100644 index 9762748f441..00000000000 --- a/src/test/ui/const-generics/argument_order.full.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: lifetime parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:10:32 - | -LL | struct AlsoBad { - | -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, const N: usize, T, const M: usize, U>` - -error[E0747]: lifetime provided when a type was expected - --> $DIR/argument_order.rs:18:23 - | -LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>; - | ^^^^^^^ - | - = note: lifetime arguments must be provided before type arguments - = help: reorder the arguments: lifetimes, then consts: `<'a, 'b, N, T, M, U>` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0747`. diff --git a/src/test/ui/const-generics/argument_order.min.stderr b/src/test/ui/const-generics/argument_order.min.stderr deleted file mode 100644 index afd9ed1a723..00000000000 --- a/src/test/ui/const-generics/argument_order.min.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error: type parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:4:28 - | -LL | struct Bad { - | -----------------^- help: reorder the parameters: lifetimes, then types, then consts: `` - -error: lifetime parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:10:32 - | -LL | struct AlsoBad { - | -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>` - -error: type parameters must be declared prior to const parameters - --> $DIR/argument_order.rs:10:36 - | -LL | struct AlsoBad { - | ---------------------^----------------------^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T, U, const N: usize, const M: usize>` - -error[E0747]: lifetime provided when a type was expected - --> $DIR/argument_order.rs:18:23 - | -LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>; - | ^^^^^^^ - | - = note: lifetime arguments must be provided before type arguments - = help: reorder the arguments: lifetimes, then types, then consts: `<'a, 'b, T, U, N, M>` - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0747`. diff --git a/src/test/ui/const-generics/argument_order.rs b/src/test/ui/const-generics/argument_order.rs index 97dd0f14352..196d9b8a1e2 100644 --- a/src/test/ui/const-generics/argument_order.rs +++ b/src/test/ui/const-generics/argument_order.rs @@ -1,15 +1,10 @@ -// revisions: full min -#![cfg_attr(full, feature(const_generics_defaults))] - struct Bad { - //[min]~^ ERROR type parameters must be declared prior to const parameters arr: [u8; { N }], another: T, } struct AlsoBad { //~^ ERROR lifetime parameters must be declared prior - //[min]~^^ ERROR type parameters must be declared prior to const parameters a: &'a T, b: &'b U, } diff --git a/src/test/ui/const-generics/argument_order.stderr b/src/test/ui/const-generics/argument_order.stderr new file mode 100644 index 00000000000..6b33dffb434 --- /dev/null +++ b/src/test/ui/const-generics/argument_order.stderr @@ -0,0 +1,18 @@ +error: lifetime parameters must be declared prior to const parameters + --> $DIR/argument_order.rs:6:32 + | +LL | struct AlsoBad { + | -----------------^^-----^^-------------------- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, const N: usize, T, const M: usize, U>` + +error[E0747]: lifetime provided when a type was expected + --> $DIR/argument_order.rs:13:23 + | +LL | let _: AlsoBad<7, 'static, u32, 'static, 17, u16>; + | ^^^^^^^ + | + = note: lifetime arguments must be provided before type arguments + = help: reorder the arguments: lifetimes, then consts: `<'a, 'b, N, T, M, U>` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0747`. diff --git a/src/test/ui/const-generics/const-arg-type-arg-misordered.stderr b/src/test/ui/const-generics/const-arg-type-arg-misordered.stderr index 104ee9b48b4..4e12f7a8c6e 100644 --- a/src/test/ui/const-generics/const-arg-type-arg-misordered.stderr +++ b/src/test/ui/const-generics/const-arg-type-arg-misordered.stderr @@ -3,9 +3,6 @@ error[E0747]: constant provided when a type was expected | LL | fn foo() -> Array { | ^ - | - = note: type arguments must be provided before constant arguments - = help: reorder the arguments: types, then consts: `` error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-param-before-other-params.full.stderr b/src/test/ui/const-generics/const-param-before-other-params.full.stderr deleted file mode 100644 index 982417eb3c6..00000000000 --- a/src/test/ui/const-generics/const-param-before-other-params.full.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: lifetime parameters must be declared prior to const parameters - --> $DIR/const-param-before-other-params.rs:5:21 - | -LL | fn bar(_: &'a ()) { - | --------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const X: u8>` - -error: aborting due to previous error - diff --git a/src/test/ui/const-generics/const-param-before-other-params.min.stderr b/src/test/ui/const-generics/const-param-before-other-params.min.stderr deleted file mode 100644 index f439cd9d69f..00000000000 --- a/src/test/ui/const-generics/const-param-before-other-params.min.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: lifetime parameters must be declared prior to const parameters - --> $DIR/const-param-before-other-params.rs:5:21 - | -LL | fn bar(_: &'a ()) { - | --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: u8>` - -error: type parameters must be declared prior to const parameters - --> $DIR/const-param-before-other-params.rs:9:21 - | -LL | fn foo(_: &T) {} - | --------------^- help: reorder the parameters: lifetimes, then types, then consts: `` - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/const-generics/const-param-before-other-params.rs b/src/test/ui/const-generics/const-param-before-other-params.rs index 0a7b57fe626..da06aca308e 100644 --- a/src/test/ui/const-generics/const-param-before-other-params.rs +++ b/src/test/ui/const-generics/const-param-before-other-params.rs @@ -1,12 +1,7 @@ -// revisions: full min -#![cfg_attr(full, feature(const_generics_defaults))] -#![cfg_attr(full, allow(incomplete_features))] - fn bar(_: &'a ()) { //~^ ERROR lifetime parameters must be declared prior to const parameters } fn foo(_: &T) {} -//[min]~^ ERROR type parameters must be declared prior to const parameters fn main() {} diff --git a/src/test/ui/const-generics/const-param-before-other-params.stderr b/src/test/ui/const-generics/const-param-before-other-params.stderr new file mode 100644 index 00000000000..607d20c4a25 --- /dev/null +++ b/src/test/ui/const-generics/const-param-before-other-params.stderr @@ -0,0 +1,8 @@ +error: lifetime parameters must be declared prior to const parameters + --> $DIR/const-param-before-other-params.rs:1:21 + | +LL | fn bar(_: &'a ()) { + | --------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const X: u8>` + +error: aborting due to previous error + diff --git a/src/test/ui/const-generics/defaults/auxiliary/const_defaulty.rs b/src/test/ui/const-generics/defaults/auxiliary/const_defaulty.rs index 5c548740af2..eed982534c2 100644 --- a/src/test/ui/const-generics/defaults/auxiliary/const_defaulty.rs +++ b/src/test/ui/const-generics/defaults/auxiliary/const_defaulty.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - pub struct Defaulted; impl Defaulted { pub fn new() -> Self { diff --git a/src/test/ui/const-generics/defaults/complex-generic-default-expr.min.stderr b/src/test/ui/const-generics/defaults/complex-generic-default-expr.min.stderr index aa289ec0778..b836cfeaedb 100644 --- a/src/test/ui/const-generics/defaults/complex-generic-default-expr.min.stderr +++ b/src/test/ui/const-generics/defaults/complex-generic-default-expr.min.stderr @@ -1,5 +1,5 @@ error: generic parameters may not be used in const operations - --> $DIR/complex-generic-default-expr.rs:7:47 + --> $DIR/complex-generic-default-expr.rs:6:47 | LL | struct Foo; | ^ cannot perform const operation using `N` @@ -8,7 +8,7 @@ LL | struct Foo; = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions error: generic parameters may not be used in const operations - --> $DIR/complex-generic-default-expr.rs:10:62 + --> $DIR/complex-generic-default-expr.rs:9:62 | LL | struct Bar() }>(T); | ^ cannot perform const operation using `T` diff --git a/src/test/ui/const-generics/defaults/complex-generic-default-expr.rs b/src/test/ui/const-generics/defaults/complex-generic-default-expr.rs index 814c996fbad..7f50d4c9f29 100644 --- a/src/test/ui/const-generics/defaults/complex-generic-default-expr.rs +++ b/src/test/ui/const-generics/defaults/complex-generic-default-expr.rs @@ -1,8 +1,7 @@ // revisions: full min //[full] check-pass #![cfg_attr(full, feature(generic_const_exprs))] -#![feature(const_generics_defaults)] -#![allow(incomplete_features)] +#![cfg_attr(full, allow(incomplete_features))] struct Foo; //[min]~^ ERROR generic parameters may not be used in const operations diff --git a/src/test/ui/const-generics/defaults/complex-unord-param.rs b/src/test/ui/const-generics/defaults/complex-unord-param.rs index c27ed298afd..aebc5975a5a 100644 --- a/src/test/ui/const-generics/defaults/complex-unord-param.rs +++ b/src/test/ui/const-generics/defaults/complex-unord-param.rs @@ -1,12 +1,8 @@ -// [full] run-pass -// revisions: full min +// run-pass // Checks a complicated usage of unordered params -#![cfg_attr(full, feature(const_generics_defaults))] -#![cfg_attr(full, allow(incomplete_features))] #![allow(dead_code)] struct NestedArrays<'a, const N: usize, A: 'a, const M: usize, T:'a =u32> { - //[min]~^ ERROR type parameters must be declared prior to const parameters args: &'a [&'a [T; M]; N], specifier: A, } diff --git a/src/test/ui/const-generics/defaults/const-default.rs b/src/test/ui/const-generics/defaults/const-default.rs index e7cbf01a301..65cb0eb14a3 100644 --- a/src/test/ui/const-generics/defaults/const-default.rs +++ b/src/test/ui/const-generics/defaults/const-default.rs @@ -1,6 +1,4 @@ // run-pass -#![feature(const_generics_defaults)] - pub struct ConstDefault; impl ConstDefault { diff --git a/src/test/ui/const-generics/defaults/const-param-as-default-value.rs b/src/test/ui/const-generics/defaults/const-param-as-default-value.rs index 9779835d315..c1c955d8758 100644 --- a/src/test/ui/const-generics/defaults/const-param-as-default-value.rs +++ b/src/test/ui/const-generics/defaults/const-param-as-default-value.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(const_generics_defaults)] struct Foo([u8; N], [u8; M]); fn foo() -> Foo { diff --git a/src/test/ui/const-generics/defaults/const-param-in-ty-defaults.rs b/src/test/ui/const-generics/defaults/const-param-in-ty-defaults.rs index dbcab77dcd2..5f0cafe2ef1 100644 --- a/src/test/ui/const-generics/defaults/const-param-in-ty-defaults.rs +++ b/src/test/ui/const-generics/defaults/const-param-in-ty-defaults.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(const_generics_defaults)] struct Foo(T); impl Foo { diff --git a/src/test/ui/const-generics/defaults/default-annotation.rs b/src/test/ui/const-generics/defaults/default-annotation.rs index 5517bf8ac5f..7a9f5732f7f 100644 --- a/src/test/ui/const-generics/defaults/default-annotation.rs +++ b/src/test/ui/const-generics/defaults/default-annotation.rs @@ -1,6 +1,5 @@ // run-pass #![feature(staged_api)] -#![feature(const_generics_defaults)] #![allow(incomplete_features)] // FIXME(const_generics_defaults): It seems like we aren't testing the right thing here, // I would assume that we want the attributes to apply to the const parameter defaults diff --git a/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.rs b/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.rs index 9af84439252..45275e60920 100644 --- a/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.rs +++ b/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - struct Struct; //~^ ERROR generic parameters cannot use `Self` in their defaults [E0735] diff --git a/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.stderr b/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.stderr index 5dfec2fcb73..72d7001fdf1 100644 --- a/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.stderr +++ b/src/test/ui/const-generics/defaults/default-const-param-cannot-reference-self.stderr @@ -1,17 +1,17 @@ error[E0735]: generic parameters cannot use `Self` in their defaults - --> $DIR/default-const-param-cannot-reference-self.rs:3:34 + --> $DIR/default-const-param-cannot-reference-self.rs:1:34 | LL | struct Struct; | ^^^^ `Self` in generic parameter default error[E0735]: generic parameters cannot use `Self` in their defaults - --> $DIR/default-const-param-cannot-reference-self.rs:6:30 + --> $DIR/default-const-param-cannot-reference-self.rs:4:30 | LL | enum Enum { } | ^^^^ `Self` in generic parameter default error[E0735]: generic parameters cannot use `Self` in their defaults - --> $DIR/default-const-param-cannot-reference-self.rs:9:32 + --> $DIR/default-const-param-cannot-reference-self.rs:7:32 | LL | union Union { not_empty: () } | ^^^^ `Self` in generic parameter default diff --git a/src/test/ui/const-generics/defaults/default-on-impl.rs b/src/test/ui/const-generics/defaults/default-on-impl.rs index 280d92f839f..9ce46aa09de 100644 --- a/src/test/ui/const-generics/defaults/default-on-impl.rs +++ b/src/test/ui/const-generics/defaults/default-on-impl.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - struct Foo; impl Foo {} diff --git a/src/test/ui/const-generics/defaults/default-on-impl.stderr b/src/test/ui/const-generics/defaults/default-on-impl.stderr index 0f85ceccc8a..ddfc0ead8ad 100644 --- a/src/test/ui/const-generics/defaults/default-on-impl.stderr +++ b/src/test/ui/const-generics/defaults/default-on-impl.stderr @@ -1,5 +1,5 @@ error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions - --> $DIR/default-on-impl.rs:5:12 + --> $DIR/default-on-impl.rs:3:12 | LL | impl Foo {} | ^ diff --git a/src/test/ui/const-generics/defaults/default-param-wf-concrete.rs b/src/test/ui/const-generics/defaults/default-param-wf-concrete.rs index d4271adefd1..41a52c7eb0d 100644 --- a/src/test/ui/const-generics/defaults/default-param-wf-concrete.rs +++ b/src/test/ui/const-generics/defaults/default-param-wf-concrete.rs @@ -1,4 +1,3 @@ -#![feature(const_generics_defaults)] struct Foo; //~^ ERROR evaluation of constant value failed fn main() {} diff --git a/src/test/ui/const-generics/defaults/default-param-wf-concrete.stderr b/src/test/ui/const-generics/defaults/default-param-wf-concrete.stderr index 6fca9d31c0a..e8ebddade5c 100644 --- a/src/test/ui/const-generics/defaults/default-param-wf-concrete.stderr +++ b/src/test/ui/const-generics/defaults/default-param-wf-concrete.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation of constant value failed - --> $DIR/default-param-wf-concrete.rs:2:28 + --> $DIR/default-param-wf-concrete.rs:1:28 | LL | struct Foo; | ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow diff --git a/src/test/ui/const-generics/defaults/doesnt_infer.rs b/src/test/ui/const-generics/defaults/doesnt_infer.rs index c7f14e47a9d..cd533b57bc3 100644 --- a/src/test/ui/const-generics/defaults/doesnt_infer.rs +++ b/src/test/ui/const-generics/defaults/doesnt_infer.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - // test that defaulted const params are not used to help type inference struct Foo; diff --git a/src/test/ui/const-generics/defaults/doesnt_infer.stderr b/src/test/ui/const-generics/defaults/doesnt_infer.stderr index d6c64d58be5..1551e81ea75 100644 --- a/src/test/ui/const-generics/defaults/doesnt_infer.stderr +++ b/src/test/ui/const-generics/defaults/doesnt_infer.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed for `Foo<{_: u32}>` - --> $DIR/doesnt_infer.rs:13:15 + --> $DIR/doesnt_infer.rs:11:15 | LL | let foo = Foo::foo(); | --- ^^^^^^^^ cannot infer the value of const parameter `N` diff --git a/src/test/ui/const-generics/defaults/external.rs b/src/test/ui/const-generics/defaults/external.rs index 276e74355c2..25ec523cb54 100644 --- a/src/test/ui/const-generics/defaults/external.rs +++ b/src/test/ui/const-generics/defaults/external.rs @@ -1,7 +1,5 @@ // aux-build:const_defaulty.rs // check-pass -#![feature(const_generics_defaults)] - extern crate const_defaulty; use const_defaulty::Defaulted; diff --git a/src/test/ui/const-generics/defaults/forward-declared.rs b/src/test/ui/const-generics/defaults/forward-declared.rs index 09fc105320e..ede3d873bdc 100644 --- a/src/test/ui/const-generics/defaults/forward-declared.rs +++ b/src/test/ui/const-generics/defaults/forward-declared.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - struct Foo; //~^ ERROR generic parameters with a default cannot use forward declared identifiers diff --git a/src/test/ui/const-generics/defaults/forward-declared.stderr b/src/test/ui/const-generics/defaults/forward-declared.stderr index a6c4a7ae4ef..4856c7a1fd2 100644 --- a/src/test/ui/const-generics/defaults/forward-declared.stderr +++ b/src/test/ui/const-generics/defaults/forward-declared.stderr @@ -1,23 +1,23 @@ error[E0128]: generic parameters with a default cannot use forward declared identifiers - --> $DIR/forward-declared.rs:3:29 + --> $DIR/forward-declared.rs:1:29 | LL | struct Foo; | ^ defaulted generic parameters cannot be forward declared error[E0128]: generic parameters with a default cannot use forward declared identifiers - --> $DIR/forward-declared.rs:6:27 + --> $DIR/forward-declared.rs:4:27 | LL | enum Bar {} | ^ defaulted generic parameters cannot be forward declared error[E0128]: generic parameters with a default cannot use forward declared identifiers - --> $DIR/forward-declared.rs:9:30 + --> $DIR/forward-declared.rs:7:30 | LL | struct Foo2; | ^ defaulted generic parameters cannot be forward declared error[E0128]: generic parameters with a default cannot use forward declared identifiers - --> $DIR/forward-declared.rs:12:28 + --> $DIR/forward-declared.rs:10:28 | LL | enum Bar2 {} | ^ defaulted generic parameters cannot be forward declared diff --git a/src/test/ui/const-generics/defaults/generic-expr-default-concrete.rs b/src/test/ui/const-generics/defaults/generic-expr-default-concrete.rs index 52cea51aae1..f082bd8d2e9 100644 --- a/src/test/ui/const-generics/defaults/generic-expr-default-concrete.rs +++ b/src/test/ui/const-generics/defaults/generic-expr-default-concrete.rs @@ -1,4 +1,4 @@ -#![feature(generic_const_exprs, const_generics_defaults)] +#![feature(generic_const_exprs)] #![allow(incomplete_features)] struct Foo; diff --git a/src/test/ui/const-generics/defaults/generic-expr-default-mismatched-types.rs b/src/test/ui/const-generics/defaults/generic-expr-default-mismatched-types.rs index 3a11631fc47..777865d1cb6 100644 --- a/src/test/ui/const-generics/defaults/generic-expr-default-mismatched-types.rs +++ b/src/test/ui/const-generics/defaults/generic-expr-default-mismatched-types.rs @@ -1,4 +1,4 @@ -#![feature(generic_const_exprs, const_generics_defaults)] +#![feature(generic_const_exprs)] #![allow(incomplete_features)] struct Foo; diff --git a/src/test/ui/const-generics/defaults/generic-expr-default.rs b/src/test/ui/const-generics/defaults/generic-expr-default.rs index 0adbd5cdf31..8fe43feb78a 100644 --- a/src/test/ui/const-generics/defaults/generic-expr-default.rs +++ b/src/test/ui/const-generics/defaults/generic-expr-default.rs @@ -1,4 +1,4 @@ -#![feature(generic_const_exprs, const_generics_defaults)] +#![feature(generic_const_exprs)] #![allow(incomplete_features)] pub struct Foo; diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr b/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr deleted file mode 100644 index 725cc36b428..00000000000 --- a/src/test/ui/const-generics/defaults/intermixed-lifetime.full.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: lifetime parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:5:28 - | -LL | struct Foo(&'a (), T); - | -----------------^^---------- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T = u32>` - -error: lifetime parameters must be declared prior to type parameters - --> $DIR/intermixed-lifetime.rs:8:37 - | -LL | struct Bar(&'a (), T); - | --------------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T = u32>` - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr b/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr deleted file mode 100644 index 725cc36b428..00000000000 --- a/src/test/ui/const-generics/defaults/intermixed-lifetime.min.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: lifetime parameters must be declared prior to const parameters - --> $DIR/intermixed-lifetime.rs:5:28 - | -LL | struct Foo(&'a (), T); - | -----------------^^---------- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T = u32>` - -error: lifetime parameters must be declared prior to type parameters - --> $DIR/intermixed-lifetime.rs:8:37 - | -LL | struct Bar(&'a (), T); - | --------------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T = u32>` - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.rs b/src/test/ui/const-generics/defaults/intermixed-lifetime.rs index cc215ab0c25..578938db4c4 100644 --- a/src/test/ui/const-generics/defaults/intermixed-lifetime.rs +++ b/src/test/ui/const-generics/defaults/intermixed-lifetime.rs @@ -1,6 +1,4 @@ // Checks that lifetimes cannot be interspersed between consts and types. -// revisions: full min -#![feature(const_generics_defaults)] struct Foo(&'a (), T); //~^ Error lifetime parameters must be declared prior to const parameters diff --git a/src/test/ui/const-generics/defaults/intermixed-lifetime.stderr b/src/test/ui/const-generics/defaults/intermixed-lifetime.stderr new file mode 100644 index 00000000000..e27976deb2b --- /dev/null +++ b/src/test/ui/const-generics/defaults/intermixed-lifetime.stderr @@ -0,0 +1,14 @@ +error: lifetime parameters must be declared prior to const parameters + --> $DIR/intermixed-lifetime.rs:3:28 + | +LL | struct Foo(&'a (), T); + | -----------------^^---------- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T = u32>` + +error: lifetime parameters must be declared prior to type parameters + --> $DIR/intermixed-lifetime.rs:6:37 + | +LL | struct Bar(&'a (), T); + | --------------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const N: usize, T = u32>` + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/const-generics/defaults/mismatch.rs b/src/test/ui/const-generics/defaults/mismatch.rs index 4ae93a9166d..fce4ec4edda 100644 --- a/src/test/ui/const-generics/defaults/mismatch.rs +++ b/src/test/ui/const-generics/defaults/mismatch.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - pub struct Example; pub struct Example2(T); pub struct Example3(T); diff --git a/src/test/ui/const-generics/defaults/mismatch.stderr b/src/test/ui/const-generics/defaults/mismatch.stderr index 3c7f4fe3b28..36976819195 100644 --- a/src/test/ui/const-generics/defaults/mismatch.stderr +++ b/src/test/ui/const-generics/defaults/mismatch.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/mismatch.rs:9:28 + --> $DIR/mismatch.rs:7:28 | LL | let e: Example::<13> = (); | ------------- ^^ expected struct `Example`, found `()` @@ -10,7 +10,7 @@ LL | let e: Example::<13> = (); found unit type `()` error[E0308]: mismatched types - --> $DIR/mismatch.rs:12:34 + --> $DIR/mismatch.rs:10:34 | LL | let e: Example2:: = (); | ------------------- ^^ expected struct `Example2`, found `()` @@ -21,7 +21,7 @@ LL | let e: Example2:: = (); found unit type `()` error[E0308]: mismatched types - --> $DIR/mismatch.rs:15:34 + --> $DIR/mismatch.rs:13:34 | LL | let e: Example3::<13, u32> = (); | ------------------- ^^ expected struct `Example3`, found `()` @@ -32,7 +32,7 @@ LL | let e: Example3::<13, u32> = (); found unit type `()` error[E0308]: mismatched types - --> $DIR/mismatch.rs:18:28 + --> $DIR/mismatch.rs:16:28 | LL | let e: Example3::<7> = (); | ------------- ^^ expected struct `Example3`, found `()` @@ -43,7 +43,7 @@ LL | let e: Example3::<7> = (); found unit type `()` error[E0308]: mismatched types - --> $DIR/mismatch.rs:21:28 + --> $DIR/mismatch.rs:19:28 | LL | let e: Example4::<7> = (); | ------------- ^^ expected struct `Example4`, found `()` diff --git a/src/test/ui/const-generics/defaults/needs-feature.min.stderr b/src/test/ui/const-generics/defaults/needs-feature.min.stderr deleted file mode 100644 index 158fa2ec1c8..00000000000 --- a/src/test/ui/const-generics/defaults/needs-feature.min.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: type parameters must be declared prior to const parameters - --> $DIR/needs-feature.rs:7:26 - | -LL | struct A(T); - | -----------------^----- help: reorder the parameters: lifetimes, then types, then consts: `` - -error: aborting due to previous error - diff --git a/src/test/ui/const-generics/defaults/needs-feature.rs b/src/test/ui/const-generics/defaults/needs-feature.rs deleted file mode 100644 index 9ba8184e058..00000000000 --- a/src/test/ui/const-generics/defaults/needs-feature.rs +++ /dev/null @@ -1,12 +0,0 @@ -//[full] run-pass -// Verifies that having generic parameters after constants is not permitted without the -// `const_generics_defaults` feature. -// revisions: min full -#![cfg_attr(full, feature(const_generics_defaults))] - -struct A(T); -//[min]~^ ERROR type parameters must be declared prior - -fn main() { - let _: A<3> = A(0); -} diff --git a/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.rs b/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.rs index 933eacb312d..da087ffc3c4 100644 --- a/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.rs +++ b/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.rs @@ -1,4 +1,3 @@ -#![feature(const_generics_defaults)] struct Foo(&'a u32); //~^ Error lifetime parameters must be declared prior to const parameters diff --git a/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr b/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr index f50653fe9a1..55f5a535385 100644 --- a/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr +++ b/src/test/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr @@ -1,5 +1,5 @@ error: lifetime parameters must be declared prior to const parameters - --> $DIR/param-order-err-pretty-prints-default.rs:2:33 + --> $DIR/param-order-err-pretty-prints-default.rs:1:33 | LL | struct Foo(&'a u32); | ----------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const M: usize = 10>` diff --git a/src/test/ui/const-generics/defaults/pretty-printing-ast.rs b/src/test/ui/const-generics/defaults/pretty-printing-ast.rs index 0487668cd2a..e202d4e86a2 100644 --- a/src/test/ui/const-generics/defaults/pretty-printing-ast.rs +++ b/src/test/ui/const-generics/defaults/pretty-printing-ast.rs @@ -3,7 +3,6 @@ // compile-flags: -Z unpretty=expanded #![crate_type = "lib"] -#![feature(const_generics_defaults)] trait Foo {} diff --git a/src/test/ui/const-generics/defaults/pretty-printing-ast.stdout b/src/test/ui/const-generics/defaults/pretty-printing-ast.stdout index 9f65b8f25ba..99fe9d2e4b3 100644 --- a/src/test/ui/const-generics/defaults/pretty-printing-ast.stdout +++ b/src/test/ui/const-generics/defaults/pretty-printing-ast.stdout @@ -5,7 +5,6 @@ // compile-flags: -Z unpretty=expanded #![crate_type = "lib"] -#![feature(const_generics_defaults)] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] diff --git a/src/test/ui/const-generics/defaults/repr-c-issue-82792.rs b/src/test/ui/const-generics/defaults/repr-c-issue-82792.rs index ca29ee94206..118da2723ac 100644 --- a/src/test/ui/const-generics/defaults/repr-c-issue-82792.rs +++ b/src/test/ui/const-generics/defaults/repr-c-issue-82792.rs @@ -2,8 +2,6 @@ // run-pass -#![feature(const_generics_defaults)] - #[repr(C)] pub struct Loaf { head: [T; N], diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait.rs b/src/test/ui/const-generics/defaults/rp_impl_trait.rs index 1447ebe5348..dde8eea4525 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait.rs +++ b/src/test/ui/const-generics/defaults/rp_impl_trait.rs @@ -1,6 +1,4 @@ // run-pass -#![feature(const_generics_defaults)] - struct Uwu; trait Trait {} diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs index c989fc8338b..308c121a941 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs +++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - struct Uwu; trait Trait {} diff --git a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr index cf28932177a..8c8bfdc0e48 100644 --- a/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr +++ b/src/test/ui/const-generics/defaults/rp_impl_trait_fail.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `Uwu<10_u32, 12_u32>: Trait` is not satisfied - --> $DIR/rp_impl_trait_fail.rs:8:14 + --> $DIR/rp_impl_trait_fail.rs:6:14 | LL | fn rawr() -> impl Trait { | ^^^^^^^^^^ the trait `Trait` is not implemented for `Uwu<10_u32, 12_u32>` @@ -8,7 +8,7 @@ LL | fn rawr() -> impl Trait { as Trait> error[E0277]: the trait bound `u32: Traitor` is not satisfied - --> $DIR/rp_impl_trait_fail.rs:19:26 + --> $DIR/rp_impl_trait_fail.rs:17:26 | LL | fn uwu() -> impl Traitor { | ^^^^^^^^^^^^^^^ the trait `Traitor` is not implemented for `u32` @@ -17,7 +17,7 @@ LL | fn uwu() -> impl Traitor { > error[E0277]: the trait bound `u64: Traitor<1_u8, 1_u8>` is not satisfied - --> $DIR/rp_impl_trait_fail.rs:24:13 + --> $DIR/rp_impl_trait_fail.rs:22:13 | LL | fn owo() -> impl Traitor { | ^^^^^^^^^^^^ the trait `Traitor<1_u8, 1_u8>` is not implemented for `u64` diff --git a/src/test/ui/const-generics/defaults/simple-defaults.rs b/src/test/ui/const-generics/defaults/simple-defaults.rs index bc01fe2656c..6a782d2238c 100644 --- a/src/test/ui/const-generics/defaults/simple-defaults.rs +++ b/src/test/ui/const-generics/defaults/simple-defaults.rs @@ -1,6 +1,5 @@ // run-pass // Checks that type param defaults are allowed after const params. -#![feature(const_generics_defaults)] #![allow(dead_code)] struct FixedOutput<'a, const N: usize, T=u32> { diff --git a/src/test/ui/const-generics/defaults/trait_objects.rs b/src/test/ui/const-generics/defaults/trait_objects.rs index e36f23fadb2..750e40313fb 100644 --- a/src/test/ui/const-generics/defaults/trait_objects.rs +++ b/src/test/ui/const-generics/defaults/trait_objects.rs @@ -1,6 +1,4 @@ // run-pass -#![feature(const_generics_defaults)] - trait Trait { fn uwu(&self) -> u8 { N diff --git a/src/test/ui/const-generics/defaults/trait_objects_fail.rs b/src/test/ui/const-generics/defaults/trait_objects_fail.rs index 09e4265a7a0..7ba12d02b6e 100644 --- a/src/test/ui/const-generics/defaults/trait_objects_fail.rs +++ b/src/test/ui/const-generics/defaults/trait_objects_fail.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - trait Trait { fn uwu(&self) -> u8 { N diff --git a/src/test/ui/const-generics/defaults/trait_objects_fail.stderr b/src/test/ui/const-generics/defaults/trait_objects_fail.stderr index b097c8cd4ba..13d03c2d42d 100644 --- a/src/test/ui/const-generics/defaults/trait_objects_fail.stderr +++ b/src/test/ui/const-generics/defaults/trait_objects_fail.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `u32: Trait` is not satisfied - --> $DIR/trait_objects_fail.rs:28:9 + --> $DIR/trait_objects_fail.rs:26:9 | LL | foo(&10_u32); | --- ^^^^^^^ the trait `Trait` is not implemented for `u32` @@ -11,7 +11,7 @@ LL | foo(&10_u32); = note: required for the cast to the object type `dyn Trait` error[E0277]: the trait bound `bool: Traitor<{_: u8}, {_: u8}>` is not satisfied - --> $DIR/trait_objects_fail.rs:30:9 + --> $DIR/trait_objects_fail.rs:28:9 | LL | bar(&true); | --- ^^^^^ the trait `Traitor<{_: u8}, {_: u8}>` is not implemented for `bool` diff --git a/src/test/ui/const-generics/defaults/type-default-const-param-name.rs b/src/test/ui/const-generics/defaults/type-default-const-param-name.rs index 8b35c5860d9..405664dedc7 100644 --- a/src/test/ui/const-generics/defaults/type-default-const-param-name.rs +++ b/src/test/ui/const-generics/defaults/type-default-const-param-name.rs @@ -1,6 +1,4 @@ // check-pass -#![feature(const_generics_defaults)] - struct N; struct Foo(T); diff --git a/src/test/ui/const-generics/defaults/wfness.rs b/src/test/ui/const-generics/defaults/wfness.rs index c171f292fd6..d366040ba3e 100644 --- a/src/test/ui/const-generics/defaults/wfness.rs +++ b/src/test/ui/const-generics/defaults/wfness.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - struct Ooopsies; //~^ error: evaluation of constant value failed diff --git a/src/test/ui/const-generics/defaults/wfness.stderr b/src/test/ui/const-generics/defaults/wfness.stderr index 2d400f9bbf5..facf0ae19f7 100644 --- a/src/test/ui/const-generics/defaults/wfness.stderr +++ b/src/test/ui/const-generics/defaults/wfness.stderr @@ -1,11 +1,11 @@ error[E0080]: evaluation of constant value failed - --> $DIR/wfness.rs:3:33 + --> $DIR/wfness.rs:1:33 | LL | struct Ooopsies; | ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow error[E0277]: the trait bound `(): Trait<2_u8>` is not satisfied - --> $DIR/wfness.rs:8:47 + --> $DIR/wfness.rs:6:47 | LL | struct WhereClause where (): Trait; | ^^^^^^^^ the trait `Trait<2_u8>` is not implemented for `()` @@ -14,7 +14,7 @@ LL | struct WhereClause where (): Trait; <() as Trait<3_u8>> error[E0277]: the trait bound `(): Trait<1_u8>` is not satisfied - --> $DIR/wfness.rs:16:13 + --> $DIR/wfness.rs:14:13 | LL | fn foo() -> DependentDefaultWfness { | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<1_u8>` is not implemented for `()` @@ -22,7 +22,7 @@ LL | fn foo() -> DependentDefaultWfness { = help: the following implementations were found: <() as Trait<3_u8>> note: required by a bound in `WhereClause` - --> $DIR/wfness.rs:8:47 + --> $DIR/wfness.rs:6:47 | LL | struct WhereClause where (): Trait; | ^^^^^^^^ required by this bound in `WhereClause` diff --git a/src/test/ui/const-generics/defaults/wrong-order.rs b/src/test/ui/const-generics/defaults/wrong-order.rs index 94e7367b1fb..d53d56f41e6 100644 --- a/src/test/ui/const-generics/defaults/wrong-order.rs +++ b/src/test/ui/const-generics/defaults/wrong-order.rs @@ -1,5 +1,3 @@ -#![feature(const_generics_defaults)] - struct A { //~^ ERROR generic parameters with a default must be trailing arg: T, diff --git a/src/test/ui/const-generics/defaults/wrong-order.stderr b/src/test/ui/const-generics/defaults/wrong-order.stderr index 143ce5c4fea..4d2628d034f 100644 --- a/src/test/ui/const-generics/defaults/wrong-order.stderr +++ b/src/test/ui/const-generics/defaults/wrong-order.stderr @@ -1,11 +1,11 @@ error: generic parameters with a default must be trailing - --> $DIR/wrong-order.rs:3:10 + --> $DIR/wrong-order.rs:1:10 | LL | struct A { | ^ error: generic parameters with a default must be trailing - --> $DIR/wrong-order.rs:8:18 + --> $DIR/wrong-order.rs:6:18 | LL | struct Foo(T); | ^ diff --git a/src/test/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs b/src/test/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs index 67fefd07ec0..9580f8a7fbc 100644 --- a/src/test/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs +++ b/src/test/ui/const-generics/generic_const_exprs/unused-complex-default-expr.rs @@ -1,5 +1,5 @@ // check-pass -#![feature(generic_const_exprs, const_generics_defaults)] +#![feature(generic_const_exprs)] #![allow(incomplete_features)] struct Foo; struct Bar(Foo); diff --git a/src/test/ui/const-generics/invalid-enum.rs b/src/test/ui/const-generics/invalid-enum.rs index bc3c09238f2..cb6d05349db 100644 --- a/src/test/ui/const-generics/invalid-enum.rs +++ b/src/test/ui/const-generics/invalid-enum.rs @@ -1,4 +1,4 @@ -#![feature(adt_const_params, const_generics_defaults)] +#![feature(adt_const_params)] #![allow(incomplete_features)] #[derive(PartialEq, Eq)] diff --git a/src/test/ui/const-generics/min_const_generics/const_default_first.rs b/src/test/ui/const-generics/min_const_generics/const_default_first.rs index bba4e68d4cc..eafafb8a274 100644 --- a/src/test/ui/const-generics/min_const_generics/const_default_first.rs +++ b/src/test/ui/const-generics/min_const_generics/const_default_first.rs @@ -1,6 +1,5 @@ #![crate_type = "lib"] -#![feature(const_generics_defaults)] -#![allow(incomplete_features, dead_code)] +#![allow(dead_code)] struct Both { //~^ ERROR: generic parameters with a default must be diff --git a/src/test/ui/const-generics/min_const_generics/const_default_first.stderr b/src/test/ui/const-generics/min_const_generics/const_default_first.stderr index 1a333642f0c..0d5a393cb7b 100644 --- a/src/test/ui/const-generics/min_const_generics/const_default_first.stderr +++ b/src/test/ui/const-generics/min_const_generics/const_default_first.stderr @@ -1,5 +1,5 @@ error: generic parameters with a default must be trailing - --> $DIR/const_default_first.rs:5:19 + --> $DIR/const_default_first.rs:4:19 | LL | struct Both { | ^ diff --git a/src/test/ui/const-generics/min_const_generics/default_function_param.rs b/src/test/ui/const-generics/min_const_generics/default_function_param.rs index b47dd2f618c..92d495ef665 100644 --- a/src/test/ui/const-generics/min_const_generics/default_function_param.rs +++ b/src/test/ui/const-generics/min_const_generics/default_function_param.rs @@ -1,5 +1,4 @@ #![crate_type = "lib"] -#![feature(const_generics_defaults)] fn foo() {} //~^ ERROR defaults for const parameters are diff --git a/src/test/ui/const-generics/min_const_generics/default_function_param.stderr b/src/test/ui/const-generics/min_const_generics/default_function_param.stderr index 11df8621faa..07dcd57dab8 100644 --- a/src/test/ui/const-generics/min_const_generics/default_function_param.stderr +++ b/src/test/ui/const-generics/min_const_generics/default_function_param.stderr @@ -1,5 +1,5 @@ error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions - --> $DIR/default_function_param.rs:4:14 + --> $DIR/default_function_param.rs:3:14 | LL | fn foo() {} | ^^^^ diff --git a/src/test/ui/const-generics/min_const_generics/default_trait_param.rs b/src/test/ui/const-generics/min_const_generics/default_trait_param.rs index 14bac473ed9..9cd5e3279ff 100644 --- a/src/test/ui/const-generics/min_const_generics/default_trait_param.rs +++ b/src/test/ui/const-generics/min_const_generics/default_trait_param.rs @@ -1,4 +1,4 @@ +// check-pass trait Foo {} -//~^ ERROR default values for const generic parameters are experimental fn main() {} diff --git a/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr b/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr deleted file mode 100644 index 5617b35ad01..00000000000 --- a/src/test/ui/const-generics/min_const_generics/default_trait_param.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: default values for const generic parameters are experimental - --> $DIR/default_trait_param.rs:1:28 - | -LL | trait Foo {} - | ^^^^^^ - | - = note: see issue #44580 for more information - = help: add `#![feature(const_generics_defaults)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/const-generics/min_const_generics/type_and_const_defaults.rs b/src/test/ui/const-generics/min_const_generics/type_and_const_defaults.rs index 2adfa9a8c4b..fa119c59f61 100644 --- a/src/test/ui/const-generics/min_const_generics/type_and_const_defaults.rs +++ b/src/test/ui/const-generics/min_const_generics/type_and_const_defaults.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(const_generics_defaults)] #![allow(dead_code)] struct Both { diff --git a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr index 17defbe86aa..a5e70f6b9e6 100644 --- a/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr +++ b/src/test/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.min.stderr @@ -3,8 +3,6 @@ error: generic parameters with a default must be trailing | LL | struct Bar(T); | ^ - | - = note: using type defaults and const parameters in the same parameter list is currently not permitted error: generic parameters may not be used in const operations --> $DIR/params-in-ct-in-ty-param-lazy-norm.rs:5:44 diff --git a/src/test/ui/const-generics/type-after-const-ok.rs b/src/test/ui/const-generics/type-after-const-ok.rs index 68d1940160c..f37b0b10233 100644 --- a/src/test/ui/const-generics/type-after-const-ok.rs +++ b/src/test/ui/const-generics/type-after-const-ok.rs @@ -1,11 +1,6 @@ -// [full] run-pass -// revisions: full min +// run-pass // Verifies that having generic parameters after constants is permitted -#![cfg_attr(full, feature(const_generics_defaults))] -#![cfg_attr(full, allow(incomplete_features))] - #[allow(dead_code)] struct A(T); -//[min]~^ ERROR type parameters must be declared prior to const parameters fn main() {} diff --git a/src/test/ui/derives/derive-macro-const-default.rs b/src/test/ui/derives/derive-macro-const-default.rs index 7c4ebca8746..ce80271d274 100644 --- a/src/test/ui/derives/derive-macro-const-default.rs +++ b/src/test/ui/derives/derive-macro-const-default.rs @@ -1,6 +1,4 @@ // check-pass -#![feature(const_generics_defaults)] - #[derive(Clone, PartialEq, Debug)] struct Example([T; N]); diff --git a/src/test/ui/generics/issue-59508-1.rs b/src/test/ui/generics/issue-59508-1.rs index 6376c429b28..7e1dd770704 100644 --- a/src/test/ui/generics/issue-59508-1.rs +++ b/src/test/ui/generics/issue-59508-1.rs @@ -1,8 +1,7 @@ #![allow(dead_code)] -#![feature(const_generics_defaults)] // This test checks that generic parameter re-ordering diagnostic suggestions mention that -// consts come after types and lifetimes when the `const_generics_defaults` feature is enabled. +// consts come after types and lifetimes. // We cannot run rustfix on this test because of the above const generics warning. struct A; diff --git a/src/test/ui/missing/missing-items/missing-type-parameter2.rs b/src/test/ui/missing/missing-items/missing-type-parameter2.rs index 15dc5ef797b..e9b32fb7198 100644 --- a/src/test/ui/missing/missing-items/missing-type-parameter2.rs +++ b/src/test/ui/missing/missing-items/missing-type-parameter2.rs @@ -1,6 +1,3 @@ -#![allow(incomplete_features)] -#![feature(const_generics_defaults)] - struct X(); impl X {} -- cgit 1.4.1-3-g733a5 From 433e13279de9b31d7abbf5d5c9603a9141cb02bd Mon Sep 17 00:00:00 2001 From: Ellen Date: Sat, 23 Oct 2021 17:46:47 +0100 Subject: bless tests --- .../feature-gate-const_generics_defaults.rs | 9 --------- .../feature-gate-const_generics_defaults.stderr | 21 --------------------- src/test/ui/generics/issue-59508-1.stderr | 2 +- src/test/ui/generics/issue-59508.stderr | 2 +- .../ui/generics/lifetime-before-type-params.stderr | 8 ++++---- ...ssue-80512-param-reordering-with-defaults.stderr | 2 +- .../missing-items/missing-type-parameter2.stderr | 16 ++++++++-------- src/test/ui/parser/issues/issue-14303-enum.stderr | 2 +- src/test/ui/parser/issues/issue-14303-fn-def.stderr | 2 +- src/test/ui/parser/issues/issue-14303-impl.stderr | 2 +- src/test/ui/parser/issues/issue-14303-struct.stderr | 2 +- src/test/ui/parser/issues/issue-14303-trait.stderr | 2 +- .../ui/suggestions/suggest-move-lifetimes.stderr | 8 ++++---- 13 files changed, 24 insertions(+), 54 deletions(-) delete mode 100644 src/test/ui/feature-gates/feature-gate-const_generics_defaults.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-const_generics_defaults.stderr (limited to 'src') diff --git a/src/test/ui/feature-gates/feature-gate-const_generics_defaults.rs b/src/test/ui/feature-gates/feature-gate-const_generics_defaults.rs deleted file mode 100644 index 5b5ccc88873..00000000000 --- a/src/test/ui/feature-gates/feature-gate-const_generics_defaults.rs +++ /dev/null @@ -1,9 +0,0 @@ -#[cfg(FALSE)] -struct A; -//~^ ERROR default values for const generic parameters are experimental - -#[cfg(FALSE)] -fn foo() {} -//~^ ERROR default values for const generic parameters are experimental - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-const_generics_defaults.stderr b/src/test/ui/feature-gates/feature-gate-const_generics_defaults.stderr deleted file mode 100644 index e2b48d793fd..00000000000 --- a/src/test/ui/feature-gates/feature-gate-const_generics_defaults.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0658]: default values for const generic parameters are experimental - --> $DIR/feature-gate-const_generics_defaults.rs:2:25 - | -LL | struct A; - | ^^^ - | - = note: see issue #44580 for more information - = help: add `#![feature(const_generics_defaults)]` to the crate attributes to enable - -error[E0658]: default values for const generic parameters are experimental - --> $DIR/feature-gate-const_generics_defaults.rs:6:22 - | -LL | fn foo() {} - | ^^^^^^^ - | - = note: see issue #44580 for more information - = help: add `#![feature(const_generics_defaults)]` to the crate attributes to enable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/generics/issue-59508-1.stderr b/src/test/ui/generics/issue-59508-1.stderr index df244f02dce..d162365ea4b 100644 --- a/src/test/ui/generics/issue-59508-1.stderr +++ b/src/test/ui/generics/issue-59508-1.stderr @@ -1,5 +1,5 @@ error: lifetime parameters must be declared prior to type parameters - --> $DIR/issue-59508-1.rs:11:25 + --> $DIR/issue-59508-1.rs:10:25 | LL | pub fn do_things() { | ----^^--^^----- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b: 'a, T>` diff --git a/src/test/ui/generics/issue-59508.stderr b/src/test/ui/generics/issue-59508.stderr index 33e967cebff..c52ae4182b8 100644 --- a/src/test/ui/generics/issue-59508.stderr +++ b/src/test/ui/generics/issue-59508.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-59508.rs:10:25 | LL | pub fn do_things() { - | ----^^--^^----- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b: 'a, T>` + | ----^^--^^----- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b: 'a, T>` error: aborting due to previous error diff --git a/src/test/ui/generics/lifetime-before-type-params.stderr b/src/test/ui/generics/lifetime-before-type-params.stderr index 047bc7f6d90..62d95e45329 100644 --- a/src/test/ui/generics/lifetime-before-type-params.stderr +++ b/src/test/ui/generics/lifetime-before-type-params.stderr @@ -2,25 +2,25 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:2:13 | LL | fn first() {} - | ----^^--^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | ----^^--^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:4:18 | LL | fn second<'a, T, 'b>() {} - | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:6:16 | LL | fn third() {} - | -------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` + | -------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/lifetime-before-type-params.rs:8:18 | LL | fn fourth<'a, T, 'b, U, 'c, V>() {} - | --------^^-----^^---- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, 'c, T, U, V>` + | --------^^-----^^---- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, 'c, T, U, V>` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-80512-param-reordering-with-defaults.stderr b/src/test/ui/issues/issue-80512-param-reordering-with-defaults.stderr index a1e9a903f81..119b1a0d207 100644 --- a/src/test/ui/issues/issue-80512-param-reordering-with-defaults.stderr +++ b/src/test/ui/issues/issue-80512-param-reordering-with-defaults.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-80512-param-reordering-with-defaults.rs:3:18 | LL | struct S(&'a T); - | ---------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T = ()>` + | ---------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T = ()>` error: aborting due to previous error diff --git a/src/test/ui/missing/missing-items/missing-type-parameter2.stderr b/src/test/ui/missing/missing-items/missing-type-parameter2.stderr index f955659f23d..3b930d7e4ec 100644 --- a/src/test/ui/missing/missing-items/missing-type-parameter2.stderr +++ b/src/test/ui/missing/missing-items/missing-type-parameter2.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `N` in this scope - --> $DIR/missing-type-parameter2.rs:6:8 + --> $DIR/missing-type-parameter2.rs:3:8 | LL | struct X(); | ------------------------ similarly named struct `X` defined here @@ -17,7 +17,7 @@ LL | impl X {} | +++ error[E0412]: cannot find type `N` in this scope - --> $DIR/missing-type-parameter2.rs:9:28 + --> $DIR/missing-type-parameter2.rs:6:28 | LL | impl X {} | - ^ @@ -34,7 +34,7 @@ LL | impl X {} | +++ error[E0412]: cannot find type `T` in this scope - --> $DIR/missing-type-parameter2.rs:14:20 + --> $DIR/missing-type-parameter2.rs:11:20 | LL | struct X(); | ------------------------ similarly named struct `X` defined here @@ -52,7 +52,7 @@ LL | fn foo(_: T) where T: Send {} | +++ error[E0412]: cannot find type `T` in this scope - --> $DIR/missing-type-parameter2.rs:14:11 + --> $DIR/missing-type-parameter2.rs:11:11 | LL | struct X(); | ------------------------ similarly named struct `X` defined here @@ -70,7 +70,7 @@ LL | fn foo(_: T) where T: Send {} | +++ error[E0412]: cannot find type `A` in this scope - --> $DIR/missing-type-parameter2.rs:18:24 + --> $DIR/missing-type-parameter2.rs:15:24 | LL | struct X(); | ------------------------ similarly named struct `X` defined here @@ -88,7 +88,7 @@ LL | fn bar(_: A) {} | +++ error[E0747]: unresolved item provided when a constant was expected - --> $DIR/missing-type-parameter2.rs:6:8 + --> $DIR/missing-type-parameter2.rs:3:8 | LL | impl X {} | ^ @@ -99,13 +99,13 @@ LL | impl X<{ N }> {} | + + error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions - --> $DIR/missing-type-parameter2.rs:9:15 + --> $DIR/missing-type-parameter2.rs:6:15 | LL | impl X {} | ^ error[E0747]: unresolved item provided when a constant was expected - --> $DIR/missing-type-parameter2.rs:9:28 + --> $DIR/missing-type-parameter2.rs:6:28 | LL | impl X {} | ^ diff --git a/src/test/ui/parser/issues/issue-14303-enum.stderr b/src/test/ui/parser/issues/issue-14303-enum.stderr index bcecd75b1ab..55cef4cabac 100644 --- a/src/test/ui/parser/issues/issue-14303-enum.stderr +++ b/src/test/ui/parser/issues/issue-14303-enum.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-enum.rs:1:15 | LL | enum X<'a, T, 'b> { - | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issues/issue-14303-fn-def.stderr b/src/test/ui/parser/issues/issue-14303-fn-def.stderr index 082c37e0be7..bacc922969d 100644 --- a/src/test/ui/parser/issues/issue-14303-fn-def.stderr +++ b/src/test/ui/parser/issues/issue-14303-fn-def.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-fn-def.rs:1:15 | LL | fn foo<'a, T, 'b>(x: &'a T) {} - | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issues/issue-14303-impl.stderr b/src/test/ui/parser/issues/issue-14303-impl.stderr index 3b5615d2a9e..d6be02f70fd 100644 --- a/src/test/ui/parser/issues/issue-14303-impl.stderr +++ b/src/test/ui/parser/issues/issue-14303-impl.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-impl.rs:3:13 | LL | impl<'a, T, 'b> X {} - | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issues/issue-14303-struct.stderr b/src/test/ui/parser/issues/issue-14303-struct.stderr index dbd0b987dd1..fa62a39f241 100644 --- a/src/test/ui/parser/issues/issue-14303-struct.stderr +++ b/src/test/ui/parser/issues/issue-14303-struct.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-struct.rs:1:17 | LL | struct X<'a, T, 'b> { - | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/parser/issues/issue-14303-trait.stderr b/src/test/ui/parser/issues/issue-14303-trait.stderr index 7dfa62d823f..75cd67a9ded 100644 --- a/src/test/ui/parser/issues/issue-14303-trait.stderr +++ b/src/test/ui/parser/issues/issue-14303-trait.stderr @@ -2,7 +2,7 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/issue-14303-trait.rs:1:18 | LL | trait Foo<'a, T, 'b> {} - | --------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, T>` + | --------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, T>` error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-move-lifetimes.stderr b/src/test/ui/suggestions/suggest-move-lifetimes.stderr index 657914d1c8c..f52631caed1 100644 --- a/src/test/ui/suggestions/suggest-move-lifetimes.stderr +++ b/src/test/ui/suggestions/suggest-move-lifetimes.stderr @@ -2,25 +2,25 @@ error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:1:13 | LL | struct A { - | ----^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T>` + | ----^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:5:13 | LL | struct B { - | ----^^---- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` + | ----^^---- help: reorder the parameters: lifetimes, then consts and types: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:10:16 | LL | struct C { - | -------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, T, U>` + | -------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T, U>` error: lifetime parameters must be declared prior to type parameters --> $DIR/suggest-move-lifetimes.rs:15:16 | LL | struct D { - | -------^^--^^-----^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b, 'c, T, U, V>` + | -------^^--^^-----^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b, 'c, T, U, V>` error: aborting due to 4 previous errors -- cgit 1.4.1-3-g733a5 From 1e896df2fe8978b549e05e4b79a89456ee272715 Mon Sep 17 00:00:00 2001 From: Ellen Date: Sun, 12 Dec 2021 12:34:21 +0000 Subject: clippy owo --- src/tools/clippy/tests/ui/trailing_empty_array.rs | 1 - .../clippy/tests/ui/trailing_empty_array.stderr | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/tools/clippy/tests/ui/trailing_empty_array.rs b/src/tools/clippy/tests/ui/trailing_empty_array.rs index 501c9eb7651..c39b0bcaf22 100644 --- a/src/tools/clippy/tests/ui/trailing_empty_array.rs +++ b/src/tools/clippy/tests/ui/trailing_empty_array.rs @@ -1,5 +1,4 @@ #![warn(clippy::trailing_empty_array)] -#![feature(const_generics_defaults)] // Do lint: diff --git a/src/tools/clippy/tests/ui/trailing_empty_array.stderr b/src/tools/clippy/tests/ui/trailing_empty_array.stderr index d88aa0504b5..9e2bd31d9fa 100644 --- a/src/tools/clippy/tests/ui/trailing_empty_array.stderr +++ b/src/tools/clippy/tests/ui/trailing_empty_array.stderr @@ -1,5 +1,5 @@ error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:6:1 + --> $DIR/trailing_empty_array.rs:5:1 | LL | / struct RarelyUseful { LL | | field: i32, @@ -11,7 +11,7 @@ LL | | } = help: consider annotating `RarelyUseful` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:11:1 + --> $DIR/trailing_empty_array.rs:10:1 | LL | / struct OnlyField { LL | | first_and_last: [usize; 0], @@ -21,7 +21,7 @@ LL | | } = help: consider annotating `OnlyField` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:15:1 + --> $DIR/trailing_empty_array.rs:14:1 | LL | / struct GenericArrayType { LL | | field: i32, @@ -32,7 +32,7 @@ LL | | } = help: consider annotating `GenericArrayType` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:21:1 + --> $DIR/trailing_empty_array.rs:20:1 | LL | / struct OnlyAnotherAttribute { LL | | field: i32, @@ -43,7 +43,7 @@ LL | | } = help: consider annotating `OnlyAnotherAttribute` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:27:1 + --> $DIR/trailing_empty_array.rs:26:1 | LL | / struct OnlyADeriveAttribute { LL | | field: i32, @@ -54,7 +54,7 @@ LL | | } = help: consider annotating `OnlyADeriveAttribute` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:33:1 + --> $DIR/trailing_empty_array.rs:32:1 | LL | / struct ZeroSizedWithConst { LL | | field: i32, @@ -65,7 +65,7 @@ LL | | } = help: consider annotating `ZeroSizedWithConst` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:42:1 + --> $DIR/trailing_empty_array.rs:41:1 | LL | / struct ZeroSizedWithConstFunction { LL | | field: i32, @@ -76,7 +76,7 @@ LL | | } = help: consider annotating `ZeroSizedWithConstFunction` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:50:1 + --> $DIR/trailing_empty_array.rs:49:1 | LL | / struct ZeroSizedWithConstFunction2 { LL | | field: i32, @@ -87,7 +87,7 @@ LL | | } = help: consider annotating `ZeroSizedWithConstFunction2` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:55:1 + --> $DIR/trailing_empty_array.rs:54:1 | LL | struct ZeroSizedArrayWrapper([usize; 0]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -95,7 +95,7 @@ LL | struct ZeroSizedArrayWrapper([usize; 0]); = help: consider annotating `ZeroSizedArrayWrapper` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:57:1 + --> $DIR/trailing_empty_array.rs:56:1 | LL | struct TupleStruct(i32, [usize; 0]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -103,7 +103,7 @@ LL | struct TupleStruct(i32, [usize; 0]); = help: consider annotating `TupleStruct` with `#[repr(C)]` or another `repr` attribute error: trailing zero-sized array in a struct which is not marked with a `repr` attribute - --> $DIR/trailing_empty_array.rs:59:1 + --> $DIR/trailing_empty_array.rs:58:1 | LL | / struct LotsOfFields { LL | | f1: u32, -- cgit 1.4.1-3-g733a5