Sign in
fuchsia
/
third_party
/
rust
/
d782f09ae0b88a73a69e2fa3169222cdbc47d4ec
/
.
/
src
/
test
/
ui
/
for
/
for-loop-bogosity.rs
blob: 9341dea0974b4eb5e86e80a6d6e0ce39980320e6 [
file
] [
log
] [
blame
]
struct
MyStruct
{
x
:
isize
,
y
:
isize
,
}
impl
MyStruct
{
fn
next
(&
mut
self
)
->
Option
<
isize
>
{
Some
(
self
.
x
)
}
}
pub
fn
main
()
{
let
mut
bogus
=
MyStruct
{
x
:
1
,
y
:
2
,
};
for
x in bogus
{
//~^ ERROR `MyStruct` is not an iterator
drop
(
x
);
}
}