-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Unconditionally check sizedness of body in typeck to taint typeck results #137233
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
bfc622b
to
a0dbaf2
Compare
r? lcnr, perhaps? |
r=me on the changes itself and think its fine to merge this 👍 I feel a bit unhappy with approach, both for its doing unnecessary work, but also because I feel like there's a more general fix which would likely be useful going forward. We currently taint the MIR in rust/compiler/rustc_mir_transform/src/lib.rs Lines 512 to 514 in 5986ff0
If we also check @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Unconditionally check sizedness of body in typeck to taint typeck results Puts the sized check back into typeck (duplicated -- we still have it in wfcheck) so that we properly taint bodies. These duplicated diagnostics will all be deduplicated with `-Zdeduplicate-diagnostics`, so it's just UI test fallout and not an actual regression in user-facing diagnostics. We could perhaps do this without duplicating all the diagnostics if we put this check into something like mir build 🤔 Ideally CTFE would just be more fallible to non-WF code but 🤷 Fixes rust-lang#137186
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (9183270): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 3.8%, secondary 2.8%)This 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 sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 773.598s -> 774.943s (0.17%) |
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr try-job: test-various
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr try-job: test-various
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr try-job: test-various
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr try-job: test-various
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr try-job: test-various
Check signature WF when lowering MIR body Alternative to rust-lang#137233. rust-lang#137233 (comment) Fixes rust-lang#137186 We do this check in `mir_drops_elaborated_and_const_checked` and not during `mir_promoted` because that may result in borrowck cycles if WF requires looking into an opaque hidden type. This causes some TAIT tests to fail unnecessarily. r? lcnr try-job: test-various
Puts the sized check back into typeck (duplicated -- we still have it in wfcheck) so that we properly taint bodies. These duplicated diagnostics will all be deduplicated with
-Zdeduplicate-diagnostics
, so it's just UI test fallout and not an actual regression in user-facing diagnostics.We could perhaps do this without duplicating all the diagnostics if we put this check into something like mir build 🤔 Ideally CTFE would just be more fallible to non-WF code but 🤷
Fixes #137186