2019-11-04 00:00:00 +00:00
|
|
|
//@ check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
#![allow(unused_variables)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2014-10-02 21:52:06 +02:00
|
|
|
struct Foo<'a> {
|
|
|
|
|
i: &'a bool,
|
2015-03-25 17:06:52 -07:00
|
|
|
j: Option<&'a isize>,
|
2014-10-02 21:52:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<'a> Foo<'a> {
|
2015-03-25 17:06:52 -07:00
|
|
|
fn bar(&mut self, j: &isize) {
|
2014-10-02 21:52:06 +02:00
|
|
|
let child = Foo {
|
|
|
|
|
i: self.i,
|
|
|
|
|
j: Some(j)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|