about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs
blob: 6954a7d806726771ea78e3b2e073a5edad11216e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

use std::ops::Deref;

trait Foo {
    fn foo() -> impl Deref<Target = impl Deref<Target = impl Sized>> {
        &&()
    }

    fn bar() -> impl Deref<Target = Option<impl Sized>> {
        &Some(())
    }
}

fn main() {}