1
Fork 0

Merge commit '2bb3996244' into sync_cg_clif-2022-12-14

This commit is contained in:
bjorn3 2022-12-14 19:30:46 +01:00
commit 949699931e
53 changed files with 1675 additions and 1012 deletions

View file

@ -0,0 +1,24 @@
// Adapted from rustc ui test suite (ui/type-alias-impl-trait/issue-72793.rs)
#![feature(type_alias_impl_trait)]
trait T { type Item; }
type Alias<'a> = impl T<Item = &'a ()>;
struct S;
impl<'a> T for &'a S {
type Item = &'a ();
}
fn filter_positive<'a>() -> Alias<'a> {
&S
}
fn with_positive(fun: impl Fn(Alias<'_>)) {
fun(filter_positive());
}
fn main() {
with_positive(|_| ());
}