Files
rust/tests/ui/impl-trait/issues/issue-77987.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
286 B
Rust
Raw Normal View History

2022-02-17 13:55:58 +00:00
#![feature(type_alias_impl_trait)]
//@ check-pass
pub trait Foo<T> {}
2022-02-17 13:55:58 +00:00
impl<T, U> Foo<T> for U {}
pub type Scope = impl Foo<()>;
2022-02-17 13:55:58 +00:00
#[allow(unused)]
#[define_opaque(Scope)]
fn infer_scope() -> Scope {
()
2022-02-17 13:55:58 +00:00
}
#[allow(unused)]
fn ice() -> impl Foo<Scope> {
2022-02-17 13:55:58 +00:00
loop {}
}
fn main() {}