Uh oh!
There was an error while loading. Please reload this page.
Nuke the const_to_allocation query - #53850
Merged
Merged
Conversation
| if let ConstValue::ByRef(_, allocation, _) = const_val.val { | ||
| allocation | ||
| } else { | ||
| panic!("Trying to get allocation info from non-byref const value") |
Member
There was a problem hiding this comment.
This should say something about getting a non-ByRef static. That's violation of an invariant.
| let alloc = if let ConstValue::ByRef(_, allocation, _) = static_.val { | ||
| allocation | ||
| } else { | ||
| panic!("Trying to get allocation info from non-byref const value") |
RalfJung
commented
Aug 31, 2018
Member
CI is good, and I am happy as well except for the two nits. :) |
RalfJung
reviewed
Sep 1, 2018
| if let ConstValue::ByRef(_, allocation, _) = const_val.val { | ||
| allocation | ||
| } else { | ||
| panic!("Matching on non-ByRef static") |
Member
There was a problem hiding this comment.
Actually, now that I think about this, could you replace panic! by bug! as well (in both cases)? That's what we usually do in the compiler for invariant violations. Sorry I didn't think of that yesterday.
RalfJung
commented
Sep 1, 2018
Member
Thanks! @bors r+ rollup+ |
bors
commented
Sep 1, 2018
Collaborator
📌 Commit db7da0e has been approved by |
RalfJung
commented
Sep 1, 2018
Member
@bors p=rollup I never know how to do this... |
emilyalbini
commented
Sep 1, 2018
Member
@bors rollup |
kennytm added a commit
to kennytm/rust
that referenced
this pull request
Sep 1, 2018
Nuke the `const_to_allocation` query Closesrust-lang#53847 r? @RalfJung `./x.py check` works anyway, let's checkout tests from ci.
bors added a commit
that referenced
this pull request
Sep 1, 2018
Rollup of 9 pull requests Successful merges: - #53076 (set cfg(rustdoc) when rustdoc is running on a crate) - #53622 (cleanup: Add main functions to some UI tests) - #53769 (Also link Clippy repo in the CONTRIBUTING.md file) - #53774 (Add rust-gdbgui script.) - #53781 (bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")) - #53782 (Make Arc cloning mechanics clearer in module docs) - #53790 (Add regression test for issue #52060) - #53801 (Prevent duplicated impl on foreign types) - #53850 (Nuke the `const_to_allocation` query)
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 freeto 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.
Closes#53847
r? @RalfJung
./x.py checkworks anyway, let's checkout tests from ci.