1- error[E0277]: the size for values of type `Device` cannot be known
2- --> $DIR/unsized-extern-derefmove.rs:9:28
3- |
4- LL | unsafe fn make_device() -> Box<Device> {
5- | ^^^^^^^^^^^ doesn't have a known size
6- |
7- = help: the trait `MetaSized` is not implemented for `Device`
8- note: required by a bound in `Box`
9- --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
10-
11- error[E0277]: the size for values of type `Device` cannot be known
12- --> $DIR/unsized-extern-derefmove.rs:11:19
13- |
14- LL | Box::from_raw(0 as *mut _)
15- | ------------- ^^^^^^^^^^^ the trait `MetaSized` is not implemented for `Device`
16- | |
17- | required by a bound introduced by this call
18- |
19- = note: the trait bound `Device: MetaSized` is not satisfied
20- note: required by a bound in `Box::<T>::from_raw`
21- --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
22- help: consider borrowing here
23- |
24- LL | Box::from_raw(&0 as *mut _)
25- | +
26- LL | Box::from_raw(&mut 0 as *mut _)
27- | ++++
28-
29- error[E0277]: the size for values of type `Device` cannot be known
30- --> $DIR/unsized-extern-derefmove.rs:11:5
31- |
32- LL | Box::from_raw(0 as *mut _)
33- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a known size
34- |
35- = help: the trait `MetaSized` is not implemented for `Device`
36- note: required by a bound in `Box`
37- --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
38-
391error[E0277]: the size for values of type `Device` cannot be known at compilation time
40- --> $DIR/unsized-extern-derefmove.rs:17 :9
2+ --> $DIR/unsized-extern-derefmove.rs:14 :9
413 |
424LL | let d: Device = unsafe { *make_device() };
435 | ^ doesn't have a size known at compile-time
@@ -49,16 +11,6 @@ help: consider borrowing here
4911LL | let d: &Device = unsafe { *make_device() };
5012 | +
5113
52- error[E0277]: the size for values of type `Device` cannot be known
53- --> $DIR/unsized-extern-derefmove.rs:17:31
54- |
55- LL | let d: Device = unsafe { *make_device() };
56- | ^^^^^^^^^^^^^ doesn't have a known size
57- |
58- = help: the trait `MetaSized` is not implemented for `Device`
59- note: required by a bound in `Box`
60- --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
61-
62- error: aborting due to 5 previous errors
14+ error: aborting due to 1 previous error
6315
6416For more information about this error, try `rustc --explain E0277`.
0 commit comments