diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-5988.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5988.rs b/src/test/ui/issues/issue-5988.rs new file mode 100644 index 000000000..303fb4fbc --- /dev/null +++ b/src/test/ui/issues/issue-5988.rs @@ -0,0 +1,24 @@ +// run-pass +// pretty-expanded FIXME #23616 + +trait B { + fn f(&self); +} + +trait T : B { +} + +struct A; + +impl<U: T> B for U { + fn f(&self) { } +} + +impl T for A { +} + +fn main() { + let a = A; + let br = &a as &dyn B; + br.f(); +} |