-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
typeck: extract expr type-checking to expr.rs + refactor check_expr_kind #61857
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6cf4b3a
typeck: check_expr_kind -> expr.rs
Centril 7227a38
typeck/expr.rs: extract out check_expr_box.
Centril 840f3f6
typeck/expr.rs: extract out check_expr_unary.
Centril d5cc080
typeck/expr.rs: extract out check_expr_addr_of.
Centril 9131f95
typeck/expr.rs: extract out check_expr_path.
Centril 74dd65e
typeck/expr.rs: extract out check_expr_break.
Centril 7a41cc1
typeck/expr.rs: extract out check_expr_return.
Centril af800c7
typeck/expr.rs: move check_expr_assign here.
Centril 867ff1b
typeck/expr.rs: extract out check_expr_while.
Centril 046cd90
typeck/expr.rs: extract out check_expr_loop.
Centril fe004da
typeck/expr.rs: extract out check_expr_cast.
Centril 877d834
typeck/expr.rs: extract out check_expr_array.
Centril 82cac15
typeck/expr.rs: extract out check_expr_repeat.
Centril bb93488
typeck/expr.rs: extract out check_expr_tuple.
Centril 1aa068a
typeck/expr.rs: move check_expr_struct here.
Centril 8da059b
typeck/expr.rs: extract out check_expr_index.
Centril 8fd2d12
typeck/expr.rs: extract out check_expr_yield.
Centril a551fe0
typeck/expr.rs: move check_expr_with_expectation_and_needs here.
Centril 18edf3e
typeck/expr.rs: move some check_expr_*s here.
Centril 819c4f2
typeck/expr.rs: move some check_return_expr here.
Centril 5ee36b7
typeck/expr.rs: move check_method_call here.
Centril 5057552
typeck/expr.rs: move check_field + struct helpers here.
Centril File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's up with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used in some places, e.g. https://github.com/rust-lang/rust/pull/61857/files#diff-4dca14d9f8d48a6af9ed414a126a9823R243 (just search for
.deref()
inexpr.rs
) to make things type-check :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that an addition to
Option
? Damn, I think it's 1. confusing 2. we should be making progress on the coerce front instead of adding method hacks :/There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep; there's a PR to rename it to
.as_deref()
. It's much less of a hack than using.map(...)
. =PThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably never stabilize it and introduce the structural coercion already, hmpf.