-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Remove in_band_lifetimes
from rustc_typeck
#91882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1450,7 +1450,7 @@ fn check_method_receiver<'fcx, 'tcx>( | |
} | ||
} | ||
|
||
fn e0307(fcx: &FnCtxt<'fcx, 'tcx>, span: Span, receiver_ty: Ty<'_>) { | ||
fn e0307<'fcx, 'tcx> (fcx: &FnCtxt<'fcx, 'tcx>, span: Span, receiver_ty: Ty<'_>) { | ||
struct_span_err!( | ||
fcx.tcx.sess.diagnostic(), | ||
span, | ||
|
@@ -1553,7 +1553,7 @@ fn receiver_is_valid<'fcx, 'tcx>( | |
true | ||
} | ||
|
||
fn receiver_is_implemented( | ||
fn receiver_is_implemented<'tcx>( | ||
fcx: &FnCtxt<'_, 'tcx>, | ||
receiver_trait_def_id: DefId, | ||
cause: ObligationCause<'tcx>, | ||
|
@@ -1696,13 +1696,13 @@ pub struct CheckTypeWellFormedVisitor<'tcx> { | |
tcx: TyCtxt<'tcx>, | ||
} | ||
|
||
impl CheckTypeWellFormedVisitor<'tcx> { | ||
pub fn new(tcx: TyCtxt<'tcx>) -> CheckTypeWellFormedVisitor<'tcx> { | ||
impl CheckTypeWellFormedVisitor<'_> { | ||
pub fn new(tcx: TyCtxt<'_>) -> CheckTypeWellFormedVisitor<'_> { | ||
|
||
CheckTypeWellFormedVisitor { tcx } | ||
} | ||
} | ||
|
||
impl ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> { | ||
impl<'tcx> ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> { | ||
fn visit_item(&self, i: &'tcx hir::Item<'tcx>) { | ||
Visitor::visit_item(&mut self.clone(), i); | ||
} | ||
|
@@ -1720,7 +1720,7 @@ impl ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> { | |
} | ||
} | ||
|
||
impl Visitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> { | ||
impl<'tcx> Visitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> { | ||
type Map = hir_map::Map<'tcx>; | ||
|
||
fn nested_visit_map(&mut self) -> hir_visit::NestedVisitorMap<Self::Map> { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) { | |
unused_crates_lint(tcx); | ||
} | ||
|
||
impl ItemLikeVisitor<'v> for CheckVisitor<'tcx> { | ||
impl <'v, 'tcx> ItemLikeVisitor<'v> for CheckVisitor<'tcx> { | ||
|
||
fn visit_item(&mut self, item: &hir::Item<'_>) { | ||
if item.vis.node.is_pub() || item.span.is_dummy() { | ||
return; | ||
|
@@ -43,7 +43,7 @@ struct CheckVisitor<'tcx> { | |
used_trait_imports: FxHashSet<LocalDefId>, | ||
} | ||
|
||
impl CheckVisitor<'tcx> { | ||
impl<'tcx> CheckVisitor<'tcx> { | ||
fn check_import(&self, item_id: hir::ItemId, span: Span) { | ||
if !self.tcx.maybe_unused_trait_import(item_id.def_id) { | ||
return; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: LocalDefId) { | |
} | ||
} | ||
|
||
fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) { | ||
fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'_>, impl_did: LocalDefId) { | ||
|
||
debug!("visit_implementation_of_coerce_unsized: impl_did={:?}", impl_did); | ||
|
||
// Just compute this for the side-effects, in particular reporting | ||
|
@@ -287,7 +287,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef | |
}) | ||
} | ||
|
||
pub fn coerce_unsized_info(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedInfo { | ||
pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedInfo { | ||
debug!("compute_coerce_unsized_info(impl_did={:?})", impl_did); | ||
|
||
// this provider should only get invoked for local def-ids | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ struct InherentCollect<'tcx> { | |
impls_map: CrateInherentImpls, | ||
} | ||
|
||
impl ItemLikeVisitor<'v> for InherentCollect<'tcx> { | ||
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentCollect<'tcx> { | ||
|
||
fn visit_item(&mut self, item: &hir::Item<'_>) { | ||
let (ty, assoc_items) = match item.kind { | ||
hir::ItemKind::Impl(hir::Impl { of_trait: None, ref self_ty, items, .. }) => { | ||
|
@@ -370,7 +370,7 @@ impl ItemLikeVisitor<'v> for InherentCollect<'tcx> { | |
fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {} | ||
} | ||
|
||
impl InherentCollect<'tcx> { | ||
impl<'tcx> InherentCollect<'tcx> { | ||
fn check_def_id(&mut self, item: &hir::Item<'_>, def_id: DefId) { | ||
if let Some(def_id) = def_id.as_local() { | ||
// Add the implementation to the mapping from implementation to base | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ struct InherentOverlapChecker<'tcx> { | |
tcx: TyCtxt<'tcx>, | ||
} | ||
|
||
impl InherentOverlapChecker<'tcx> { | ||
impl<'tcx> InherentOverlapChecker<'tcx> { | ||
/// Checks whether any associated items in impls 1 and 2 share the same identifier and | ||
/// namespace. | ||
fn impls_have_common_items( | ||
|
@@ -115,7 +115,7 @@ impl InherentOverlapChecker<'tcx> { | |
} | ||
} | ||
|
||
impl ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> { | ||
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> { | ||
|
||
fn visit_item(&mut self, item: &'v hir::Item<'v>) { | ||
match item.kind { | ||
hir::ItemKind::Enum(..) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
reciver_ty
should beTy<'tcx>
and thenfcx
beFnCtxt<'_, 'tcx>