]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-60371.rs
Rollup merge of #95102 - compiler-errors:issue-94034-bug, r=jackh726
[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 }
13
14 fn main() {}