Uh oh!
There was an error while loading. Please reload this page.
Miri: move ModifiedStatic to ConstEval errors - #70241
Conversation
rust-highfive
commented
Mar 21, 2020
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
RalfJung
commented
Mar 21, 2020
r? @oli-obk |
There was a problem hiding this comment.
This changed because we now check "is it mutating" (and error because we cannot mutate any global memory) before we check "is the target memory read-only".
Maybe I should try getting the original error back...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…erminology from "static" to "global" where appropriate
oli-obk
commented
Mar 24, 2020
@bors r+ |
bors
commented
Mar 24, 2020
📌 Commit 7a73b87 has been approved by |
RalfJung
commented
Mar 24, 2020
@bors r=oli-obk |
bors
commented
Mar 24, 2020
📌 Commit 1939b4c has been approved by |
Miri: move ModifiedStatic to ConstEval errors Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically `static` items).
Rollup of 8 pull requests Successful merges: - rust-lang#70023 (clean up E0436 explanation) - rust-lang#70234 (#[track_caller] on core::ops::{Index, IndexMut}.) - rust-lang#70241 (Miri: move ModifiedStatic to ConstEval errors) - rust-lang#70342 (IoSlice/IoSliceMut should be Send and Sync) - rust-lang#70350 (Request "-Z unstable-options" for unstable options) - rust-lang#70355 (Clean up E0454) - rust-lang#70359 (must_use on split_off) - rust-lang#70368 (Mark hotplug_codegen_backend as ignore-stage1) Failed merges: r? @ghost
| const STATIC_KIND: Option<!> = None; // no copying of statics allowed | ||
| const GLOBAL_KIND: Option<!> = None; // no copying of globals allowed |
There was a problem hiding this comment.
Ah, "from tcx" was the missing part, at a glance this looks like it's talking about let x = STATIC; which confused me.
| _allocation: &Allocation, | ||
| alloc_id: AllocId, | ||
| allocation: &Allocation, | ||
| def_id: Option<DefId>, |
There was a problem hiding this comment.
Maybe rename this to static_def_id? (in a future PR, since this one is in a rollup)
Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically
staticitems).