-
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
Build a better MIR body when errors are encountered #117418
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
@bors r+ rollup A bit sad about the duplication of logic with the success paths, but I couldn't figure out something better that isn't a major refactoring with dubious benefit. |
… r=oli-obk Build a better MIR body when errors are encountered Doesn't really have much of an effect on its own, but it does lead to a less confusing phony MIR body being generated when an error is detected during THIR/MIR/match building. This was quite confusing when I hacked `-Zunpretty=mir` to emit `mir_built` rather than `instance_mir`. This coincidentually also fixes rust-lang#117413, but not as generally as rust-lang#117416. cc `@Nadrieril`
bef3234
to
5a9f07c
Compare
@bors r=oli-obk |
☀️ Test successful - checks-actions |
Finished benchmarking commit (504f63e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 663.851s -> 662.279s (-0.24%) |
skip rpit constraint checker if borrowck return type error Fixes rust-lang#117794 Fixes rust-lang#117886 Fixes rust-lang#119025 Prior to change rust-lang#117418, the value of `concrete_opaque_types` for `mir_borrock(T::a::opaque)` was `None`. However, due to modifications in `body.local_decls`, the return value had been changed. The changed of `body.local_decls` has let to the addition of `ty:Error` to `infcx.opaque_type_storage.opaque_types` during `TypeChecker::equate_inputs_and_outputs`. This is due to it utilizing the output of a function signature that was appended during `construct_error`(which previously only appended a `ty::Error`) and then execute `TypeChecker::Related_types`. Therefore, in this PR, I've implemented a condition to bypass the rpit check when an error is encountered. r? `@compiler-errors`
Update Rust toolchain from nightly-2023-11-07 to nightly-2023-11-08 without any other source changes. This is an automatically generated pull request. If any of the CI checks fail, manual intervention is required. In such a case, review the changes at https://github.com/rust-lang/rust from rust-lang@189d6c7 up to rust-lang@7adc89b. The log for this commit range is: rust-lang@7adc89b69b Auto merge of rust-lang#117680 - matthiaskrgr:rollup-kgaa4ma, r=matthiaskrgr rust-lang@518fe492f1 Rollup merge of rust-lang#117675 - zmodem:vectorize_h, r=durin42 rust-lang@f6f6fd1d1a Rollup merge of rust-lang#117639 - rustbot:docs-update, r=ehuss rust-lang@f8c67704f2 Rollup merge of rust-lang#117616 - RalfJung:unstable-target-features, r=compiler-errors rust-lang@cd5b5e08fe Rollup merge of rust-lang#115485 - DaniPopes:rustdoc-macro-consts, r=jackh726,fmease rust-lang@118a2deea5 Auto merge of rust-lang#117617 - Urgau:bump-libc-0.2.150, r=Mark-Simulacrum rust-lang@84abf837b8 manually bless a wasm-only test rust-lang@752a6132e5 llvm-wrapper: Remove include of non-existant Vectorize.h rust-lang@9bd71afb90 Auto merge of rust-lang#115904 - notriddle:notriddle/preload-bold, r=GuillaumeGomez rust-lang@187d1afa9d Auto merge of rust-lang#117297 - clubby789:fn-trait-missing-paren, r=TaKO8Ki rust-lang@61a3eea804 Auto merge of rust-lang#117229 - matthewjasper:thir-unsafeck-fixes, r=cjgillot rust-lang@114f1f6838 Auto merge of rust-lang#117610 - compiler-errors:object-hmm, r=aliemjay rust-lang@504f63efb0 Auto merge of rust-lang#117418 - compiler-errors:better_error_body, r=oli-obk rust-lang@4e0fb98a5c Auto merge of rust-lang#117006 - estebank:issue-69512, r=compiler-errors rust-lang@f926031ea5 When not finding assoc fn on type, look for builder fn rust-lang@7b97a5ca84 Auto merge of rust-lang#117511 - gurry:117406-err-packed-structs, r=compiler-errors rust-lang@5a9f07cc97 Build a better MIR body when errors are encountered rust-lang@171d5587ca Don't instantiate the binder twice when assembling object candidate rust-lang@24e14dd8b4 Only check predicates for late-bound non-lifetime vars in object candidate assembly rust-lang@bf65e3bddb Update books rust-lang@868de8e76b Visit patterns in THIR let expressions rust-lang@2b59992736 Add suggestion to THIR unsafe_op_in_unsafe_fn lint rust-lang@2b2c0f9886 Allow tests with rust-rustfix and revisions rust-lang@931692fa13 Recognise thread local statics in THIR unsafeck rust-lang@b85c6835d0 warn when using an unstable feature with -Ctarget-feature rust-lang@15719a8c1d libc: bump dependency to 0.2.150 rust-lang@4b3ece475d Emit explanatory note for move errors in packed struct derives rust-lang@904aceec7d Give a better diagnostic for missing parens in Fn* bounds rust-lang@2b858b7eb8 Format macro const literals with pretty printer rust-lang@2a92981301 rustdoc: stop preloading Source Serif 4 Bold Co-authored-by: celinval <celinval@users.noreply.github.com> Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
Doesn't really have much of an effect on its own, but it does lead to a less confusing phony MIR body being generated when an error is detected during THIR/MIR/match building. This was quite confusing when I hacked
-Zunpretty=mir
to emitmir_built
rather thaninstance_mir
.This coincidentually also fixes #117413, but not as generally as #117416.
cc @Nadrieril