Fix ICE in improper_ctypes_definitions lint#115698
Conversation
The lint panicked for an input like 'extern "C" fn(Option<&<T as FooTrait>::FooType>)' because the type T therein cannot be normalized. The normalization failure caused SizeSkeleton::compute() to return an error and trigger a panic in the unwrap().
|
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
| LL | pub type Foo2<T> = extern "C" fn(Option<&<T as FooTrait>::FooType>); | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | ||
| | | ||
| = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum |
There was a problem hiding this comment.
This is help message isn't super useful, but that's not your fault 😆
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (37eec5c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 626.843s -> 629.671s (0.45%) |
Fix #115143