Stop using in_band_lifetimes

This commit is contained in:
Cameron Steffen 2022-01-11 09:52:23 -06:00
parent fccf07bae5
commit 02ec39b2ff
77 changed files with 216 additions and 189 deletions

View file

@ -5,7 +5,7 @@ use clippy_utils::{is_in_panic_handler, is_no_std_crate};
use rustc_hir::{Block, Expr};
use rustc_lint::LateContext;
pub(super) fn check(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, loop_block: &'tcx Block<'_>) {
pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, loop_block: &Block<'_>) {
if loop_block.stmts.is_empty() && loop_block.expr.is_none() && !is_in_panic_handler(cx, expr) {
let msg = "empty `loop {}` wastes CPU cycles";
let help = if is_no_std_crate(cx) {