-
Notifications
You must be signed in to change notification settings - Fork 903
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
[macOS] Fix crashes due to the stabilization of the !
(never) type
#428
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Due to the recent changes in the Rust compiler, unconstrained type variables are now deduced to `!` instead of `()`. There are some occurrences where `msg_send!` is used without constraining its return type (relying on the assumption that they would be deduced to be `()`). As a result, the macOS port of winit stopped working. This PR fixes this issue (rust-windowing#426) by adding explicit return types to such uses of `msg_send!`.
tomaka
approved these changes
Mar 21, 2018
francesca64
pushed a commit
to francesca64/winit
that referenced
this pull request
Mar 26, 2018
…ust-windowing#428) Due to the recent changes in the Rust compiler, unconstrained type variables are now deduced to `!` instead of `()`. There are some occurrences where `msg_send!` is used without constraining its return type (relying on the assumption that they would be deduced to be `()`). As a result, the macOS port of winit stopped working. This PR fixes this issue (rust-windowing#426) by adding explicit return types to such uses of `msg_send!`.
SimonSapin
added a commit
to SimonSapin/winit
that referenced
this pull request
Apr 9, 2018
The error I was investigating servo/servo#20474 (comment) turned out to be already be fixed by rust-windowing#428, but there was a few more cases of the same problem.
SimonSapin
added a commit
to SimonSapin/winit
that referenced
this pull request
Apr 9, 2018
The error I was investigating servo/servo#20474 (comment) turned out to be already be fixed by rust-windowing#428, but there was a few more cases of the same problem.
SimonSapin
added a commit
to servo/devices
that referenced
this pull request
Apr 9, 2018
SimonSapin
added a commit
to servo/devices
that referenced
this pull request
Apr 9, 2018
bors-servo
pushed a commit
to servo/devices
that referenced
this pull request
Apr 9, 2018
Fix some unconstrained type parameters being inferred to `!` Similar to rust-windowing/winit#428 CC servo/servo#20474 (comment) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/devices/26) <!-- Reviewable:end -->
francesca64
pushed a commit
that referenced
this pull request
Apr 9, 2018
The error I was investigating servo/servo#20474 (comment) turned out to be already be fixed by #428, but there was a few more cases of the same problem.
This was referenced Apr 19, 2018
Cargo test fail to run in nightly 1.27.0-nightly (7360d6dd6 2018-04-15)
servo/core-foundation-rs#206
Closed
This was referenced Aug 2, 2019
tmfink
pushed a commit
to tmfink/winit
that referenced
this pull request
Jan 5, 2022
This avoids an edgecase where presumably some floating point rounding error results in predicting a `to_tile_coords` that isn't actually stepped on, causing the loop to loop forever.
tmfink
pushed a commit
to tmfink/winit
that referenced
this pull request
Jan 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to the recent changes in the Rust compiler, unconstrained type variables are now deduced to
!
instead of()
. There are some occurrences wheremsg_send!
is used without constraining its returntype (relying on the assumption that they would be deduced to be
()
). As a result, the macOS port of winit stopped working.!
!
to a type.See the new type deduction behavior in action.
This PR fixes the issue (#426) by adding explicit return types to such uses of
msg_send!
.