about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-04-10 16:15:22 +0200
committerGitHub <noreply@github.com>2024-04-10 16:15:22 +0200
commitfa696a3629f69e79780d36810085a2f3436808a7 (patch)
treef42b93959ee1c27fa6e4a6de9bd21c6408c40356 /compiler/rustc_codegen_gcc
parentb14d8b2ef20c64c1002e2c6c724025c3d0846b91 (diff)
parentda2b714ba122d7befe1f10c808e82a536c9efcf0 (diff)
downloadrust-fa696a3629f69e79780d36810085a2f3436808a7.tar.gz
rust-fa696a3629f69e79780d36810085a2f3436808a7.zip
Rollup merge of #118391 - compiler-errors:lifetimes-eq, r=lcnr
Add `REDUNDANT_LIFETIMES` lint to detect lifetimes which are semantically redundant

There already is a `UNUSED_LIFETIMES` lint which is fired when we detect where clause bounds like `where 'a: 'static`, however, it doesn't use the full power of lexical region resolution to detect failures.

Right now `UNUSED_LIFETIMES` is an `Allow` lint, though presumably we could bump it to warn? I can (somewhat) easily implement a structured suggestion so this can be rustfix'd automatically, since we can just walk through the HIR body, replacing instances of the redundant lifetime.

Fixes #118376
r? lcnr
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions