From 31476e70969fce766519682072da37a65995ccf7 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 21 Jun 2022 19:08:48 +0900 Subject: [PATCH] Add a full regression test for #73727 Signed-off-by: Yuki Okushi --- ...-static-reference-array-const-param.min.stderr} | 2 +- ...sue-73727-static-reference-array-const-param.rs | 14 ++++++++++++++ .../static-reference-array-const-param.rs | 6 ------ 3 files changed, 15 insertions(+), 7 deletions(-) rename src/test/ui/const-generics/{min_const_generics/static-reference-array-const-param.stderr => issues/issue-73727-static-reference-array-const-param.min.stderr} (84%) create mode 100644 src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs delete mode 100644 src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs diff --git a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr b/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr similarity index 84% rename from src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr rename to src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr index f30693221a513..0a7db62472a9f 100644 --- a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr +++ b/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr @@ -1,5 +1,5 @@ error: `&'static [u32]` is forbidden as the type of a const generic parameter - --> $DIR/static-reference-array-const-param.rs:1:15 + --> $DIR/issue-73727-static-reference-array-const-param.rs:9:15 | LL | fn a() {} | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs b/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs new file mode 100644 index 0000000000000..f0d604835cbb6 --- /dev/null +++ b/src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.rs @@ -0,0 +1,14 @@ +// Regression test for #73727 + +// revisions: full min +//[full]check-pass + +#![cfg_attr(full, feature(adt_const_params))] +#![cfg_attr(full, allow(incomplete_features))] + +fn a() {} +//[min]~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter + +fn main() { + a::<{&[]}>(); +} diff --git a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs deleted file mode 100644 index 7518dc59e599c..0000000000000 --- a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn a() {} -//~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter - -fn main() { - a::<{&[]}>(); -}