|
| 1 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 2 | + --> $DIR/unsized-non-place-exprs.rs:20:19 |
| 3 | + | |
| 4 | +LL | udrop::<[u8]>(if true { *foo() } else { *foo() }); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 6 | + | |
| 7 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 8 | +note: unsized values must be place expressions and cannot be put in temporaries |
| 9 | + --> $DIR/unsized-non-place-exprs.rs:20:19 |
| 10 | + | |
| 11 | +LL | udrop::<[u8]>(if true { *foo() } else { *foo() }); |
| 12 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 13 | + |
| 14 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 15 | + --> $DIR/unsized-non-place-exprs.rs:21:19 |
| 16 | + | |
| 17 | +LL | udrop::<[u8]>({ *foo() }); |
| 18 | + | ^^^^^^^^^^ doesn't have a size known at compile-time |
| 19 | + | |
| 20 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 21 | +note: unsized values must be place expressions and cannot be put in temporaries |
| 22 | + --> $DIR/unsized-non-place-exprs.rs:21:19 |
| 23 | + | |
| 24 | +LL | udrop::<[u8]>({ *foo() }); |
| 25 | + | ^^^^^^^^^^ |
| 26 | + |
| 27 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 28 | + --> $DIR/unsized-non-place-exprs.rs:22:11 |
| 29 | + | |
| 30 | +LL | udrop(match foo() { x => *x }); |
| 31 | + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 32 | + | |
| 33 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 34 | +note: unsized values must be place expressions and cannot be put in temporaries |
| 35 | + --> $DIR/unsized-non-place-exprs.rs:22:11 |
| 36 | + | |
| 37 | +LL | udrop(match foo() { x => *x }); |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 39 | + |
| 40 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 41 | + --> $DIR/unsized-non-place-exprs.rs:23:19 |
| 42 | + | |
| 43 | +LL | udrop::<[u8]>({ loop { break *foo(); } }); |
| 44 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 45 | + | |
| 46 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 47 | +note: unsized values must be place expressions and cannot be put in temporaries |
| 48 | + --> $DIR/unsized-non-place-exprs.rs:23:19 |
| 49 | + | |
| 50 | +LL | udrop::<[u8]>({ loop { break *foo(); } }); |
| 51 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 52 | + |
| 53 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 54 | + --> $DIR/unsized-non-place-exprs.rs:25:5 |
| 55 | + | |
| 56 | +LL | { *foo() }; |
| 57 | + | ^^^^^^^^^^ doesn't have a size known at compile-time |
| 58 | + | |
| 59 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 60 | +note: unsized values must be place expressions and cannot be put in temporaries |
| 61 | + --> $DIR/unsized-non-place-exprs.rs:25:5 |
| 62 | + | |
| 63 | +LL | { *foo() }; |
| 64 | + | ^^^^^^^^^^ |
| 65 | + |
| 66 | +error[E0277]: the size for values of type `[u8]` cannot be known at compilation time |
| 67 | + --> $DIR/unsized-non-place-exprs.rs:26:5 |
| 68 | + | |
| 69 | +LL | { loop { break *foo(); } }; |
| 70 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 71 | + | |
| 72 | + = help: the trait `Sized` is not implemented for `[u8]` |
| 73 | +note: unsized values must be place expressions and cannot be put in temporaries |
| 74 | + --> $DIR/unsized-non-place-exprs.rs:26:5 |
| 75 | + | |
| 76 | +LL | { loop { break *foo(); } }; |
| 77 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 78 | + |
| 79 | +error: aborting due to 6 previous errors |
| 80 | + |
| 81 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments