rust/tests/ui/reachable/auxiliary/issue-11225-1.rs
2023-01-11 09:32:08 +00: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);
}