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 --- ...trivial-bounds-inconsistent-projection-error.rs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.rs (limited to 'tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.rs') diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.rs b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.rs new file mode 100644 index 000000000..e0f299630 --- /dev/null +++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.rs @@ -0,0 +1,23 @@ +#![feature(trivial_bounds)] +#![allow(unused)] + +struct B; + +trait A { + type X; + fn get_x() -> Self::X; +} + +impl A for B { + type X = u8; + fn get_x() -> u8 { 0 } +} + +fn global_bound_is_hidden() -> u8 +where + B: A +{ + B::get_x() //~ ERROR +} + +fn main () {} -- cgit v1.2.3