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
+
1
39
error[E0277]: the size for values of type `Device` cannot be known at compilation time
2
- --> $DIR/unsized-extern-derefmove.rs:14 :9
40
+ --> $DIR/unsized-extern-derefmove.rs:17 :9
3
41
|
4
42
LL | let d: Device = unsafe { *make_device() };
5
43
| ^ doesn't have a size known at compile-time
@@ -11,6 +49,16 @@ help: consider borrowing here
11
49
LL | let d: &Device = unsafe { *make_device() };
12
50
| +
13
51
14
- error: aborting due to 1 previous error
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
15
63
16
64
For more information about this error, try `rustc --explain E0277`.
0 commit comments