-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Refactor diverging and numeric fallback. #46714
Merged
bors
merged 9 commits into
rust-lang:master
from
leoyvens:refactor-structurally-resolve-type
Feb 16, 2018
Merged
Refactor diverging and numeric fallback. #46714
bors
merged 9 commits into
rust-lang:master
from
leoyvens:refactor-structurally-resolve-type
Feb 16, 2018
Commits on Jan 27, 2018
-
refactor
structurally_resolve_type
the `or_else` part was dead code.
Configuration menu - View commit details
-
Copy full SHA for c01bfbd - Browse repository at this point
Copy the full SHA c01bfbdView commit details -
This refactoring tries to make numeric fallback easier to reason about. Instead of applying all fallbacks at an arbitrary point in the middle of inference, we apply the fallback only when necessary and only for the variable that requires it, which for numeric fallback turns out to be just casts. The only visible consequence seems to be some error messages where instead of getting `i32` we get `{integer}` because we are less eager about fallback. The bigger goal is to make it easier to integrate user fallbacks into inference, if we ever figure that out.
Configuration menu - View commit details
-
Copy full SHA for 3d83fc9 - Browse repository at this point
Copy the full SHA 3d83fc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3cd4a7 - Browse repository at this point
Copy the full SHA f3cd4a7View commit details -
No fallback in
structurally_resolve_types
. Further refactoring.Put all fallback in `apply_fallback_if_possible`.
Configuration menu - View commit details
-
Copy full SHA for 02084f3 - Browse repository at this point
Copy the full SHA 02084f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c0ff95 - Browse repository at this point
Copy the full SHA 4c0ff95View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd4de4c - Browse repository at this point
Copy the full SHA cd4de4cView commit details -
Only closure analysis should run after fallback.
Move `check_casts` and `resolve_generator_interiors` to before fallback. Rename `apply_fallback_if_possible` to `fallback_if_possible`. Refactor `select_all_obligations_or_error`.
Configuration menu - View commit details
-
Copy full SHA for f8c1404 - Browse repository at this point
Copy the full SHA f8c1404View commit details -
Configuration menu - View commit details
-
Copy full SHA for b813718 - Browse repository at this point
Copy the full SHA b813718View commit details
Commits on Feb 8, 2018
-
Revert checking casts before fallback.
This turns out to not be backwards compatible.
Configuration menu - View commit details
-
Copy full SHA for d49d428 - Browse repository at this point
Copy the full SHA d49d428View commit details
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.