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

relax suspicious_auto_trait_impls lint wrt lifetimes #94925

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Mar 14, 2022

fixes the warning for #93367 (comment).

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 14, 2022
@rust-highfive
Copy link
Collaborator

r? @michaelwoerister

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 14, 2022
@lcnr lcnr added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 14, 2022
@lcnr
Copy link
Contributor Author

lcnr commented Mar 14, 2022

again nominating this for a beta backport. the lint isn't on stable yet and we should remove as many incorrect occurrences as possible, similar to #94315.

@lcnr lcnr changed the title relax suspicious_auto_trait_impls lint relax suspicious_auto_trait_impls lint wrt lifetimes Mar 14, 2022
@michaelwoerister
Copy link
Member

r? rust-lang/diagnostics

|
LL | pub struct WithLifetime<'a, T>(&'a (), T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `Vec<T>` is not a generic parameter
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally this would be a span_label pointing at the right place, not a note

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's somewhat difficult to get that using a type visitor 🤔 could maybe improve it by at least pointing at the self type 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's some code somewhere that does exactly that already. It'd be in one of my old PRs.

@estebank
Copy link
Contributor

@bors r+

...but it seems like the error being avoided should maybe be a warning?

@bors
Copy link
Contributor

bors commented Mar 15, 2022

📌 Commit 82d8e84 has been approved by estebank

@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 Mar 15, 2022
@bors
Copy link
Contributor

bors commented Mar 15, 2022

⌛ Testing commit 82d8e84 with merge f21488a...

@bors
Copy link
Contributor

bors commented Mar 16, 2022

☀️ Test successful - checks-actions
Approved by: estebank
Pushing f21488a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 16, 2022
@bors bors merged commit f21488a into rust-lang:master Mar 16, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 16, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f21488a): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@lcnr lcnr deleted the relax-sus-auto-impls branch March 16, 2022 07:00
@lcnr
Copy link
Contributor Author

lcnr commented Mar 16, 2022

...but it seems like the error being avoided should maybe be a warning?

what exactly do you mean here? The reason for that lint is that we intend to change the behavior of auto traits in the future and want to lint any impls whose semantics change when that happens. Impls only specializing on lifetimes will not change their meaning with my proposed change.

@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Mar 24, 2022
lcnr added a commit to lcnr/rust that referenced this pull request Mar 30, 2022
@lcnr lcnr mentioned this pull request Mar 30, 2022
@Mark-Simulacrum Mark-Simulacrum removed this from the 1.61.0 milestone Mar 30, 2022
@Mark-Simulacrum Mark-Simulacrum added this to the 1.60.0 milestone Mar 30, 2022
@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 30, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 31, 2022
[beta] backport rust-lang#94925

backports rust-lang#94925

looks like that PR might have slipped through 🤔 does it help if there's an open issue to track that in the future, or are there other things I can do to make this less likely in the future?

r? `@Mark-Simulacrum`
MabezDev pushed a commit to esp-rs/rust that referenced this pull request Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. 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.

9 participants