rust/src/test/ui/issues/auxiliary/issue-11225-1.rs
2019-07-27 18:56:16 +03:00

19 lines
285 B
Rust

mod inner {
pub trait Trait {
fn f(&self) { f(); }
fn f_ufcs(&self) { f_ufcs(); }
}
impl Trait for isize {}
fn f() {}
fn f_ufcs() {}
}
pub fn foo<T: inner::Trait>(t: T) {
t.f();
}
pub fn foo_ufcs<T: inner::Trait>(t: T) {
T::f_ufcs(&t);
}