Skip to content

Fix suggestions pointing into macro declaration exposed by #144585 #164044

Open

Description

@estebank

#144585 now displays suggestions that don't have valid spans in tests, which has uncovered suggestions pointing at std, which shouldn't happen. In most cases, I think that changing things in the suggestion itself to use the call_span instead might be appropriate, but requires analysis.

Activity

  1. added
    A-diagnosticsArea: Messages for errors, warnings, and lints
    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`
    D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.
    D-imprecise-spansDiagnostics: Spans don't point to exactly the erroneous code.
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.D-imprecise-spansDiagnostics: Spans don't point to exactly the erroneous code.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