Skip to content

Commit 7caf236

Browse files
committed
Fix lints
1 parent 6db0051 commit 7caf236

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/rustc_utils/src/mir/borrowck_facts.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ fn mir_borrowck(tcx: TyCtxt<'_>, def_id: LocalDefId) -> &BorrowCheckResult<'_> {
108108
/// Note that as of May 2022, Polonius can be *very* slow for large functions.
109109
/// It may take up to 30 seconds to analyze a single body with a large CFG.
110110
#[allow(clippy::needless_lifetimes)]
111-
pub fn get_body_with_borrowck_facts<'tcx>(
112-
tcx: TyCtxt<'tcx>,
111+
pub fn get_body_with_borrowck_facts(
112+
tcx: TyCtxt<'_>,
113113
def_id: LocalDefId,
114-
) -> &'tcx BodyWithBorrowckFacts<'tcx> {
114+
) -> &BodyWithBorrowckFacts<'_> {
115115
let _ = tcx.mir_borrowck(def_id);
116116
MIR_BODIES.with(|cache| {
117117
let body = cache.get(&def_id, |_| panic!("mir_borrowck override should have stored body for item: {def_id:?}. Are you sure you registered borrowck_facts::override_queries?"));
118118
unsafe {
119119
std::mem::transmute::<
120120
&BodyWithBorrowckFacts<'static>,
121-
&'tcx BodyWithBorrowckFacts<'tcx>,
121+
&BodyWithBorrowckFacts<'_>,
122122
>(body)
123123
}
124124
})

crates/rustc_utils/src/mir/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl<'tcx, Dispatcher: RegionVisitorDispatcher<'tcx>> TypeVisitor<TyCtxt<'tcx>>
452452
{
453453
fn visit_ty(&mut self, ty: Ty<'tcx>) {
454454
let tcx = self.tcx;
455-
if self.ty_stack.iter().any(|visited_ty| ty == *visited_ty) {
455+
if self.ty_stack.contains(&ty) {
456456
return;
457457
}
458458

0 commit comments

Comments
 (0)