Skip to content

Commit

Permalink
Rollup merge of rust-lang#98334 - JohnTitor:issue-73727, r=compiler-e…
Browse files Browse the repository at this point in the history
…rrors

Add a full regression test for rust-lang#73727

Closes rust-lang#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
Dylan-DPC authored Jun 21, 2022
2 parents 223d7f8 + 31476e7 commit 2b1ce20
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 2b1ce20

Please sign in to comment.