-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Avoid going through the happy path in case of non-fn builtin calls #105973
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. |
@bors r+ |
For the record, this is a functional change in the case that we have an additional type error inside one of the args. |
This PR and #105281 have the same diagnostic output on fn main() -> Result<(), ()> {
a(b(c(d(e(
//~^ ERROR cannot find function `a` in this scope
//~| ERROR cannot find function `b` in this scope
//~| ERROR cannot find function `c` in this scope
//~| ERROR cannot find function `d` in this scope
//~| ERROR cannot find function `e` in this scope
z????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????
//~^^^ ERROR cannot find value `z` in this scope
)))))
} |
…jackh726 Avoid going through the happy path in case of non-fn builtin calls No functional change, just doing an early return. The removed comment is not applicable anymore, not every node needs type bindings in the error case. At best this would have been needed to avoid ICEs, but afaict this can't happen anymore today, as we do fallible checks.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#105791 (docs: add long error explanation for error E0472) - rust-lang#105897 (Fix an opaque type ICE) - rust-lang#105904 (Fix arch flag on i686-apple-darwin) - rust-lang#105949 (Bump `cfg-if` to `1.0` in rustc crates) - rust-lang#105964 (rustdoc: prevent CSS layout of line numbers shrinking into nothing) - rust-lang#105972 (rustdoc: simplify section anchor CSS) - rust-lang#105973 (Avoid going through the happy path in case of non-fn builtin calls) - rust-lang#105976 (Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
That's actually just a coincidence of the extra
Goes from beta:
To nightly:
I'm not happy that we do that, so I'll resurrect #105281 which calls |
…estebank Check arg expressions properly on error in `confirm_builtin_call` Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: rust-lang#105973 (comment) Fixes rust-lang#106030 Fixes rust-lang#105244
…estebank Check arg expressions properly on error in `confirm_builtin_call` Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: rust-lang#105973 (comment) Fixes rust-lang#106030 Fixes rust-lang#105244
No functional change, just doing an early return. The removed comment is not applicable anymore, not every node needs type bindings in the error case. At best this would have been needed to avoid ICEs, but afaict this can't happen anymore today, as we do fallible checks.