Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

Follow-up of #11421.

I can't yet make the annotations mandatory because there is an issue with tests/ui-internal/custom_ice_message.rs: the error message is not emitted as JSON, meaning that we can't match it with ui_test. I need to check if it's a bug in rustc or if ui_test needs to handle this case somehow.

changelog: Add missing tests annotations for ui-internal

r? @flip1995

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 11, 2025
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

The ICE test is by design making Clippy/rustc-driver panic. So my guess it that an ICE can't be printed in JSON format? At least not by causing a direct panic. Maybe replacing the assert(false) that triggers this ICE in the lint implementation with a delayed_span_bug (I think it's called something like this), it might be possible to emit JSON. 🤔

Anyway, let's get this merged first and deal with that later.

@flip1995 flip1995 added this pull request to the merge queue Mar 11, 2025
@GuillaumeGomez
Copy link
Member Author

Ah interesting. Let me give a try.

@flip1995
Copy link
Member

clippy_lints/src/utils/internal_lints/produce_ice.rs

is the file you're looking for, if you're wondering :)

@GuillaumeGomez
Copy link
Member Author

I was already on it but it's nice of you. ;)

Merged via the queue into rust-lang:master with commit 8f280ff Mar 11, 2025
8 checks passed
@GuillaumeGomez GuillaumeGomez deleted the ui-internal-annotations branch March 11, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants