rust/tests/ui/issues/issue-17771.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
306 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
//@ pretty-expanded FIXME #23616
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() {
}