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

Adapt to new never type fallback by explicitly stating unit types #6352

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

faern
Copy link
Member

@faern faern commented Jun 14, 2024

The aim is for the never type to be stabilized in Rust 2024 (:partying_face: YAY, finally!). But for that to happen some of the current automatic fallback from never (!) to unit (()) must be changed. And as a result any code relying on the current fallback to unit behavior must be changed to not rely on this automatic fallback, but rather be explicit unit type.

This PR fixes the two instances we had of this automatic fallback, as pointed out by the latest nightly compiler.

The tracking issue for never types: rust-lang/rust#123748


This change is Reviewable

@faern faern requested a review from hulthe June 14, 2024 07:01
Copy link

linear bot commented Jun 14, 2024

@faern faern requested review from Serock3 and removed request for hulthe June 14, 2024 09:01
Copy link
Contributor

@Serock3 Serock3 left a comment

Choose a reason for hiding this comment

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

:lgtm:, but suggested an alternative way to do it

@faern faern force-pushed the fix-never-type-fallback-warning-des-1041 branch from e775dcb to 9592f40 Compare June 14, 2024 13:11
@faern faern force-pushed the fix-never-type-fallback-warning-des-1041 branch from 9592f40 to 26b2751 Compare June 14, 2024 13:28
@faern faern merged commit 9cba0d8 into main Jun 14, 2024
18 of 19 checks passed
@faern faern deleted the fix-never-type-fallback-warning-des-1041 branch June 14, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants