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 --- src/test/ui/mir/issue-75053.rs | 49 ------------------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 src/test/ui/mir/issue-75053.rs (limited to 'src/test/ui/mir/issue-75053.rs') diff --git a/src/test/ui/mir/issue-75053.rs b/src/test/ui/mir/issue-75053.rs deleted file mode 100644 index cb56eaa0b..000000000 --- a/src/test/ui/mir/issue-75053.rs +++ /dev/null @@ -1,49 +0,0 @@ -// compile-flags: -Z mir-opt-level=3 - -#![feature(type_alias_impl_trait, rustc_attrs)] - -use std::marker::PhantomData; - -trait MyIndex { - type O; - fn my_index(self) -> Self::O; -} -trait MyFrom: Sized { - type Error; - fn my_from(value: T) -> Result; -} - -trait F {} -impl F for () {} -type DummyT = impl F; -fn _dummy_t() -> DummyT {} - -struct Phantom1(PhantomData); -struct Phantom2(PhantomData); -struct Scope(Phantom2>); - -impl Scope { - fn new() -> Self { - unimplemented!() - } -} - -impl MyFrom> for Phantom1 { - type Error = (); - fn my_from(_: Phantom2) -> Result { - unimplemented!() - } -} - -impl>>, U> MyIndex> for Scope { - type O = T; - fn my_index(self) -> Self::O { - MyFrom::my_from(self.0).ok().unwrap() - } -} - -#[rustc_error] -fn main() { - //~^ ERROR - let _pos: Phantom1> = Scope::new().my_index(); -} -- cgit v1.2.3