2017-07-23 08:20:14 -05:00
|
|
|
struct Foo {
|
|
|
|
x: isize,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn hi(&self) -> bool {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-01-06 09:33:05 -06:00
|
|
|
while || Foo { //~ ERROR expected value, found struct `Foo`
|
2017-07-23 08:20:14 -05:00
|
|
|
x: 3 //~ ERROR expected type, found `3`
|
|
|
|
}.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
|
2019-01-06 09:33:05 -06:00
|
|
|
//~| ERROR no method named `hi` found for type `()` in the current scope
|
2017-07-23 08:20:14 -05:00
|
|
|
println!("yo");
|
|
|
|
}
|
|
|
|
}
|