Change type param -> generic param
This commit is contained in:
parent
ee5ed4a88d
commit
da189d9514
6 changed files with 60 additions and 23 deletions
|
@ -0,0 +1,16 @@
|
|||
#![feature(const_generics_defaults)]
|
||||
|
||||
struct Struct<const N: usize = { Self; 10 }>;
|
||||
//~^ ERROR generic parameters cannot use `Self` in their defaults [E0735]
|
||||
|
||||
enum Enum<const N: usize = { Self; 10 }> { }
|
||||
//~^ ERROR generic parameters cannot use `Self` in their defaults [E0735]
|
||||
|
||||
union Union<const N: usize = { Self; 10 }> { not_empty: () }
|
||||
//~^ ERROR generic parameters cannot use `Self` in their defaults [E0735]
|
||||
|
||||
fn main() {
|
||||
let _: Struct;
|
||||
let _: Enum;
|
||||
let _: Union;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue