Miri: move ModifiedStatic to ConstEval errors#70241
Merged
bors merged 6 commits intorust-lang:masterfrom Mar 24, 2020
Merged
Conversation
Contributor
|
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
Member
Author
|
r? @oli-obk |
RalfJung
commented
Mar 21, 2020
Member
Author
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.
RalfJung
commented
Mar 22, 2020
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
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 7a73b87 has been approved by |
Member
Author
|
@bors r=oli-obk |
Collaborator
|
📌 Commit 1939b4c has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Mar 24, 2020
Miri: move ModifiedStatic to ConstEval errors Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically `static` items).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 24, 2020
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
eddyb
reviewed
Mar 24, 2020
Comment on lines
-180
to
+181
| const STATIC_KIND: Option<!> = None; // no copying of statics allowed | ||
| const GLOBAL_KIND: Option<!> = None; // no copying of globals allowed |
Member
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.
eddyb
reviewed
Mar 24, 2020
| _allocation: &Allocation, | ||
| alloc_id: AllocId, | ||
| allocation: &Allocation, | ||
| def_id: Option<DefId>, |
Member
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically
staticitems).