2014-06-13 19:09:12 -07:00
|
|
|
struct Foo {
|
2015-01-08 21:54:35 +11:00
|
|
|
x: isize,
|
2014-06-13 19:09:12 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn hi(&self) -> bool {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-01-06 18:33:05 +03:00
|
|
|
for x in Foo { //~ ERROR expected value, found struct `Foo`
|
2015-02-01 09:59:46 +02:00
|
|
|
x: 3 //~ ERROR expected type, found `3`
|
2016-03-07 21:17:31 -05:00
|
|
|
}.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
|
2014-06-13 19:09:12 -07:00
|
|
|
println!("yo");
|
|
|
|
}
|
|
|
|
}
|