about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorfee1-dead <ent3rm4n@gmail.com>2022-04-12 22:44:43 +1000
committerGitHub <noreply@github.com>2022-04-12 22:44:43 +1000
commit93e6020ed9d992fa6869dc7fa81544b193211df3 (patch)
tree4e412ea61cc08ea4bc9627eceeff4db09df69ea1 /src
parent305763ea60cc2ae4596215850b2aaf0b8423dc94 (diff)
parent3b4589a30914fbaf9bc0f1115dc7437523b1465b (diff)
downloadrust-93e6020ed9d992fa6869dc7fa81544b193211df3.tar.gz
rust-93e6020ed9d992fa6869dc7fa81544b193211df3.zip
Rollup merge of #95820 - OliverMD:95150, r=lcnr
simplify const params diagnostic on stable

Resolves #95150
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr9
-rw-r--r--src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs2
-rw-r--r--src/test/ui/const-generics/nested-type.min.stderr11
-rw-r--r--src/test/ui/const-generics/nested-type.rs2
4 files changed, 4 insertions, 20 deletions
diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
index b1141cf3bdf..9f6c7ccf3fe 100644
--- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
+++ b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.min.stderr
@@ -7,12 +7,5 @@ LL | fn test<const T: &'static dyn A>() {
    = note: the only supported types are integers, `bool` and `char`
    = help: more complex types are supported with `#![feature(adt_const_params)]`
 
-error[E0741]: `&'static (dyn A + 'static)` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
-  --> $DIR/issue-63322-forbid-dyn.rs:9:18
-   |
-LL | fn test<const T: &'static dyn A>() {
-   |                  ^^^^^^^^^^^^^^ `&'static (dyn A + 'static)` doesn't derive both `PartialEq` and `Eq`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0741`.
diff --git a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
index 01a6caa130f..116c3fcfb21 100644
--- a/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
+++ b/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
@@ -7,7 +7,7 @@ struct B;
 impl A for B {}
 
 fn test<const T: &'static dyn A>() {
-    //~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
+    //[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
     //[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden
     unimplemented!()
 }
diff --git a/src/test/ui/const-generics/nested-type.min.stderr b/src/test/ui/const-generics/nested-type.min.stderr
index 0e3c988ae4d..276ebf31ff8 100644
--- a/src/test/ui/const-generics/nested-type.min.stderr
+++ b/src/test/ui/const-generics/nested-type.min.stderr
@@ -14,14 +14,5 @@ LL | | }]>;
    = note: the only supported types are integers, `bool` and `char`
    = help: more complex types are supported with `#![feature(adt_const_params)]`
 
-error[E0015]: cannot call non-const fn `Foo::{constant#0}::Foo::<17_usize>::value` in constants
-  --> $DIR/nested-type.rs:15:5
-   |
-LL |     Foo::<17>::value()
-   |     ^^^^^^^^^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0015`.
diff --git a/src/test/ui/const-generics/nested-type.rs b/src/test/ui/const-generics/nested-type.rs
index 5240f5c3b0b..742340f430e 100644
--- a/src/test/ui/const-generics/nested-type.rs
+++ b/src/test/ui/const-generics/nested-type.rs
@@ -13,7 +13,7 @@ struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
     }
 
     Foo::<17>::value()
-    //~^ ERROR cannot call non-const fn
+    //[full]~^ ERROR cannot call non-const fn
 }]>;
 
 fn main() {}