1
Fork 0

Allow constraining opaque types during unsizing

This commit is contained in:
Oli Scherer 2024-05-24 13:41:20 +00:00
parent 9889a6f5d3
commit 4dcb70b8cf
7 changed files with 12 additions and 60 deletions

View file

@ -1,4 +1,6 @@
//! Test that we do not allow unsizing `([Opaque; N],)` to `([Concrete],)`.
//! Test that we allow unsizing `([Opaque; N],)` to `([Concrete],)`.
//@check-pass
#![feature(unsized_tuple_coercion)]
@ -6,7 +8,6 @@ fn hello() -> ([impl Sized; 2],) {
if false {
let x = hello();
let _: &([i32],) = &x;
//~^ ERROR: mismatched types
}
todo!()
}