mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
18 lines
194 B
Rust
18 lines
194 B
Rust
// check-pass
|
|
|
|
use std::iter::once;
|
|
|
|
struct Foo {
|
|
x: i32,
|
|
}
|
|
|
|
impl Foo {
|
|
fn inside(&self) -> impl Iterator<Item = &i32> {
|
|
once(&self.x)
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
println!("hi");
|
|
}
|