Skip to content

Commit 22d3784

Browse files
authored
Rollup merge of rust-lang#91908 - matthiaskrgr:ices, r=jackh726
Add 2 tests fixes rust-lang#91139 fixes rust-lang#91069
2 parents fc32303 + 9b17e2d commit 22d3784

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// check-pass
2+
3+
pub trait Associate {
4+
type Associated;
5+
}
6+
7+
pub struct Wrap<'a> {
8+
pub field: &'a i32,
9+
}
10+
11+
pub trait Create<T> {
12+
fn create() -> Self;
13+
}
14+
15+
pub fn oh_no<'a, T>()
16+
where
17+
Wrap<'a>: Associate,
18+
<Wrap<'a> as Associate>::Associated: Create<T>,
19+
{
20+
<Wrap<'a> as Associate>::Associated::create();
21+
}
22+
23+
24+
pub fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// check-pass
2+
3+
#![feature(generic_associated_types)]
4+
5+
trait Foo<T> {
6+
type Type<'a>
7+
where
8+
T: 'a;
9+
}
10+
11+
impl<T> Foo<T> for () {
12+
type Type<'a>
13+
where
14+
T: 'a,
15+
= ();
16+
}
17+
18+
fn foo<T>() {
19+
let _: for<'a> fn(<() as Foo<T>>::Type<'a>, &'a T) = |_, _| ();
20+
}
21+
22+
pub fn main() {}

0 commit comments

Comments
 (0)