Merge remote-tracking branch 'upstream/master' into rustup
This commit is contained in:
commit
415fdb2d1a
522 changed files with 5251 additions and 2556 deletions
|
|
@ -1,16 +1,14 @@
|
|||
use crate as utils;
|
||||
use crate::visitors::{for_each_expr, for_each_expr_with_closures, Descend};
|
||||
use core::ops::ControlFlow;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::intravisit::{self, Visitor};
|
||||
use rustc_hir::HirIdSet;
|
||||
use rustc_hir::{Expr, ExprKind, HirId, Node};
|
||||
use rustc_hir::{Expr, ExprKind, HirId, HirIdSet, Node};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceBase, PlaceWithHirId};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
use rustc_middle::mir::FakeReadCause;
|
||||
use rustc_middle::ty;
|
||||
use {crate as utils, rustc_hir as hir};
|
||||
|
||||
/// Returns a set of mutated local variable IDs, or `None` if mutations could not be determined.
|
||||
pub fn mutated_variables<'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) -> Option<HirIdSet> {
|
||||
|
|
@ -156,7 +154,9 @@ pub fn contains_return_break_continue_macro(expression: &Expr<'_>) -> bool {
|
|||
}
|
||||
|
||||
pub fn local_used_after_expr(cx: &LateContext<'_>, local_id: HirId, after: &Expr<'_>) -> bool {
|
||||
let Some(block) = utils::get_enclosing_block(cx, local_id) else { return false };
|
||||
let Some(block) = utils::get_enclosing_block(cx, local_id) else {
|
||||
return false;
|
||||
};
|
||||
|
||||
// for _ in 1..3 {
|
||||
// local
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue