about summary refs log tree commit diff
path: root/tests/ui/extern/extern-C-non-FFI-safe-arg-ice-52334.stderr
blob: 044c1ae2dd42f58cbe52f40ece7ce65006338ddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
warning: `extern` fn uses type `CStr`, which is not FFI-safe
  --> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:7:12
   |
LL | type Foo = extern "C" fn(::std::ffi::CStr);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
   |
   = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
   = note: `CStr`/`CString` do not have a guaranteed layout
   = note: `#[warn(improper_ctypes_definitions)]` on by default

warning: `extern` block uses type `CStr`, which is not FFI-safe
  --> $DIR/extern-C-non-FFI-safe-arg-ice-52334.rs:10:18
   |
LL |     fn meh(blah: Foo);
   |                  ^^^ not FFI-safe
   |
   = help: consider passing a `*const std::ffi::c_char` instead, and use `CStr::as_ptr()`
   = note: `CStr`/`CString` do not have a guaranteed layout
   = note: `#[warn(improper_ctypes)]` on by default

warning: 2 warnings emitted