mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
19 lines
260 B
Rust
19 lines
260 B
Rust
//@ known-bug: #124004
|
|
|
|
#![feature(box_patterns)]
|
|
|
|
use std::ops::{ Deref };
|
|
|
|
struct X(dyn Iterator<Item = &'a ()>);
|
|
|
|
impl Deref for X {
|
|
type Target = isize;
|
|
|
|
fn deref(&self) -> &isize {
|
|
let &X(box ref x) = self;
|
|
x
|
|
}
|
|
}
|
|
|
|
fn main() {}
|