mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
15 lines
445 B
Rust
15 lines
445 B
Rust
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;
|
|
}
|