about summary refs log tree commit diff
path: root/tests/ui/mir/unsized-extern-static.stderr
blob: c0810e650ef12265eacd496378c26dc257af7a07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
error: argument never used
  --> $DIR/unsized-extern-static.rs:11:19
   |
LL |     println!("C", unsafe { &symbol });
   |              ---  ^^^^^^^^^^^^^^^^^^ argument never used
   |              |
   |              formatting specifier missing
   |
help: format specifiers use curly braces, consider adding a format specifier
   |
LL |     println!("C{}", unsafe { &symbol });
   |                ++

error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
  --> $DIR/unsized-extern-static.rs:6:5
   |
LL |     pub static mut symbol: [i8];
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[i8]`
   = note: statics and constants must have a statically known size

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.