-
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
Remove in_tail_expr
from FnCtxt
#103987
Remove in_tail_expr
from FnCtxt
#103987
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
If |
It doesn't change typechecker behavior, if that's what you're asking -- the only usage of this boolean was after a diagnostic has already been constructed, so the worst it can do is make an error note change. |
Makes sense. It seemed to me like this was potentially short circuiting a little work to improve the error message if we knew it wasn't going to be applicable. With this change we'll be doing that extra work to improve it unconditionally then, right? It seems like in the worst case, we get better error messages than we did before, which seems like a good thing. @bors r+ |
Rollup of 7 pull requests Successful merges: - rust-lang#103446 (Specialize `iter::ArrayChunks::fold` for TrustedRandomAccess iterators) - rust-lang#103651 (Fix `rustc_parse_format` spans following escaped utf-8 multibyte chars) - rust-lang#103865 (Move `fallback_has_occurred` state tracking to `FnCtxt`) - rust-lang#103955 (Update linker-plugin-lto.md to contain up to Rust 1.65) - rust-lang#103987 (Remove `in_tail_expr` from FnCtxt) - rust-lang#104067 (fix debuginfo for windows_gnullvm_base.rs) - rust-lang#104094 (fully move `on_unimplemented` to `error_reporting`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…li-obk Miscellaneous HIR typeck nits Remove some check functions that only have one usage Also remove `Expectation::IsLast`, which was both undocumented, and was also made redundant by my cleanup/fix in rust-lang#103987 😸
Cleans up yet another unneeded member from
FnCtxt
. Thein_tail_expr
condition wasn't even correct -- it was set for true while typechecking the whole fn body.