summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/default-body-type-err.rs
blob: 9bd5b7779898b5e0a55d225ef4a84fb7be7ceb01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next

#![allow(incomplete_features)]
#![feature(return_position_impl_trait_in_trait)]

use std::ops::Deref;

pub trait Foo {
    fn lol(&self) -> impl Deref<Target = String> {
        //~^ type mismatch resolving `<&i32 as Deref>::Target == String`
        &1i32
    }
}

fn main() {}