Uh oh!
There was an error while loading. Please reload this page.
Reduce special treatment for zsts - #67501
Conversation
rust-highfive
commented
Dec 21, 2019
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
oli-obk
commented
Dec 21, 2019
r? @RalfJung |
This comment has been minimized.
This comment has been minimized.
bors
commented
Dec 23, 2019
☔ The latest upstream changes (presumably #67540) made this pull request unmergeable. Please resolve the merge conflicts. |
7979cdd to
7674921Comparebors
commented
Dec 25, 2019
☔ The latest upstream changes (presumably #67596) made this pull request unmergeable. Please resolve the merge conflicts. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RalfJung
commented
Dec 26, 2019
This is quite clever! I am conflicted. I don't like the weird condition in The previous uses of Do you think there is any chance to also kill the other use of |
oli-obk
commented
Dec 26, 2019
There are also two uses of |
oli-obk
commented
Dec 26, 2019
Even if we removed OpTy::from(ImmTy::from(Scalar::zst(), layout)).try_as_mplace()So I'm not sure what we'd have gained. |
RalfJung
commented
Dec 26, 2019
Two? I remember one, for calling This point still stands, though:
|
oli-obk
commented
Dec 26, 2019
Two in miri, and one in the miri engine (the one for drop) |
oli-obk
commented
Dec 26, 2019
That feels impossible to uphold and I don't see what we'd gain. Do you want to prevent |
7674921 to
e503852CompareWe'd gain not baking these fake dangling pointers into the implemented semantics of the Abstract Machine in an observable way. Or rather, that's a property that we currently have, and I do not want to lose it. |
RalfJung
commented
Dec 26, 2019
(Dang, looks like GH stopped sending email notifications for force-pushes. So please let me know when this is ready for review again.) |
oli-obk
commented
Dec 26, 2019
I can poison the |
rust-highfive
commented
Dec 26, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
oli-obk
commented
Dec 27, 2019
I addressed all the review comments.
I did the audit and found no problematic cases. All cases are either |
This comment has been minimized.
This comment has been minimized.
cd0cacc to
c9c71d1CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c9c71d1 to
d0b24e5CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RalfJung
commented
Jan 9, 2020
Just a couple nits. r=me with those fixed. |
Co-Authored-By: Ralf Jung <post@ralfj.de>
oli-obk
commented
Jan 9, 2020
@bors r=RalfJung |
bors
commented
Jan 9, 2020
📌 Commit c5c4fa8 has been approved by |
…Jung Reduce special treatment for zsts addresses rust-lang#67467 (comment) cc @RalfJung
…Jung Reduce special treatment for zsts addresses rust-lang#67467 (comment) cc @RalfJung
Rollup of 6 pull requests Successful merges: - #66463 (Point at opaque and closure type definitions in type errors) - #67501 (Reduce special treatment for zsts) - #67820 (Parse the syntax described in RFC 2632) - #67922 (rustc_ast_lowering: misc cleanup & rustc dep reductions) - #68071 (Extend support of `_` in type parameters) - #68073 (expect `fn` after `const unsafe` / `const extern`) Failed merges: r? @ghost
RalfJung
commented
Jan 10, 2020
@oli-obk Miri broke in a rollup containing this PR, and this seems like the likely culprit. Could you prepare a fixup PR? |
oli-obk
commented
Jan 10, 2020
on it |
Don't try to force_ptr pointers to zsts r? @RalfJung cc @wesleywiser This is required to fix miri after #67501 broke it. The reason only miri sees this is that it uses validation on values during interpretation and not just on the final value of constants, which never contain such values.
This bug was fixed by rust-lang#67501. Closesrust-lang#69312
Add test for rust-lang#69312 This bug was fixed by rust-lang#67501. Closesrust-lang#69312
addresses #67467 (comment)
cc @RalfJung