2014-06-13 21:09:12 -05:00
|
|
|
struct Foo {
|
2015-01-08 04:54:35 -06:00
|
|
|
x: isize,
|
2014-06-13 21:09:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn hi(&self) -> bool {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-04-14 19:09:03 -05:00
|
|
|
if Foo { //~ ERROR struct literals are not allowed here
|
|
|
|
x: 3
|
|
|
|
}.hi() {
|
2014-06-13 21:09:12 -05:00
|
|
|
println!("yo");
|
|
|
|
}
|
|
|
|
}
|