-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
202 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,101 @@ | ||
error: `extern` block uses type `U` which is not FFI-safe: enum has no representation hint | ||
error: `extern` block uses type `U`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:39:13 | ||
| | ||
LL | fn uf(x: U); | ||
| ^ | ||
| ^ not FFI-safe | ||
| | ||
note: lint level defined here | ||
--> $DIR/lint-ctypes-enum.rs:3:9 | ||
| | ||
LL | #![deny(improper_ctypes)] | ||
| ^^^^^^^^^^^^^^^ | ||
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum | ||
= note: enum has no representation hint | ||
note: type defined here | ||
--> $DIR/lint-ctypes-enum.rs:9:1 | ||
| | ||
LL | enum U { A } | ||
| ^^^^^^^^^^^^ | ||
|
||
error: `extern` block uses type `B` which is not FFI-safe: enum has no representation hint | ||
error: `extern` block uses type `B`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:40:13 | ||
| | ||
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: type defined here | ||
--> $DIR/lint-ctypes-enum.rs:10:1 | ||
| | ||
LL | enum B { C, D } | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: `extern` block uses type `T` which is not FFI-safe: enum has no representation hint | ||
error: `extern` block uses type `T`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:41:13 | ||
| | ||
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: type defined here | ||
--> $DIR/lint-ctypes-enum.rs:11:1 | ||
| | ||
LL | enum T { E, F, G } | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `extern` block uses type `std::option::Option<std::ptr::Unique<u8>>` which is not FFI-safe: enum has no representation hint | ||
error: `extern` block uses type `std::option::Option<std::ptr::Unique<u8>>`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:48:17 | ||
| | ||
LL | fn unique(x: Option<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 `u128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI | ||
--> $DIR/lint-ctypes-enum.rs:53:23 | ||
error: `extern` block uses type `u128`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:54:23 | ||
| | ||
LL | fn nonzero_u128(x: Option<num::NonZeroU128>); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ 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: 128-bit integers don't currently have a known stable ABI | ||
--> $DIR/lint-ctypes-enum.rs:60:23 | ||
error: `extern` block uses type `i128`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:61:23 | ||
| | ||
LL | fn nonzero_i128(x: Option<num::NonZeroI128>); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | ||
| | ||
= note: 128-bit integers don't currently have a known stable ABI | ||
|
||
error: `extern` block uses type `std::option::Option<TransparentUnion<std::num::NonZeroU8>>` which is not FFI-safe: enum has no representation hint | ||
--> $DIR/lint-ctypes-enum.rs:65:28 | ||
error: `extern` block uses type `std::option::Option<TransparentUnion<std::num::NonZeroU8>>`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:66:28 | ||
| | ||
LL | fn transparent_union(x: Option<TransparentUnion<num::NonZeroU8>>); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 `std::option::Option<Rust<std::num::NonZeroU8>>` which is not FFI-safe: enum has no representation hint | ||
--> $DIR/lint-ctypes-enum.rs:67:20 | ||
error: `extern` block uses type `std::option::Option<Rust<std::num::NonZeroU8>>`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:68:20 | ||
| | ||
LL | fn repr_rust(x: Option<Rust<num::NonZeroU8>>); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 `std::result::Result<(), std::num::NonZeroI32>` which is not FFI-safe: enum has no representation hint | ||
--> $DIR/lint-ctypes-enum.rs:68:20 | ||
error: `extern` block uses type `std::result::Result<(), std::num::NonZeroI32>`, which is not FFI-safe | ||
--> $DIR/lint-ctypes-enum.rs:69:20 | ||
| | ||
LL | fn no_result(x: Result<(), num::NonZeroI32>); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 9 previous errors | ||
|
Oops, something went wrong.