Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ICE in improper_ctypes_definitions lint #115698

Merged
merged 1 commit into from Sep 9, 2023

Conversation

gurry
Copy link
Contributor

@gurry gurry commented Sep 9, 2023

Fix #115143

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().
@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 9, 2023
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is help message isn't super useful, but that's not your fault 😆

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 9, 2023

📌 Commit e7c5132 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 9, 2023
@bors
Copy link
Contributor

bors commented Sep 9, 2023

⌛ Testing commit e7c5132 with merge 37eec5c...

@bors
Copy link
Contributor

bors commented Sep 9, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 37eec5c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 9, 2023
@bors bors merged commit 37eec5c into rust-lang:master Sep 9, 2023
12 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 9, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (37eec5c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.3% [-3.3%, -3.3%] 1
Improvements ✅
(secondary)
-3.0% [-3.8%, -2.2%] 2
All ❌✅ (primary) -3.3% [-3.3%, -3.3%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 626.843s -> 629.671s (0.45%)
Artifact size: 317.92 MiB -> 317.95 MiB (0.01%)

@gurry gurry deleted the 115143-ice-normalization-error branch September 13, 2023 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: NormalizationError during linting
6 participants