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

Use contiguous spans for empty_line_after_* suggestion #13439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flip1995
Copy link
Member

Replacing an empty span (which an empty line is) with an empty string triggers a debug assertion in rustc. This fixes the debug assertion by using contiguous spans, with the same resulting suggestion.

r? @Alexendoo

This unblocks the sync

changelog: none

@flip1995 flip1995 added the I-sync-blocker Issue: Prevents a change to be synced to rust-lang/rust label Sep 22, 2024
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 22, 2024
Replacing an empty span (which an empty line is) with an empty string triggers a
debug assertion in rustc. This fixes the debug assertion by using contiguous
spans, with the same resulting suggestion.
@Alexendoo
Copy link
Member

Alexendoo commented Sep 22, 2024

Ah sorry I didn't see that rust-lang/rust#129991 was a direct mention rather than a team one, feel free to poke me on zulip if that happens again

Looks like I missed a test case for it but this would remove the comment in e.g.

#[allow(unused)]

// comment

fn main() {}

To unblock the sync we could turn it into a regular .help() message and look at solving it separately, may need to disable rustfix for the tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-sync-blocker Issue: Prevents a change to be synced to rust-lang/rust 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.

4 participants