Skip to content

Commit

Permalink
Rollup merge of #98334 - JohnTitor:issue-73727, r=compiler-errors
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
JohnTitor authored Jun 21, 2022
2 parents 65f74c6 + 31476e7 commit 880ac7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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<const X: &'static [u32]>() {}
| ^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -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<const X: &'static [u32]>() {}
//[min]~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter

fn main() {
a::<{&[]}>();
}

This file was deleted.

0 comments on commit 880ac7c

Please sign in to comment.