Skip to content

Commit

Permalink
add 3/4 ices
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Sep 11, 2022
1 parent 84c67b0 commit 2bb37ad
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ices/101660-1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#![feature(anonymous_lifetime_in_impl_trait)]

trait Foo<T> {
fn bar(self, baz: T);
}

fn qux(foo: impl Foo<&str>) {
|baz: &str| foo.bar(baz);
}

pub fn main() {}
11 changes: 11 additions & 0 deletions ices/101660-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#![feature(anonymous_lifetime_in_impl_trait)]

trait Foo<T> {
fn bar(self, baz: T);
}

fn qux(foo: impl Foo<&str>, baz: &str) {
foo.bar(baz);
}

pub fn main() {}
10 changes: 10 additions & 0 deletions ices/101665.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]

use core::fmt::Debug;

trait Foo {
async fn baz()-> impl Debug{}
}

fn main(){}
18 changes: 18 additions & 0 deletions ices/101667.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]

use core::fmt::Debug;

trait Foo {
fn baz(&self) -> impl Debug;
}

impl Foo for u32{
fn baz(&self) -> u32{
32
}
}

fn main() {
let i = Box::new(42_u32) as Box<dyn Foo>;
}

0 comments on commit 2bb37ad

Please sign in to comment.