Skip to content

Conversation

@WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Dec 2, 2025

I want to make sure that the never type ui tests are actually sensible, and to do so I'm trying to clean them up. This mainly adds comments explaining test purposes and removes outdated stuff.

I imagine best reviewed commit-by-commit, I tried to write useful descriptions and group things into small commits.

cc @lcnr (I removed fallback/nofallback terminology in b5f82d4)

@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 Dec 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 2, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
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

@WaffleLapkin WaffleLapkin added F-never_type `#![feature(never_type)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 2, 2025
We used to allow `T -> !` coercions (yes!! not `! -> T`) in unreachable
code. This was later removed during 2018 stabilization attempt, see:
- rust-lang#40800
- rust-lang@59688e1
- rust-lang#46325

I've kept `tests/ui/coercion/coerce-to-bang-cast.rs`, as that is a
reasonable test for us *not* having `-> !` coercions.
@rustbot
Copy link
Collaborator

rustbot commented Dec 2, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Dec 2, 2025

r=me with fixed CI

Duplicate of `from_infer_breaking_with_unit_fallback.rs` and
`question_mark_from_never.rs`
I don't think they are testing anything anymore
there are only 1 test in that directory, probably created by mistake.
@rust-log-analyzer

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-never_type `#![feature(never_type)]` 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants