2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 20:13:15 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2015-02-12 15:29:52 +00:00
|
|
|
trait Aaa { fn dummy(&self) { } }
|
2014-12-07 15:22:06 +00:00
|
|
|
|
2019-05-28 18:47:21 +00:00
|
|
|
impl<'a> Aaa for &'a mut (dyn Aaa + 'a) {}
|
2014-12-07 15:22:06 +00:00
|
|
|
|
|
|
|
struct Bar<'a> {
|
2019-05-28 18:47:21 +00:00
|
|
|
writer: &'a mut (dyn Aaa + 'a),
|
2014-12-07 15:22:06 +00:00
|
|
|
}
|
|
|
|
|
2019-05-28 18:47:21 +00:00
|
|
|
fn baz(_: &mut dyn Aaa) {
|
2014-12-07 15:22:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn foo<'a>(mut bar: Bar<'a>) {
|
|
|
|
baz(&mut bar.writer);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|