diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-11225-1.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-11225-1.rs b/src/test/ui/issues/auxiliary/issue-11225-1.rs new file mode 100644 index 000000000..2c6f899a0 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-11225-1.rs @@ -0,0 +1,18 @@ +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); +} |