Skip to content
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

Conversation

Patrick-Poitras
Copy link
Contributor

Joining in on the effort to remove the in_band_lifetimes features, as described in issue #91867.

@rust-highfive
Copy link
Collaborator

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.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 14, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 14, 2021
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@jackh726 jackh726 left a 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<'_>) {
Copy link
Member

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>

Comment on lines 1699 to 1700
impl CheckTypeWellFormedVisitor<'tcx> {
pub fn new(tcx: TyCtxt<'tcx>) -> CheckTypeWellFormedVisitor<'tcx> {
impl CheckTypeWellFormedVisitor<'_> {
pub fn new(tcx: TyCtxt<'_>) -> CheckTypeWellFormedVisitor<'_> {
Copy link
Member

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> {
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe name 'tcx here

Copy link
Contributor Author

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> {
Copy link
Member

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> {
Copy link
Member

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>,
Copy link
Member

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> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

@scottmcm
Copy link
Member

@Patrick-Poitras You can run x.py fmt to update the formatting to match what CI is expecting.

@jackh726
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 14, 2021

📌 Commit a586e7d has been approved by jackh726

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 14, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2021
…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.
This was referenced Dec 14, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2021
…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.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2021
…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.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2021
…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.
This was referenced Dec 14, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2021
…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
@bors bors merged commit 6abad4c into rust-lang:master Dec 15, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants