mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
350 lines
17 KiB
Plaintext
350 lines
17 KiB
Plaintext
error: `extern` block uses type `Result<&u8, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:20:24
|
|
|
|
|
LL | fn result_ref_t(x: Result<&'static u8, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
note: the lint level is defined here
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:2:9
|
|
|
|
|
LL | #![deny(improper_ctypes)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: `extern` block uses type `Result<extern "C" fn(), ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:22:23
|
|
|
|
|
LL | fn result_fn_t(x: Result<extern "C" fn(), ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonNull<u8>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:24:28
|
|
|
|
|
LL | fn result_nonnull_t(x: Result<std::ptr::NonNull<u8>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<Unique<u8>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:26:27
|
|
|
|
|
LL | fn result_unique_t(x: Result<std::ptr::Unique<u8>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u8>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:28:31
|
|
|
|
|
LL | fn result_nonzero_u8_t(x: Result<num::NonZero<u8>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u16>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:30:32
|
|
|
|
|
LL | fn result_nonzero_u16_t(x: Result<num::NonZero<u16>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u32>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:32:32
|
|
|
|
|
LL | fn result_nonzero_u32_t(x: Result<num::NonZero<u32>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u64>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:34:32
|
|
|
|
|
LL | fn result_nonzero_u64_t(x: Result<num::NonZero<u64>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<usize>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:36:34
|
|
|
|
|
LL | fn result_nonzero_usize_t(x: Result<num::NonZero<usize>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<i8>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:38:31
|
|
|
|
|
LL | fn result_nonzero_i8_t(x: Result<num::NonZero<i8>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<i16>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:40:32
|
|
|
|
|
LL | fn result_nonzero_i16_t(x: Result<num::NonZero<i16>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<i32>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:42:32
|
|
|
|
|
LL | fn result_nonzero_i32_t(x: Result<num::NonZero<i32>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<i64>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:44:32
|
|
|
|
|
LL | fn result_nonzero_i64_t(x: Result<num::NonZero<i64>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<isize>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:46:34
|
|
|
|
|
LL | fn result_nonzero_isize_t(x: Result<num::NonZero<isize>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<TransparentStruct<NonZero<u8>>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:48:39
|
|
|
|
|
LL | fn result_transparent_struct_t(x: Result<TransparentStruct<num::NonZero<u8>>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<TransparentEnum<NonZero<u8>>, ()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:50:37
|
|
|
|
|
LL | fn result_transparent_enum_t(x: Result<TransparentEnum<num::NonZero<u8>>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u8>, PhantomData<()>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:52:28
|
|
|
|
|
LL | fn result_phantom_t(x: Result<num::NonZero<u8>, std::marker::PhantomData<()>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u8>, Z>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:54:47
|
|
|
|
|
LL | fn result_1zst_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, Z>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u8>, NoField>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:56:45
|
|
|
|
|
LL | fn result_1zst_exhaustive_no_field_t(x: Result<num::NonZero<u8>, NoField>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), &u8>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:59:24
|
|
|
|
|
LL | fn result_ref_e(x: Result<(), &'static u8>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), extern "C" fn()>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:61:23
|
|
|
|
|
LL | fn result_fn_e(x: Result<(), extern "C" fn()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonNull<u8>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:63:28
|
|
|
|
|
LL | fn result_nonnull_e(x: Result<(), std::ptr::NonNull<u8>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), Unique<u8>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:65:27
|
|
|
|
|
LL | fn result_unique_e(x: Result<(), std::ptr::Unique<u8>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:67:31
|
|
|
|
|
LL | fn result_nonzero_u8_e(x: Result<(), num::NonZero<u8>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<u16>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:69:32
|
|
|
|
|
LL | fn result_nonzero_u16_e(x: Result<(), num::NonZero<u16>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<u32>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:71:32
|
|
|
|
|
LL | fn result_nonzero_u32_e(x: Result<(), num::NonZero<u32>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<u64>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:73:32
|
|
|
|
|
LL | fn result_nonzero_u64_e(x: Result<(), num::NonZero<u64>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<usize>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:75:34
|
|
|
|
|
LL | fn result_nonzero_usize_e(x: Result<(), num::NonZero<usize>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<i8>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:77:31
|
|
|
|
|
LL | fn result_nonzero_i8_e(x: Result<(), num::NonZero<i8>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<i16>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:79:32
|
|
|
|
|
LL | fn result_nonzero_i16_e(x: Result<(), num::NonZero<i16>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<i32>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:81:32
|
|
|
|
|
LL | fn result_nonzero_i32_e(x: Result<(), num::NonZero<i32>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<i64>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:83:32
|
|
|
|
|
LL | fn result_nonzero_i64_e(x: Result<(), num::NonZero<i64>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), NonZero<isize>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:85:34
|
|
|
|
|
LL | fn result_nonzero_isize_e(x: Result<(), num::NonZero<isize>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), TransparentStruct<NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:87:39
|
|
|
|
|
LL | fn result_transparent_struct_e(x: Result<(), TransparentStruct<num::NonZero<u8>>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<(), TransparentEnum<NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:89:37
|
|
|
|
|
LL | fn result_transparent_enum_e(x: Result<(), TransparentEnum<num::NonZero<u8>>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NonZero<u8>, PhantomData<()>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:91:28
|
|
|
|
|
LL | fn result_phantom_e(x: Result<num::NonZero<u8>, std::marker::PhantomData<()>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<Z, NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:93:47
|
|
|
|
|
LL | fn result_1zst_exhaustive_no_variant_e(x: Result<Z, num::NonZero<u8>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: `extern` block uses type `Result<NoField, NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/feature-gate-result_ffi_guarantees.rs:95:45
|
|
|
|
|
LL | fn result_1zst_exhaustive_no_field_e(x: Result<NoField, num::NonZero<u8>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
|
|
= note: enum has no representation hint
|
|
|
|
error: aborting due to 38 previous errors
|
|
|