]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/in-trait/reveal.rs
Rollup merge of #101555 - jhpratt:stabilize-mixed_integer_ops, r=joshtriplett
[rust.git] / src / test / 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 }