diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-14229.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-14229.rs b/src/test/ui/issues/issue-14229.rs new file mode 100644 index 000000000..477a2c650 --- /dev/null +++ b/src/test/ui/issues/issue-14229.rs @@ -0,0 +1,21 @@ +// run-pass +trait Foo: Sized { + fn foo(self) {} +} + +trait Bar: Sized { + fn bar(self) {} +} + +struct S; + +impl<'l> Foo for &'l S {} + +impl<T: Foo> Bar for T {} + +fn main() { + let s = S; + s.foo(); + (&s).bar(); + s.bar(); +} |