-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove in_band_lifetimes
from rustc_typeck
#91882
Remove in_band_lifetimes
from rustc_typeck
#91882
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
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.
A few comments. This needs a fmt, but otherwise it's really just nits.
r=me after fmt at least
@@ -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<'_>) { |
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 be Ty<'tcx>
and then fcx
be FnCtxt<'_, 'tcx>
impl CheckTypeWellFormedVisitor<'tcx> { | ||
pub fn new(tcx: TyCtxt<'tcx>) -> CheckTypeWellFormedVisitor<'tcx> { | ||
impl CheckTypeWellFormedVisitor<'_> { | ||
pub fn new(tcx: TyCtxt<'_>) -> CheckTypeWellFormedVisitor<'_> { |
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 don't think this change is better
@@ -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> { |
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.
Can probably do ItemLikeVisitor<'_>
instead
@@ -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) { |
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.
Maybe name 'tcx
here
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 tried to mostly follow the conventions of surrounding functions, but the rest of the file, other than this function and the one who follows use 'tcx'
, so I've changed both to follow the rest of the file.
@@ -38,7 +38,7 @@ struct InherentCollect<'tcx> { | |||
impls_map: CrateInherentImpls, | |||
} | |||
|
|||
impl ItemLikeVisitor<'v> for InherentCollect<'tcx> { | |||
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentCollect<'tcx> { |
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.
Can probably elide 'v
here
@@ -115,7 +115,7 @@ impl InherentOverlapChecker<'tcx> { | |||
} | |||
} | |||
|
|||
impl ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> { | |||
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> { |
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.
Also here
impl UnsafetyChecker<'tcx> { | ||
fn check_unsafety_coherence( | ||
impl<'tcx> UnsafetyChecker<'tcx> { | ||
fn check_unsafety_coherence<'v>( | ||
&mut self, | ||
item: &'v hir::Item<'v>, |
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.
Here too
@@ -83,7 +83,7 @@ impl UnsafetyChecker<'tcx> { | |||
} | |||
} | |||
|
|||
impl ItemLikeVisitor<'v> for UnsafetyChecker<'tcx> { | |||
impl<'v, 'tcx> ItemLikeVisitor<'v> for UnsafetyChecker<'tcx> { |
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.
And here
@Patrick-Poitras You can run |
@bors r+ |
📌 Commit a586e7d has been approved by |
…times-from-rustc-typeck, r=jackh726 Remove `in_band_lifetimes` from `rustc_typeck` Joining in on the effort to remove the `in_band_lifetimes` features, as described in issue rust-lang#91867.
…times-from-rustc-typeck, r=jackh726 Remove `in_band_lifetimes` from `rustc_typeck` Joining in on the effort to remove the `in_band_lifetimes` features, as described in issue rust-lang#91867.
…times-from-rustc-typeck, r=jackh726 Remove `in_band_lifetimes` from `rustc_typeck` Joining in on the effort to remove the `in_band_lifetimes` features, as described in issue rust-lang#91867.
…times-from-rustc-typeck, r=jackh726 Remove `in_band_lifetimes` from `rustc_typeck` Joining in on the effort to remove the `in_band_lifetimes` features, as described in issue rust-lang#91867.
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#90939 (Tweak errors coming from `for`-loop, `?` and `.await` desugaring) - rust-lang#91859 (Iterator::cycle() — document empty iterator special case) - rust-lang#91868 (Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`) - rust-lang#91870 (Revert setting a default for the MACOSX_DEPLOYMENT_TARGET env var for linking) - rust-lang#91881 (Stabilize `iter::zip`) - rust-lang#91882 (Remove `in_band_lifetimes` from `rustc_typeck`) - rust-lang#91940 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Joining in on the effort to remove the
in_band_lifetimes
features, as described in issue #91867.