Make visiting traits generic over the Interner
This commit is contained in:
parent
e8e9c32af9
commit
340d9e818a
@ -4,7 +4,7 @@
|
||||
use rustc_index::bit_set::{BitSet, HybridBitSet};
|
||||
use rustc_lint::LateContext;
|
||||
use rustc_middle::mir::{self, visit::Visitor as _, Mutability};
|
||||
use rustc_middle::ty::{self, visit::ir::TypeVisitor};
|
||||
use rustc_middle::ty::{self, visit::ir::TypeVisitor, TyCtxt};
|
||||
use rustc_mir_dataflow::{impls::MaybeStorageLive, Analysis, ResultsCursor};
|
||||
use std::borrow::Cow;
|
||||
use std::ops::ControlFlow;
|
||||
@ -136,7 +136,7 @@ fn visit_terminator(&mut self, terminator: &mir::Terminator<'_>, _loc: mir::Loca
|
||||
|
||||
struct ContainsRegion;
|
||||
|
||||
impl TypeVisitor<'_> for ContainsRegion {
|
||||
impl TypeVisitor<TyCtxt<'_>> for ContainsRegion {
|
||||
type BreakTy = ();
|
||||
|
||||
fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<Self::BreakTy> {
|
||||
|
@ -838,7 +838,7 @@ struct V<F> {
|
||||
index: u32,
|
||||
f: F,
|
||||
}
|
||||
impl<'tcx, B, F: FnMut(BoundRegion) -> ControlFlow<B>> TypeVisitor<'tcx> for V<F> {
|
||||
impl<'tcx, B, F: FnMut(BoundRegion) -> ControlFlow<B>> TypeVisitor<TyCtxt<'tcx>> for V<F> {
|
||||
type BreakTy = B;
|
||||
fn visit_region(&mut self, r: Region<'tcx>) -> ControlFlow<Self::BreakTy> {
|
||||
if let RegionKind::ReLateBound(idx, bound) = r.kind() && idx.as_u32() == self.index {
|
||||
|
Loading…
Reference in New Issue
Block a user