Skip to content

Conversation

WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Sep 3, 2025

In Rust 1.89.0 we started emitting these lints in dependencies. I discussed the future steps with @lcnr and we think that before stabilizing the never type (and doing the breaking changes) we should deny the lints for ~4 releases.

This PR marks never_type_fallback_flowing_into_unsafe and dependency_on_unit_never_type_fallback lints as deny-by-default.

Tracking:

Related:

@rustbot
Copy link
Collaborator

rustbot commented Sep 3, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Sep 3, 2025
@WaffleLapkin
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 3, 2025
@WaffleLapkin WaffleLapkin added 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 F-never_type `#![feature(never_type)]` I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Sep 3, 2025
@WaffleLapkin
Copy link
Member Author

T-lang nomination

This PR marks never_type_fallback_flowing_into_unsafe and dependency_on_unit_never_type_fallback lints as deny-by-default. I think this is the next step towards never type stabilization.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 3, 2025

☀️ Try build successful (CI)
Build commit: e90f1ff (e90f1ff63e694965281f833819a486da29772bdf, parent: 51ff895062ba60a7cba53f57af928c3fb7b0f2f4)

@WaffleLapkin
Copy link
Member Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-146167 created and queued.
🤖 Automatically detected try build e90f1ff
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 4, 2025

⚠️ Warning ⚠️

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 0.148
[TIMING:end] tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } -- 0.000
##[group]Testing stage1 Linkcheck (aarch64-unknown-linux-gnu)
edition-guide/rust-2024/never-type-fallback.html:188: broken link - `rustc/lints/listing/error-by-default.html`
edition-guide/rust-2024/never-type-fallback.html:229: broken link - `rustc/lints/listing/error-by-default.html`
edition-guide/print.html:2608: broken link - `rustc/lints/listing/error-by-default.html`
edition-guide/print.html:2649: broken link - `rustc/lints/listing/error-by-default.html`
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
checked links in: 22.9s
number of HTML files scanned: 46091
number of HTML redirects found: 14508
number of links checked: 2536764
number of links ignored due to external: 120353
---
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools-bin/linkchecker /checkout/obj/build/aarch64-unknown-linux-gnu/doc` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1548:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:171:77

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:38:24
  local time: Thu Sep  4 15:54:56 UTC 2025
  network time: Thu, 04 Sep 2025 15:54:56 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@craterbot
Copy link
Collaborator

🚧 Experiment pr-146167 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@lcnr
Copy link
Contributor

lcnr commented Sep 8, 2025

I discussed the future steps with @lcnr and we think that before stabilizing the never type (and doing the breaking changes) we should deny the lints for ~4 releases.

I personally would convert the lint to a hard error for a few versions :> Users can still ignore denied lints (e.g. if it's in a dependency)

@craterbot
Copy link
Collaborator

🎉 Experiment pr-146167 is completed!
📊 474 regressed and 3 fixed (693868 total)
📊 1781 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-146167/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Sep 8, 2025
@traviscross traviscross added P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang T-lang Relevant to the language team and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Sep 9, 2025
@traviscross
Copy link
Contributor

As a reminder, our plan for stabilizing the never type is:

  1. Change fallback to ! in Rust 2024.
  2. Stabilize Rust 2024.
  3. At a later date when 2024 edition adoption is widespread:
    • Make the breaking change to fall back to ! always everywhere.
    • Change Infallible = !.
    • Stabilize ! (!).

Bumping these up to deny was always part of this plan.

We added these FCWs in Rust 1.80. This bump to deny-by-default will go out in Rust 1.92. That seems like enough, even given the crater results here.

@rfcbot fcp merge

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Sep 10, 2025

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 10, 2025
@tmandry
Copy link
Member

tmandry commented Sep 10, 2025

@rfcbot reviewed

@nikomatsakis
Copy link
Contributor

@rfcbot reviewed

This seems good! Thanks for your continued pushing on this, @WaffleLapkin -- and the crater results look encouraging, seems like mostly minor stuff.

@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Sep 10, 2025
@rust-rfcbot
Copy link
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@scottmcm
Copy link
Member

Yay more ! progress!
@rfcbot reviewed

@petrochenkov petrochenkov added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 10, 2025
@traviscross traviscross removed I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Sep 15, 2025
@WaffleLapkin WaffleLapkin added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 18, 2025
@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Sep 20, 2025
@rust-rfcbot
Copy link
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. F-never_type `#![feature(never_type)]` finished-final-comment-period The final comment period is finished for this PR / Issue. 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 relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-lang Relevant to the language team to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.