]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-60371.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / type-alias-impl-trait / issue-60371.rs
1 trait Bug {
2     type Item: Bug;
3
4     const FUN: fn() -> Self::Item;
5 }
6
7 impl Bug for &() {
8     type Item = impl Bug; //~ ERROR `impl Trait` in type aliases is unstable
9
10     const FUN: fn() -> Self::Item = || ();
11     //~^ ERROR the trait bound `(): Bug` is not satisfied
12     //~| ERROR non-defining opaque type use in defining scope
13 }
14
15 fn main() {}