about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/derives/deriving-with-repr-packed.stderr4
-rw-r--r--src/test/ui/feature-gates/feature-gate-const_generics.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-const_generics.stderr16
3 files changed, 4 insertions, 18 deletions
diff --git a/src/test/ui/derives/deriving-with-repr-packed.stderr b/src/test/ui/derives/deriving-with-repr-packed.stderr
index 4ab14a1df84..9d96908a056 100644
--- a/src/test/ui/derives/deriving-with-repr-packed.stderr
+++ b/src/test/ui/derives/deriving-with-repr-packed.stderr
@@ -1,4 +1,4 @@
-error: #[derive] can't be used on a #[repr(packed)] struct with type parameters (error E0133)
+error: #[derive] can't be used on a #[repr(packed)] struct with type or const parameters (error E0133)
   --> $DIR/deriving-with-repr-packed.rs:8:16
    |
 LL | #[derive(Copy, Clone, PartialEq, Eq)]
@@ -12,7 +12,7 @@ LL | #![deny(safe_packed_borrows)]
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #46043 <https://github.com/rust-lang/rust/issues/46043>
 
-error: #[derive] can't be used on a #[repr(packed)] struct with type parameters (error E0133)
+error: #[derive] can't be used on a #[repr(packed)] struct with type or const parameters (error E0133)
   --> $DIR/deriving-with-repr-packed.rs:8:23
    |
 LL | #[derive(Copy, Clone, PartialEq, Eq)]
diff --git a/src/test/ui/feature-gates/feature-gate-const_generics.rs b/src/test/ui/feature-gates/feature-gate-const_generics.rs
index 907e00b11e5..fe1ded1c4bb 100644
--- a/src/test/ui/feature-gates/feature-gate-const_generics.rs
+++ b/src/test/ui/feature-gates/feature-gate-const_generics.rs
@@ -1,7 +1,5 @@
 fn foo<const X: ()>() {} //~ ERROR const generics are unstable
-//~^ const generics in any position are currently unsupported
 
 struct Foo<const X: usize>([(); X]); //~ ERROR const generics are unstable
-//~^ const generics in any position are currently unsupported
 
 fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-const_generics.stderr b/src/test/ui/feature-gates/feature-gate-const_generics.stderr
index 3ab1aa2367f..bd86a4197a7 100644
--- a/src/test/ui/feature-gates/feature-gate-const_generics.stderr
+++ b/src/test/ui/feature-gates/feature-gate-const_generics.stderr
@@ -7,25 +7,13 @@ LL | fn foo<const X: ()>() {} //~ ERROR const generics are unstable
    = help: add #![feature(const_generics)] to the crate attributes to enable
 
 error[E0658]: const generics are unstable (see issue #44580)
-  --> $DIR/feature-gate-const_generics.rs:4:18
+  --> $DIR/feature-gate-const_generics.rs:3:18
    |
 LL | struct Foo<const X: usize>([(); X]); //~ ERROR const generics are unstable
    |                  ^
    |
    = help: add #![feature(const_generics)] to the crate attributes to enable
 
-error: const generics in any position are currently unsupported
-  --> $DIR/feature-gate-const_generics.rs:1:14
-   |
-LL | fn foo<const X: ()>() {} //~ ERROR const generics are unstable
-   |              ^
-
-error: const generics in any position are currently unsupported
-  --> $DIR/feature-gate-const_generics.rs:4:18
-   |
-LL | struct Foo<const X: usize>([(); X]); //~ ERROR const generics are unstable
-   |                  ^
-
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0658`.