From 246f239d9f40f633160f0c18f87a20922d4e77bb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:37 +0200 Subject: Merging debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- src/test/ui/coherence/issue-100191.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/ui/coherence/issue-100191.rs (limited to 'src/test/ui/coherence/issue-100191.rs') diff --git a/src/test/ui/coherence/issue-100191.rs b/src/test/ui/coherence/issue-100191.rs new file mode 100644 index 000000000..e8597fde5 --- /dev/null +++ b/src/test/ui/coherence/issue-100191.rs @@ -0,0 +1,21 @@ +#![crate_type = "lib"] +#![feature(specialization, with_negative_coherence)] +#![allow(incomplete_features)] + +trait X {} +trait Y: X {} +trait Z { + type Assoc: Y; +} +struct A(T); + +impl Y for T where T: X {} +impl Z for A { + type Assoc = T; +} + +// this impl is invalid, but causes an ICE anyway +impl From< as Z>::Assoc> for T {} +//~^ ERROR type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct`) + +fn main() {} -- cgit v1.2.3