summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
blob: de82544f29338ce529f16cd6dd5e321c25a9587c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// check-pass
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next

#![feature(return_position_impl_trait_in_trait)]
//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete

trait Trait {
    type Type;

    // Check that we're adjusting bound vars correctly when installing the default
    // method projection assumptions.
    fn method(&self) -> impl Trait<Type = impl Sized + '_>;
}

trait Trait2 {
    type Type;

    fn method(&self) -> impl Trait2<Type = impl Trait2<Type = impl Sized + '_> + '_>;
}

fn main() {}