Skip to content

Target modifer diagnostics have strange spans #161174

Description

@RalfJung

An incorrect -Cunsafe-allow-abi-mismatch value emits a message like this:

error: unknown target modifier `target-feature`, requested by `-Cunsafe-allow-abi-mismatch=target-feature`
  --> /home/r/src/rust/rustc.2/tests/ui/target-feature/abi-relevant-target-modifier.rs:9:1
   |
LL | #![feature(no_core)]
   | ^

That span makes no sense at all. There should be no span for this message.

Likely introduced in #133138; Cc @azhogin

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsF-target_modifiers`#![feature(target_modifiers)]`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