Skip to content

Commit 4a49351

Browse files
committed
add unsize slice-str coercion
1 parent a96bce7 commit 4a49351

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/ui/async-await/return-ty-unsize-coercion.rs

+11
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,15 @@ fn unsize_slice_coercion() {
3131
}
3232
}
3333

34+
// Unsizing coercion from `&[&str; 1]` to `&[&str]`
35+
fn unsize_slice_str_coercion() {
36+
fn func() -> &'static [&'static str] {
37+
&["hi"]
38+
}
39+
40+
async fn func() -> &'static [&'static str] {
41+
&["hi"]
42+
}
43+
}
44+
3445
fn main() {}

0 commit comments

Comments
 (0)