Files
rust/compiler/rustc_metadata
Jacob Pratt cd98562a9d Rollup merge of #161183 - RalfJung:target-modifier-spans, r=estebank
avoid pointless spans in target modifier errors

Fixes https://github.com/rust-lang/rust/issues/161174.

Currently the diagnostics for target modifier issues always point at the beginning of the first non-empty line in the file. That makes no sense at all IMO since the error has nothing to do with that line: the error is in the CLI flags. So let's just remove this pointless span.

While doing this I realized there are other errors also doing this, e.g. `report_incompatible_partial_mitigations` and `report_incompatible_async_drop_feature`.  Cc @arielb1 @azhogin why was this done?
@rust-lang/wg-diagnostics do you see any reason to have these diagnostics point at `krate.spans.inner_span.shrink_to_lo()`? IMO that is just never a useful thing to do.
2026-08-16 23:01:51 -04:00
..