diff options
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-77987.rs')
| -rw-r--r-- | tests/ui/impl-trait/issues/issue-77987.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/ui/impl-trait/issues/issue-77987.rs b/tests/ui/impl-trait/issues/issue-77987.rs index a7e7b067d5f..f134224071f 100644 --- a/tests/ui/impl-trait/issues/issue-77987.rs +++ b/tests/ui/impl-trait/issues/issue-77987.rs @@ -5,17 +5,16 @@ pub trait Foo<T> {} impl<T, U> Foo<T> for U {} -mod scope { - pub type Scope = impl super::Foo<()>; +pub type Scope = impl Foo<()>; - #[allow(unused)] - fn infer_scope() -> Scope { - () - } +#[allow(unused)] +#[define_opaque(Scope)] +fn infer_scope() -> Scope { + () } #[allow(unused)] -fn ice() -> impl Foo<scope::Scope> { +fn ice() -> impl Foo<Scope> { loop {} } |
