24 lines
388 B
Rust
24 lines
388 B
Rust
//type t = { a: int };
|
|
// type t = { a: bool };
|
|
type t = bool;
|
|
|
|
trait it {
|
|
fn f();
|
|
}
|
|
|
|
impl t: it {
|
|
fn f() { }
|
|
}
|
|
|
|
fn main() {
|
|
// let x = ({a: 4i} as it);
|
|
// let y = @({a: 4i});
|
|
// let z = @({a: 4i} as it);
|
|
// let z = @({a: true} as it);
|
|
let z = @(true as it);
|
|
// x.f();
|
|
// y.f();
|
|
// (*z).f();
|
|
#error["ok so far..."];
|
|
z.f(); //segfault
|
|
}
|