]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-87340.rs
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / src / test / ui / impl-trait / issues / issue-87340.rs
1 #![feature(type_alias_impl_trait)]
2
3 trait X {
4     type I;
5     fn f() -> Self::I;
6 }
7
8 impl<T> X for () {
9 //~^ ERROR `T` is not constrained by the impl trait, self type, or predicates
10     type I = impl Sized;
11     fn f() -> Self::I {}
12 }
13
14 fn main() {}