about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-08-23 23:58:37 -0400
committerGitHub <noreply@github.com>2025-08-23 23:58:37 -0400
commitccfe968cc39fed46f063a0ca4c2bb6d694fe3454 (patch)
tree89c80b5aabeb67fcac29a27bc6d0b027c4cbd4e7 /compiler/rustc_codegen_llvm/src/common.rs
parent7026c8449bcde0785b3627e9cfd2580c05a5efd3 (diff)
parente4557f0ea4f7e015b3108dc509bce562f64528bc (diff)
downloadrust-ccfe968cc39fed46f063a0ca4c2bb6d694fe3454.tar.gz
rust-ccfe968cc39fed46f063a0ca4c2bb6d694fe3454.zip
Rollup merge of #145798 - compiler-errors:unnamed-lt-primary, r=lqd
Use unnamed lifetime spans as primary spans for `MISMATCHED_LIFETIME_SYNTAXES`

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

This PR changes the primary span(s) of the `MISMATCHED_LIFETIME_SYNTAXES` to point to the *unnamed* lifetime spans in both the inputs and *outputs* of the function signature. As reported in rust-lang/rust#145772, this should make it so that IDEs highlight the spans of the actionable part of this lint, rather than just the (possibly named) input spans like they do today.

This could be tweaked further perhaps, for example for `fn foo(_: T<'_>) -> T`, we don't need to highlight the elided lifetime if the actionable part is to change only the return type to `T<'_>`, but I think it's improvement on what's here today, so I think that should be follow-up since I think the logic might get a bit hairy.

cc ```@shepmaster```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
0 files changed, 0 insertions, 0 deletions