summary refs log tree commit diff
path: root/tests/ui/impl-trait/issues/issue-87340.rs
blob: b1baaaa6ba5c195882a6bde901032b27f5a994fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(impl_trait_in_assoc_type)]

trait X {
    type I;
    fn f() -> Self::I;
}

impl<T> X for () {
    //~^ ERROR `T` is not constrained by the impl trait, self type, or predicates
    type I = impl Sized;
    fn f() -> Self::I {}
    //~^ ERROR type annotations needed
    //~| ERROR type annotations needed
}

fn main() {}