Skip to content

Commit

Permalink
add unsize slice-str coercion
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 2, 2019
1 parent a96bce7 commit 4a49351
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/async-await/return-ty-unsize-coercion.rs
Expand Up @@ -31,4 +31,15 @@ fn unsize_slice_coercion() {
}
}

// Unsizing coercion from `&[&str; 1]` to `&[&str]`
fn unsize_slice_str_coercion() {
fn func() -> &'static [&'static str] {
&["hi"]
}

async fn func() -> &'static [&'static str] {
&["hi"]
}
}

fn main() {}

0 comments on commit 4a49351

Please sign in to comment.