typeck: extract expr type-checking to expr.rs + refactor check_expr_kind#61857
typeck: extract expr type-checking to expr.rs + refactor check_expr_kind#61857bors merged 22 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
c01e37f to
5057552
Compare
| #![feature(rustc_diagnostic_macros)] | ||
| #![feature(slice_patterns)] | ||
| #![feature(never_type)] | ||
| #![feature(inner_deref)] |
There was a problem hiding this comment.
Used in some places, e.g. https://github.com/rust-lang/rust/pull/61857/files#diff-4dca14d9f8d48a6af9ed414a126a9823R243 (just search for .deref() in expr.rs) to make things type-check :)
There was a problem hiding this comment.
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.
Yep; there's a PR to rename it to .as_deref(). It's much less of a hack than using .map(...). =P
There was a problem hiding this comment.
We should probably never stabilize it and introduce the structural coercion already, hmpf.
|
@bors r+ |
|
📌 Commit 5057552 has been approved by |
typeck: extract expr type-checking to expr.rs + refactor check_expr_kind In this PR we: - Extract out the bulk of the expression type checking logic from `check/mod.rs` into a new file `check/expr.rs`. - Refactor `fn check_expr_kind` into several smaller functions. More functions should probably be moved but I think this is a reasonable start. r? @oli-obk cc @eddyb
|
☀️ Test successful - checks-travis, status-appveyor |
In this PR we:
Extract out the bulk of the expression type checking logic from
check/mod.rsinto a new filecheck/expr.rs.Refactor
fn check_expr_kindinto several smaller functions.More functions should probably be moved but I think this is a reasonable start.
r? @oli-obk
cc @eddyb