From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/span/issue-37767.rs | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/ui/span/issue-37767.rs (limited to 'tests/ui/span/issue-37767.rs') diff --git a/tests/ui/span/issue-37767.rs b/tests/ui/span/issue-37767.rs new file mode 100644 index 000000000..9e34c2c1f --- /dev/null +++ b/tests/ui/span/issue-37767.rs @@ -0,0 +1,41 @@ +trait A { + fn foo(&mut self) {} +} + +trait B : A { + fn foo(&mut self) {} +} + +fn bar(a: &T) { + a.foo() //~ ERROR multiple applicable items +} + +trait C { + fn foo(&self) {} +} + +trait D : C { + fn foo(&self) {} +} + +fn quz(a: &T) { + a.foo() //~ ERROR multiple applicable items +} + +trait E : Sized { + fn foo(self) {} +} + +trait F : E { + fn foo(self) {} +} + +fn foo(a: T) { + a.foo() //~ ERROR multiple applicable items +} + +fn pass(a: &T) { + a.foo() +} + +fn main() {} -- cgit v1.2.3