about summary refs log tree commit diff
path: root/tests/ui/extern/extern-C-str-arg-ice-80125.stderr
blob: ebd6cec6ecd3f808b4db2c792cfcfef56af46344 (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
26
27
28
29
30
31
32
33
34
35
warning: `extern` fn uses type `str`, which is not FFI-safe
  --> $DIR/extern-C-str-arg-ice-80125.rs:3:23
   |
LL | type ExternCallback = extern "C" fn(*const u8, u32, str);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
   |
   = help: consider using `*const u8` and a length instead
   = note: string slices have no C equivalent
   = note: `#[warn(improper_ctypes_definitions)]` on by default

warning: `extern` fn uses type `str`, which is not FFI-safe
  --> $DIR/extern-C-str-arg-ice-80125.rs:9:44
   |
LL | pub extern "C" fn register_something(bind: ExternCallback) -> Struct {
   |                                            ^^^^^^^^^^^^^^ not FFI-safe
   |
   = help: consider using `*const u8` and a length instead
   = note: string slices have no C equivalent

warning: `extern` fn uses type `Struct`, which is not FFI-safe
  --> $DIR/extern-C-str-arg-ice-80125.rs:9:63
   |
LL | pub extern "C" fn register_something(bind: ExternCallback) -> Struct {
   |                                                               ^^^^^^ not FFI-safe
   |
   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
   = note: this struct has unspecified layout
note: the type is defined here
  --> $DIR/extern-C-str-arg-ice-80125.rs:6:1
   |
LL | pub struct Struct(ExternCallback);
   | ^^^^^^^^^^^^^^^^^

warning: 3 warnings emitted