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

Mention both release *and* edition breakage for never type lints #132978

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Nov 13, 2024

This PR makes two changes a change to the never type lints (dependency_on_unit_never_type_fallback and never_type_fallback_flowing_into_unsafe):

  1. Change the wording of the note to mention that the breaking change will be made in an edition and in a future release
  2. Make these warnings be reported in deps (hopefully the lints are matured enough)

r? @compiler-errors
cc @ehuss
closes #132930

@WaffleLapkin WaffleLapkin added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. F-never_type `#![feature(never_type)]` L-dependency_on_unit_never_type_fallback Lint: dependency_on_unit_never_type_fallback L-never_type_fallback_flowing_into_unsafe Lint: never_type_fallback_flowing_into_unsafe labels Nov 13, 2024
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 13, 2024
@WaffleLapkin WaffleLapkin force-pushed the very-semantic-change-kind branch from 0925c06 to 8cb3d5d Compare November 13, 2024 04:48
@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin WaffleLapkin force-pushed the very-semantic-change-kind branch from 8cb3d5d to afc883f Compare November 13, 2024 16:46
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

ty

@compiler-errors
Copy link
Member

compiler-errors commented Nov 13, 2024

I actually think that we should not be warning this in deps yet... warning this in deps is currently unactionable from the user perspective (except for possibly upgrading a crate version), and I think it may need additional approval from T-lang 🤔

@WaffleLapkin WaffleLapkin force-pushed the very-semantic-change-kind branch 2 times, most recently from 6d4aa37 to de34288 Compare November 13, 2024 20:49
@WaffleLapkin
Copy link
Member Author

@compiler-errors I've reverted the change making the lints reported in deps.

@compiler-errors
Copy link
Member

ty :>

@compiler-errors compiler-errors changed the title Mention both release *and* edition breackage for never type lints; report them in deps Mention both release *and* edition breackage for never type lints Nov 13, 2024
@@ -4185,7 +4185,7 @@ declare_lint! {
Warn,
"never type fallback affecting unsafe function calls",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseSemanticsChange,
reason: FutureIncompatibilityReason::EditionAndFutureReleaseError(Edition::Edition2024),
Copy link
Member

Choose a reason for hiding this comment

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

hm, do we want to maintain the fact that this is a semantics change? i think we kinda care

Copy link
Member

Choose a reason for hiding this comment

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

whoops i forgot to finish my sentece -- we kinda care about this difference, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we should maintain this fact. Oops ^^'

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@traviscross traviscross changed the title Mention both release *and* edition breackage for never type lints Mention both release *and* edition breakage for never type lints Nov 13, 2024
@WaffleLapkin WaffleLapkin force-pushed the very-semantic-change-kind branch from de34288 to 5aa873b Compare November 14, 2024 01:51
@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin WaffleLapkin force-pushed the very-semantic-change-kind branch from 5aa873b to 673bb5e Compare November 14, 2024 05:01
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 15, 2024

📌 Commit 673bb5e has been approved by compiler-errors

It is now in the queue for this repository.

@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 Nov 15, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 15, 2024
…kind, r=compiler-errors

Mention both release *and* edition breakage for never type lints

This PR makes ~~two changes~~ a change to the never type lints (`dependency_on_unit_never_type_fallback` and `never_type_fallback_flowing_into_unsafe`):
1.  Change the wording of the note to mention that the breaking change will be made in an edition _and_ in a future release
2. ~~Make these warnings be reported in deps (hopefully the lints are matured enough)~~

r? `@compiler-errors`
cc `@ehuss`
closes rust-lang#132930
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 15, 2024
…kind, r=compiler-errors

Mention both release *and* edition breakage for never type lints

This PR makes ~~two changes~~ a change to the never type lints (`dependency_on_unit_never_type_fallback` and `never_type_fallback_flowing_into_unsafe`):
1.  Change the wording of the note to mention that the breaking change will be made in an edition _and_ in a future release
2. ~~Make these warnings be reported in deps (hopefully the lints are matured enough)~~

r? `@compiler-errors`
cc `@ehuss`
closes rust-lang#132930
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2024
…llaumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#132936 (For expr `return (_ = 42);` unused_paren lint should not be triggered)
 - rust-lang#132956 (Add visit_coroutine_kind to ast::Visitor)
 - rust-lang#132978 (Mention both release *and* edition breakage for never type lints)
 - rust-lang#133074 (make UI test OS-agnostic)
 - rust-lang#133080 (Fix span edition for 2024 RPIT coming from an external macro )

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b3e2981 into rust-lang:master Nov 16, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 16, 2024
Rollup merge of rust-lang#132978 - WaffleLapkin:very-semantic-change-kind, r=compiler-errors

Mention both release *and* edition breakage for never type lints

This PR makes ~~two changes~~ a change to the never type lints (`dependency_on_unit_never_type_fallback` and `never_type_fallback_flowing_into_unsafe`):
1.  Change the wording of the note to mention that the breaking change will be made in an edition _and_ in a future release
2. ~~Make these warnings be reported in deps (hopefully the lints are matured enough)~~

r? ``@compiler-errors``
cc ``@ehuss``
closes rust-lang#132930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. F-never_type `#![feature(never_type)]` L-dependency_on_unit_never_type_fallback Lint: dependency_on_unit_never_type_fallback L-never_type_fallback_flowing_into_unsafe Lint: never_type_fallback_flowing_into_unsafe 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.

2024 dependency_on_unit_never_type_fallback doesn't display during 2024 edition migration
5 participants