1 // Check that we apply unsizing coercions based on the return type.
3 // Also serves as a regression test for #60424.
12 // Unsizing coercion from `Box<&'static str>` to `Box<dyn Debug>`.
13 fn unsize_trait_coercion() {
14 fn sync_example() -> Box<dyn Debug> {
18 async fn async_example() -> Box<dyn Debug> {
23 // Unsizing coercion from `Box<[u32; N]>` to `Box<[32]>`.
24 fn unsize_slice_coercion() {
25 fn sync_example() -> Box<[u32]> {
29 async fn async_example() -> Box<[u32]> {
34 // Unsizing coercion from `&[&str; 1]` to `&[&str]`
35 fn unsize_slice_str_coercion() {
36 fn sync_example() -> &'static [&'static str] {
40 async fn async_example() -> &'static [&'static str] {