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
|
|
|
while Foo { //~ ERROR struct literals are not allowed here
|
|
|
|
x: 3
|
|
|
|
}.hi() {
|
2014-06-13 21:09:12 -05:00
|
|
|
println!("yo");
|
|
|
|
}
|
2023-08-28 04:30:48 -05:00
|
|
|
while let true = Foo { //~ ERROR struct literals are not allowed here
|
|
|
|
x: 3
|
|
|
|
}.hi() {
|
|
|
|
println!("yo");
|
|
|
|
}
|
2014-06-13 21:09:12 -05:00
|
|
|
}
|