Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

add ices #1353

Merged
merged 2 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
22 changes: 22 additions & 0 deletions ices/99387.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#![feature(type_alias_impl_trait)]
#![allow(private_in_public)]

pub type Successors<'a> = impl Iterator<Item = &'a ()>;

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() {}
5 changes: 5 additions & 0 deletions ices/99566.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#![feature(closure_lifetime_binder)]

fn main() {
for<const N: i32> || -> () {};
}
28 changes: 28 additions & 0 deletions ices/99575.rs
Original file line number Diff line number Diff line change
@@ -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<Box<A>>),
B(Pin<Box<B>>),
}

#[derive(Debug)]
struct A();

impl Drop for Pin<Box<A>> {
fn drop(&mut self) {}
}

#[derive(Debug)]
struct B();

// UNCOMMENT TO FIX COMPILER ERROR
// impl Drop for Pin<Box<B>> {
// fn drop(&mut self) {}
// }