rust/tests/ui/lint/issue-112489.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
189 B
Rust
Raw Normal View History

// 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();
}