Skip to content

Sometimes DiagnosticBuilder::span_suggestion doesn't print the suggestion #60979

Closed as not planned
@flip1995

Description

@flip1995

In Clippy we have a convenience function for DiagnosticBuilder::span_suggestion: https://github.com/rust-lang/rust-clippy/blob/fd563810158425c20f27768da4ef54c54230bbbf/clippy_lints/src/utils/diagnostics.rs#L169-L177

Until now we had 3 cases where the suggestion wasn't emitted: rust-lang/rust-clippy#4119, rust-lang/rust-clippy#3582 (comment), rust-lang/rust-clippy#3913

This issue still occurs, when replacing the convenience functions with the normal DiagnosticBuilder methods.

Until now I couldn't figure out a pattern when or why this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions