]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-60371.rs
Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu
[rust.git] / tests / 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() {}