Allow constraining opaque types during unsizing
This commit is contained in:
parent
9889a6f5d3
commit
4dcb70b8cf
7 changed files with 12 additions and 60 deletions
|
@ -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!()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue