Uh oh!
There was an error while loading. Please reload this page.
Check hidden types in dead code - #102700
Conversation
There was a problem hiding this comment.
Why did this code exist? What did it achieve?
There was a problem hiding this comment.
Oh, well it was dead code anyways. I should read the commit title.
bors
commented
Oct 7, 2022
☔ The latest upstream changes (presumably #101632) made this pull request unmergeable. Please resolve the merge conflicts. |
compiler-errors
commented
Oct 13, 2022
I literally wrote up a comment that had bors r+ but it's on a computer that I don't have access to for a day or two. Anyways this code makes sense to me and thanks for splitting it up into easily reviewable commits. @bors r+ rollup=never (just in case we want to bisect to this PR) |
bors
commented
Oct 13, 2022
bors
commented
Oct 13, 2022
bors
commented
Oct 14, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Oct 14, 2022
Finished benchmarking commit (60bd3f9): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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.
Footnotes |
oli-obk
commented
Oct 14, 2022
This is a small improvement for everything but the ctfe stress test. The stress test regressed in actual CTFE (though it also added a few additional query calls to @rustbot label: +perf-regression-triaged |
Check hidden types in dead code fixesrust-lang#99490 r? `@compiler-errors` best reviewed commit by commit
…ck-bad, r=oli-obk Restrict recursive opaque type check We have a recursive opaque check in writeback to avoid inferring the hidden of an opaque type to be itself: https://github.com/rust-lang/rust/blob/33a2c2487ac5d9927830ea4c1844335c6b9f77db/compiler/rustc_hir_typeck/src/writeback.rs#L556-L575 Issue rust-lang#113619 treats `make_option2` as not defining the TAIT `TestImpl` since it is inferred to have the definition `TestImpl := B<TestImpl>`, which fails this check. This regressed in rust-lang#102700 (5d15beb), I think due to the refactoring that made us record the hidden types of TAITs during writeback. However, nothing actually seems to go bad if we relax this recursion checker to only check for directly recursive definitions. This PR fixesrust-lang#113619 by changing this recursive check from being a visitor to just checking that the hidden type is exactly the same as the opaque being inferred. Alternatively, we may be able to fixrust-lang#113619 by restricting this recursion check only to RPITs/async fns. It seems to only be possible to use misuse the recursion check to cause ICEs for TAITs (though I didn't try too hard to create a bad RPIT example... may be possible, actually.) r? `@oli-obk` -- Fixesrust-lang#113314
fixes#99490
r? @compiler-errors
best reviewed commit by commit