@@ -45,131 +45,21 @@ note: the type is defined here
4545LL | enum T {
4646   | ^^^^^^
4747
48- error: `extern` block uses type `Option<NonZero<u8>>`, which is not FFI-safe
49-   --> $DIR/lint-ctypes-enum.rs:71:21
50-    |
51- LL |    fn nonzero_u8(x: Option<num::NonZero<u8>>);
52-    |                     ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
53-    |
54-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
55-    = note: enum has no representation hint
56- 
57- error: `extern` block uses type `Option<NonZero<u16>>`, which is not FFI-safe
58-   --> $DIR/lint-ctypes-enum.rs:72:22
59-    |
60- LL |    fn nonzero_u16(x: Option<num::NonZero<u16>>);
61-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
62-    |
63-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
64-    = note: enum has no representation hint
65- 
66- error: `extern` block uses type `Option<NonZero<u32>>`, which is not FFI-safe
67-   --> $DIR/lint-ctypes-enum.rs:73:22
68-    |
69- LL |    fn nonzero_u32(x: Option<num::NonZero<u32>>);
70-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
71-    |
72-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
73-    = note: enum has no representation hint
74- 
75- error: `extern` block uses type `Option<NonZero<u64>>`, which is not FFI-safe
76-   --> $DIR/lint-ctypes-enum.rs:74:22
77-    |
78- LL |    fn nonzero_u64(x: Option<num::NonZero<u64>>);
79-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
80-    |
81-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
82-    = note: enum has no representation hint
83- 
84- error: `extern` block uses type `Option<NonZero<u128>>`, which is not FFI-safe
48+ error: `extern` block uses type `u128`, which is not FFI-safe
8549  --> $DIR/lint-ctypes-enum.rs:75:23
8650   |
8751LL |    fn nonzero_u128(x: Option<num::NonZero<u128>>);
8852   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
8953   |
90-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
91-    = note: enum has no representation hint
92- 
93- error: `extern` block uses type `Option<NonZero<usize>>`, which is not FFI-safe
94-   --> $DIR/lint-ctypes-enum.rs:77:24
95-    |
96- LL |    fn nonzero_usize(x: Option<num::NonZero<usize>>);
97-    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
98-    |
99-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
100-    = note: enum has no representation hint
101- 
102- error: `extern` block uses type `Option<NonZero<i8>>`, which is not FFI-safe
103-   --> $DIR/lint-ctypes-enum.rs:78:21
104-    |
105- LL |    fn nonzero_i8(x: Option<num::NonZero<i8>>);
106-    |                     ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
107-    |
108-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
109-    = note: enum has no representation hint
110- 
111- error: `extern` block uses type `Option<NonZero<i16>>`, which is not FFI-safe
112-   --> $DIR/lint-ctypes-enum.rs:79:22
113-    |
114- LL |    fn nonzero_i16(x: Option<num::NonZero<i16>>);
115-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
116-    |
117-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
118-    = note: enum has no representation hint
119- 
120- error: `extern` block uses type `Option<NonZero<i32>>`, which is not FFI-safe
121-   --> $DIR/lint-ctypes-enum.rs:80:22
122-    |
123- LL |    fn nonzero_i32(x: Option<num::NonZero<i32>>);
124-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
125-    |
126-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
127-    = note: enum has no representation hint
128- 
129- error: `extern` block uses type `Option<NonZero<i64>>`, which is not FFI-safe
130-   --> $DIR/lint-ctypes-enum.rs:81:22
131-    |
132- LL |    fn nonzero_i64(x: Option<num::NonZero<i64>>);
133-    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
134-    |
135-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
136-    = note: enum has no representation hint
54+    = note: 128-bit integers don't currently have a known stable ABI
13755
138- error: `extern` block uses type `Option<NonZero< i128>> `, which is not FFI-safe
56+ error: `extern` block uses type `i128`, which is not FFI-safe
13957  --> $DIR/lint-ctypes-enum.rs:82:23
14058   |
14159LL |    fn nonzero_i128(x: Option<num::NonZero<i128>>);
14260   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
14361   |
144-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
145-    = note: enum has no representation hint
146- 
147- error: `extern` block uses type `Option<NonZero<isize>>`, which is not FFI-safe
148-   --> $DIR/lint-ctypes-enum.rs:84:24
149-    |
150- LL |    fn nonzero_isize(x: Option<num::NonZero<isize>>);
151-    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
152-    |
153-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
154-    = note: enum has no representation hint
155- 
156- error: `extern` block uses type `Option<TransparentStruct<NonZero<u8>>>`, which is not FFI-safe
157-   --> $DIR/lint-ctypes-enum.rs:85:29
158-    |
159- LL |    fn transparent_struct(x: Option<TransparentStruct<num::NonZero<u8>>>);
160-    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
161-    |
162-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
163-    = note: enum has no representation hint
164- 
165- error: `extern` block uses type `Option<TransparentEnum<NonZero<u8>>>`, which is not FFI-safe
166-   --> $DIR/lint-ctypes-enum.rs:86:27
167-    |
168- LL |    fn transparent_enum(x: Option<TransparentEnum<num::NonZero<u8>>>);
169-    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
170-    |
171-    = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
172-    = note: enum has no representation hint
62+    = note: 128-bit integers don't currently have a known stable ABI
17363
17464error: `extern` block uses type `Option<TransparentUnion<NonZero<u8>>>`, which is not FFI-safe
17565  --> $DIR/lint-ctypes-enum.rs:87:28
@@ -198,5 +88,5 @@ LL |    fn no_result(x: Result<(), num::NonZero<i32>>);
19888   = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
19989   = note: enum has no representation hint
20090
201- error: aborting due to 20  previous errors
91+ error: aborting due to 8  previous errors
20292
0 commit comments