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

Commit

Permalink
Merge pull request #1353 from matthiaskrgr/2107
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor authored Jul 21, 2022
2 parents ffb8b6c + bd8234c commit e0c44f5
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
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) {}
// }

0 comments on commit e0c44f5

Please sign in to comment.