ace436743f
Without it non-WF types could pass typeck and then later fail in MIR/const eval
17 lines
184 B
Rust
17 lines
184 B
Rust
trait Trait {
|
|
fn dummy(&self) { }
|
|
}
|
|
|
|
struct Foo<T:Trait> {
|
|
x: T,
|
|
}
|
|
|
|
static X: Foo<usize> = Foo {
|
|
//~^ ERROR E0277
|
|
//~| ERROR E0277
|
|
x: 1, //~ ERROR: E0277
|
|
};
|
|
|
|
fn main() {
|
|
}
|