Add comment explaining why in these tests unsized locals are not accepted
This commit is contained in:
parent
497ee0e1ff
commit
8b8b6392ba
|
@ -1,6 +1,8 @@
|
|||
#![feature(box_patterns)]
|
||||
#![feature(unsized_fn_params)]
|
||||
|
||||
// Ensure that even with unsized_fn_params, unsized types in parameter patterns are not accepted.
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn f1(box box _b: Box<Box<[u8]>>) {}
|
||||
//~^ ERROR: the size for values of type `[u8]` cannot be known at compilation time [E0277]
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#![feature(unsized_fn_params)]
|
||||
|
||||
// Ensure that even with unsized_fn_params, unsized locals are not accepted.
|
||||
|
||||
fn main() {
|
||||
let foo: Box<[u8]> = Box::new(*b"foo");
|
||||
let _foo: [u8] = *foo;
|
||||
|
|
Loading…
Reference in a new issue