summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/issue-112489.rs
blob: 559edf0e4f23caffd685063a3a932661bbad6020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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();
}