]>
git.proxmox.com Git - rustc.git/blob - tests/ui/unsized-locals/unsized-exprs-rpass.rs
2 #![allow(incomplete_features, unused_braces, unused_parens)]
3 #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
5 struct A
<X
: ?Sized
>(#[allow(unused_tuple_struct_fields)] X);
7 fn udrop
<T
: ?Sized
>(_x
: T
) {}
8 fn foo() -> Box
<[u8]> {
11 fn tfoo() -> Box
<(i32, [u8])> {
12 Box
::new((42, *b
"foo"))
14 fn afoo() -> Box
<A
<[u8]>> {
18 impl std
::ops
::Add
<i32> for A
<[u8]> {
20 fn add(self, _rhs
: i32) -> Self::Output {}
27 udrop
::<[u8]>(if true { *foo() }
else { *foo() }
);
28 udrop
::<[u8]>({ *foo() }
);
29 udrop
::<[u8]>((*foo()));
30 udrop
::<[u8]>((*tfoo()).1);