mirror of https://github.com/rust-lang/rust
251 lines
11 KiB
Plaintext
251 lines
11 KiB
Plaintext
error: `extern` block uses type `U`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:69:14
|
|
|
|
|
LL | fn uf(x: U);
|
|
| ^ 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 type is defined here
|
|
--> $DIR/lint-ctypes-enum.rs:10:1
|
|
|
|
|
LL | enum U {
|
|
| ^^^^^^
|
|
note: the lint level is defined here
|
|
--> $DIR/lint-ctypes-enum.rs:2:9
|
|
|
|
|
LL | #![deny(improper_ctypes)]
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
error: `extern` block uses type `B`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:70:14
|
|
|
|
|
LL | fn bf(x: B);
|
|
| ^ 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 type is defined here
|
|
--> $DIR/lint-ctypes-enum.rs:13:1
|
|
|
|
|
LL | enum B {
|
|
| ^^^^^^
|
|
|
|
error: `extern` block uses type `T`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:71:14
|
|
|
|
|
LL | fn tf(x: T);
|
|
| ^ 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 type is defined here
|
|
--> $DIR/lint-ctypes-enum.rs:17:1
|
|
|
|
|
LL | enum T {
|
|
| ^^^^^^
|
|
|
|
error: `extern` block uses type `u128`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:83:31
|
|
|
|
|
LL | fn option_nonzero_u128(x: Option<num::NonZero<u128>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= note: 128-bit integers don't currently have a known stable ABI
|
|
|
|
error: `extern` block uses type `i128`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:90:31
|
|
|
|
|
LL | fn option_nonzero_i128(x: Option<num::NonZero<i128>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= note: 128-bit integers don't currently have a known stable ABI
|
|
|
|
error: `extern` block uses type `Option<TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:95:36
|
|
|
|
|
LL | fn option_transparent_union(x: Option<TransparentUnion<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 `Option<Rust<NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:97:28
|
|
|
|
|
LL | fn option_repr_rust(x: Option<Rust<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 `u128`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:107:33
|
|
|
|
|
LL | fn result_nonzero_u128_t(x: Result<num::NonZero<u128>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= note: 128-bit integers don't currently have a known stable ABI
|
|
|
|
error: `extern` block uses type `i128`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:114:33
|
|
|
|
|
LL | fn result_nonzero_i128_t(x: Result<num::NonZero<i128>, ()>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= note: 128-bit integers don't currently have a known stable ABI
|
|
|
|
error: `extern` block uses type `Result<TransparentUnion<NonZero<u8>>, ()>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:119:38
|
|
|
|
|
LL | fn result_transparent_union_t(x: Result<TransparentUnion<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<Rust<NonZero<u8>>, ()>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:121:30
|
|
|
|
|
LL | fn result_repr_rust_t(x: Result<Rust<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>, U>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:125:51
|
|
|
|
|
LL | fn result_1zst_exhaustive_single_variant_t(x: Result<num::NonZero<u8>, U>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>, B>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:127:53
|
|
|
|
|
LL | fn result_1zst_exhaustive_multiple_variant_t(x: Result<num::NonZero<u8>, B>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>, NonExhaustive>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:129:51
|
|
|
|
|
LL | fn result_1zst_non_exhaustive_no_variant_t(x: Result<num::NonZero<u8>, NonExhaustive>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>, Field>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:132:49
|
|
|
|
|
LL | fn result_1zst_exhaustive_single_field_t(x: Result<num::NonZero<u8>, Field>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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<Result<(), NonZero<u8>>, ()>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:134:30
|
|
|
|
|
LL | fn result_cascading_t(x: Result<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 `u128`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:145:33
|
|
|
|
|
LL | fn result_nonzero_u128_e(x: Result<(), num::NonZero<u128>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= note: 128-bit integers don't currently have a known stable ABI
|
|
|
|
error: `extern` block uses type `i128`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:152:33
|
|
|
|
|
LL | fn result_nonzero_i128_e(x: Result<(), num::NonZero<i128>>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
|
|
|
|
= note: 128-bit integers don't currently have a known stable ABI
|
|
|
|
error: `extern` block uses type `Result<(), TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:157:38
|
|
|
|
|
LL | fn result_transparent_union_e(x: Result<(), TransparentUnion<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<(), Rust<NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:159:30
|
|
|
|
|
LL | fn result_repr_rust_e(x: Result<(), Rust<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<U, NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:163:51
|
|
|
|
|
LL | fn result_1zst_exhaustive_single_variant_e(x: Result<U, 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<B, NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:165:53
|
|
|
|
|
LL | fn result_1zst_exhaustive_multiple_variant_e(x: Result<B, 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<NonExhaustive, NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:167:51
|
|
|
|
|
LL | fn result_1zst_non_exhaustive_no_variant_e(x: Result<NonExhaustive, 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<Field, NonZero<u8>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:170:49
|
|
|
|
|
LL | fn result_1zst_exhaustive_single_field_e(x: Result<Field, 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<(), Result<(), NonZero<u8>>>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:172:30
|
|
|
|
|
LL | fn result_cascading_e(x: Result<(), 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<(), ()>`, which is not FFI-safe
|
|
--> $DIR/lint-ctypes-enum.rs:174:27
|
|
|
|
|
LL | fn result_unit_t_e(x: Result<(), ()>);
|
|
| ^^^^^^^^^^^^^^ 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 26 previous errors
|
|
|