diff options
Diffstat (limited to 'tests/ui/issues/issue-17771.rs')
-rw-r--r-- | tests/ui/issues/issue-17771.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-17771.rs b/tests/ui/issues/issue-17771.rs new file mode 100644 index 000000000..2f6464668 --- /dev/null +++ b/tests/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() { +} |