diff options
Diffstat (limited to 'tests/ui/lint/issue-112489.rs')
-rw-r--r-- | tests/ui/lint/issue-112489.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/lint/issue-112489.rs b/tests/ui/lint/issue-112489.rs new file mode 100644 index 000000000..559edf0e4 --- /dev/null +++ b/tests/ui/lint/issue-112489.rs @@ -0,0 +1,17 @@ +// check-pass +use std::borrow::Borrow; + +struct S; + +trait T: Sized { + fn foo(self) {} +} + +impl T for S {} +impl T for &S {} + +fn main() { + let s = S; + s.borrow().foo(); + s.foo(); +} |