Add a full regression test for #73727
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
parent
42dcf70f99
commit
31476e7096
@ -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]>() {}
|
||||
| ^^^^^^^^^^^^^^
|
@ -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::<{&[]}>();
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
fn a<const X: &'static [u32]>() {}
|
||||
//~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter
|
||||
|
||||
fn main() {
|
||||
a::<{&[]}>();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user