Skip to content

Commit 880ac7c

Browse files
authored
Rollup merge of #98334 - JohnTitor:issue-73727, r=compiler-errors
Add a full regression test for #73727 Closes #73727 This also moves a test to the `issues` directory as it's also tested on the adt_const_params feature. r? ```@compiler-errors``` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2 parents 65f74c6 + 31476e7 commit 880ac7c

3 files changed

+15
-7
lines changed

src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.stderr src/test/ui/const-generics/issues/issue-73727-static-reference-array-const-param.min.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: `&'static [u32]` is forbidden as the type of a const generic parameter
2-
--> $DIR/static-reference-array-const-param.rs:1:15
2+
--> $DIR/issue-73727-static-reference-array-const-param.rs:9:15
33
|
44
LL | fn a<const X: &'static [u32]>() {}
55
| ^^^^^^^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Regression test for #73727
2+
3+
// revisions: full min
4+
//[full]check-pass
5+
6+
#![cfg_attr(full, feature(adt_const_params))]
7+
#![cfg_attr(full, allow(incomplete_features))]
8+
9+
fn a<const X: &'static [u32]>() {}
10+
//[min]~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter
11+
12+
fn main() {
13+
a::<{&[]}>();
14+
}

src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs

-6
This file was deleted.

0 commit comments

Comments
 (0)