1 #![feature(unsized_tuple_coercion)]
2 #![feature(unsized_fn_params)]
7 let x: &(i32, i32, [i32]) = &(0, 1, [2, 3]);
8 let y: &(i32, i32, [i32]) = &(0, 1, [2, 3, 4]);
11 assert_eq!(a, [x, y]);
13 assert_eq!(&format!("{:?}", a), "[(0, 1, [2, 3]), (0, 1, [2, 3, 4])]");
14 assert_eq!(mem::size_of_val(x), 16);
18 pub fn f0(_f: dyn FnOnce()) {}
20 pub fn f2(_x: i32, _y: [i32]) {}
21 pub fn f3(_p: dyn Send) {}
23 let c: Box<dyn FnOnce()> = Box::new(|| {});
25 let foo = "foo".to_string().into_boxed_str();
27 let sl: Box<[i32]> = [0, 1, 2].to_vec().into_boxed_slice();
29 let p: Box<dyn Send> = Box::new((1, 2));