From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/issues/issue-37291/auxiliary/lib.rs | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tests/ui/issues/issue-37291/auxiliary/lib.rs (limited to 'tests/ui/issues/issue-37291/auxiliary/lib.rs') diff --git a/tests/ui/issues/issue-37291/auxiliary/lib.rs b/tests/ui/issues/issue-37291/auxiliary/lib.rs new file mode 100644 index 000000000..1b163ee13 --- /dev/null +++ b/tests/ui/issues/issue-37291/auxiliary/lib.rs @@ -0,0 +1,42 @@ +#![crate_type = "lib"] + +use std::ops::Mul; + +pub trait A {} +pub trait B { + type AT: A; +} +pub trait C { + type BT: B; +} + +pub struct AV; +impl A for AV {} + +pub struct BV; +impl B for BV { + type AT = AV; +} + +pub struct CV; +impl C for CV { + type BT = BV; +} + +pub struct WrapperB(pub T); +pub struct WrapperC(pub T); + +impl Mul::AT>> for WrapperC + where C1: C +{ + type Output = u8; + fn mul(self, _: WrapperB<::AT>) -> Self::Output { + loop {} + } +} +impl Mul> for WrapperC { + type Output = u8; + fn mul(self, _: WrapperC) -> Self::Output { + loop {} + } +} -- cgit v1.2.3