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

[macOS] Fix crashes due to the stabilization of the ! (never) type #428

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

yvt
Copy link
Contributor

@yvt yvt commented Mar 21, 2018

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.

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!.

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 tomaka merged commit 559681b into rust-windowing:master 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.
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.
@francesca64 francesca64 mentioned this pull request Aug 15, 2018
4 tasks
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
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants