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

Commit 13083f9

Browse files
authored
Merge pull request #1414 from matthiaskrgr/1109
add 3/4 ices
2 parents 84c67b0 + 2bb37ad commit 13083f9

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

ices/101660-1.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(anonymous_lifetime_in_impl_trait)]
2+
3+
trait Foo<T> {
4+
fn bar(self, baz: T);
5+
}
6+
7+
fn qux(foo: impl Foo<&str>) {
8+
|baz: &str| foo.bar(baz);
9+
}
10+
11+
pub fn main() {}

ices/101660-2.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(anonymous_lifetime_in_impl_trait)]
2+
3+
trait Foo<T> {
4+
fn bar(self, baz: T);
5+
}
6+
7+
fn qux(foo: impl Foo<&str>, baz: &str) {
8+
foo.bar(baz);
9+
}
10+
11+
pub fn main() {}

ices/101665.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(return_position_impl_trait_in_trait)]
2+
#![allow(incomplete_features)]
3+
4+
use core::fmt::Debug;
5+
6+
trait Foo {
7+
async fn baz()-> impl Debug{}
8+
}
9+
10+
fn main(){}

ices/101667.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![feature(return_position_impl_trait_in_trait)]
2+
#![allow(incomplete_features)]
3+
4+
use core::fmt::Debug;
5+
6+
trait Foo {
7+
fn baz(&self) -> impl Debug;
8+
}
9+
10+
impl Foo for u32{
11+
fn baz(&self) -> u32{
12+
32
13+
}
14+
}
15+
16+
fn main() {
17+
let i = Box::new(42_u32) as Box<dyn Foo>;
18+
}

0 commit comments

Comments
 (0)