diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-17771.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-17771.rs b/src/test/ui/issues/issue-17771.rs new file mode 100644 index 000000000..2f6464668 --- /dev/null +++ b/src/test/ui/issues/issue-17771.rs @@ -0,0 +1,21 @@ +// run-pass +#![allow(dead_code)] +// pretty-expanded FIXME #23616 + +trait Aaa { fn dummy(&self) { } } + +impl<'a> Aaa for &'a mut (dyn Aaa + 'a) {} + +struct Bar<'a> { + writer: &'a mut (dyn Aaa + 'a), +} + +fn baz(_: &mut dyn Aaa) { +} + +fn foo<'a>(mut bar: Bar<'a>) { + baz(&mut bar.writer); +} + +fn main() { +} |