]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/in-trait/reveal.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / impl-trait / in-trait / reveal.rs
1 // check-pass
2
3 #![feature(return_position_impl_trait_in_trait)]
4 #![allow(incomplete_features)]
5
6 trait Foo {
7     fn f() -> Box<impl Sized>;
8 }
9
10 impl Foo for () {
11     fn f() -> Box<String> {
12         Box::new(String::new())
13     }
14 }
15
16 fn main() {
17     let x: Box<String> = <() as Foo>::f();
18 }