Skip to content
Permalink
Browse files

add unsize slice-str coercion

  • Loading branch information...
nikomatsakis committed Oct 2, 2019
1 parent a96bce7 commit 4a49351e8b3552eb28251ede3511d0ff53e650d7
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/test/ui/async-await/return-ty-unsize-coercion.rs
@@ -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.
You can’t perform that action at this time.