summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/lint-ctypes-enum.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/lint-ctypes-enum.stderr')
-rw-r--r--src/test/ui/lint/lint-ctypes-enum.stderr92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/test/ui/lint/lint-ctypes-enum.stderr b/src/test/ui/lint/lint-ctypes-enum.stderr
new file mode 100644
index 000000000..de532f69a
--- /dev/null
+++ b/src/test/ui/lint/lint-ctypes-enum.stderr
@@ -0,0 +1,92 @@
+error: `extern` block uses type `U`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:60:13
+ |
+LL | fn uf(x: U);
+ | ^ not FFI-safe
+ |
+note: the lint level is 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: the type is defined here
+ --> $DIR/lint-ctypes-enum.rs:9:1
+ |
+LL | enum U {
+ | ^^^^^^
+
+error: `extern` block uses type `B`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:61: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: the type is defined here
+ --> $DIR/lint-ctypes-enum.rs:12:1
+ |
+LL | enum B {
+ | ^^^^^^
+
+error: `extern` block uses type `T`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:62: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: the type is defined here
+ --> $DIR/lint-ctypes-enum.rs:16:1
+ |
+LL | enum T {
+ | ^^^^^^
+
+error: `extern` block uses type `u128`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:74: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
+ --> $DIR/lint-ctypes-enum.rs:81: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 `Option<TransparentUnion<NonZeroU8>>`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:86: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 `Option<Rust<NonZeroU8>>`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:88: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 `Result<(), NonZeroI32>`, which is not FFI-safe
+ --> $DIR/lint-ctypes-enum.rs:89: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 8 previous errors
+