From a2df1a544937d8dc8658d752cd0ef9de3e74a824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 21 Jul 2022 22:49:03 +0200 Subject: [PATCH 1/2] move 96572-2.rs back to ICEs again since the fix was reverted --- {fixed => ices}/96572-2.rs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {fixed => ices}/96572-2.rs (100%) diff --git a/fixed/96572-2.rs b/ices/96572-2.rs similarity index 100% rename from fixed/96572-2.rs rename to ices/96572-2.rs From bd8234c9081c0585772f9351c70dd4fb1f7e134c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 21 Jul 2022 22:53:41 +0200 Subject: [PATCH 2/2] add 3 ices https://github.com/rust-lang/rust/issues/99575 https://github.com/rust-lang/rust/issues/99566 https://github.com/rust-lang/rust/issues/99387 --- ices/99387.rs | 22 ++++++++++++++++++++++ ices/99566.rs | 5 +++++ ices/99575.rs | 28 ++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 ices/99387.rs create mode 100644 ices/99566.rs create mode 100644 ices/99575.rs diff --git a/ices/99387.rs b/ices/99387.rs new file mode 100644 index 00000000..9ce03231 --- /dev/null +++ b/ices/99387.rs @@ -0,0 +1,22 @@ +#![feature(type_alias_impl_trait)] +#![allow(private_in_public)] + +pub type Successors<'a> = impl Iterator; + +pub fn f<'a>() -> Successors<'a> { + None.into_iter() +} + +trait Tr { + type Item; +} + +impl<'a> Tr for &'a () { + type Item = Successors<'a>; +} + +pub fn ohno<'a>() -> <&'a () as Tr>::Item { + None.into_iter() +} + +fn main() {} diff --git a/ices/99566.rs b/ices/99566.rs new file mode 100644 index 00000000..b90847bd --- /dev/null +++ b/ices/99566.rs @@ -0,0 +1,5 @@ +#![feature(closure_lifetime_binder)] + +fn main() { + for || -> () {}; +} diff --git a/ices/99575.rs b/ices/99575.rs new file mode 100644 index 00000000..de2e6692 --- /dev/null +++ b/ices/99575.rs @@ -0,0 +1,28 @@ +use std::pin::Pin; + +fn main() { + let a = Enum::A(Pin::new(Box::new(A()))); + let b = Enum::B(Pin::new(Box::new(B()))); + println!("{:?} {:?}", a, b); +} + +#[derive(Debug)] +enum Enum { + A(Pin>), + B(Pin>), +} + +#[derive(Debug)] +struct A(); + +impl Drop for Pin> { + fn drop(&mut self) {} +} + +#[derive(Debug)] +struct B(); + +// UNCOMMENT TO FIX COMPILER ERROR +// impl Drop for Pin> { +// fn drop(&mut self) {} +// }