]> git.lizzy.rs Git - rust.git/commit
Auto merge of #96833 - cjgillot:ast-lifetimes-single, r=petrochenkov
authorbors <bors@rust-lang.org>
Fri, 20 May 2022 15:40:33 +0000 (15:40 +0000)
committerbors <bors@rust-lang.org>
Fri, 20 May 2022 15:40:33 +0000 (15:40 +0000)
commitb5caa5a8421f84cb7664f999b7635801bcf3f96a
tree641380c4a3f31c8369c7d07644d6f2f28b260851
parent22ee39504a702f75485582d02060495a01254de1
parent563916d698380f3773da38b1ebff00ef2842e781
Auto merge of #96833 - cjgillot:ast-lifetimes-single, r=petrochenkov

Lint single-use lifetimes during AST resolution

This PR rewrites `single_use_lifetime` and `unused_lifetime` lints to be based on the AST.
We have more information at our disposal, so we can reduce the amount of false positives.

Remaining false positive: single-use lifetimes in argument-position impl-trait.
I'm waiting for https://github.com/rust-lang/rust/issues/96529 to be fixed to have a clean and proper solution here.

Closes https://github.com/rust-lang/rust/issues/54079
Closes https://github.com/rust-lang/rust/issues/55057
Closes https://github.com/rust-lang/rust/issues/55058
Closes https://github.com/rust-lang/rust/issues/60554
Closes https://github.com/rust-lang/rust/issues/69952

r? `@petrochenkov`