os-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.

23 lines
310 B
Rust
Raw Permalink 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 {}
mod scope {
pub type Scope = impl super::Foo<()>;
2022-02-17 13:55:58 +00:00
#[allow(unused)]
fn infer_scope() -> Scope {
()
}
2022-02-17 13:55:58 +00:00
}
#[allow(unused)]
fn ice() -> impl Foo<scope::Scope> {
2022-02-17 13:55:58 +00:00
loop {}
}
fn main() {}