summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/issue-102571.rs
blob: ccb53031c44bc4861baaf7a78363fd47216a0315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]

use std::fmt::Display;
use std::ops::Deref;

trait Foo {
    fn bar(self) -> impl Deref<Target = impl Display + ?Sized>;
}

fn foo<T: Foo>(t: T) {
    let () = t.bar();
    //~^ ERROR mismatched types
}

fn main() {}