Skip to content

Commit 983a90d

Browse files
committed
tests
1 parent 49be827 commit 983a90d

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub trait Trait<'a> {
2+
type Assoc;
3+
}
4+
5+
pub type Alias<'a, T> = <T as Trait<'a>>::Assoc;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// aux-build:upstream_alias.rs
2+
// check-pass
3+
4+
extern crate upstream_alias;
5+
6+
fn foo<'a, T: for<'b> upstream_alias::Trait<'b>>(_: upstream_alias::Alias<'a, T>) -> &'a () {
7+
todo!()
8+
}
9+
10+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// check-pass
2+
3+
fn f(_: X) -> X {
4+
unimplemented!()
5+
}
6+
7+
fn g<'a>(_: X<'a>) -> X<'a> {
8+
unimplemented!()
9+
}
10+
11+
type X<'a> = &'a ();
12+
13+
fn main() {
14+
let _: for<'a> fn(X<'a>) -> X<'a> = g;
15+
let _: for<'a> fn(X<'a>) -> X<'a> = f;
16+
}

0 commit comments

Comments
 (0)