Simplify the tcx.alloc_map API#71508
Merged
bors merged 5 commits intorust-lang:masterfrom May 9, 2020
Merged
Conversation
Contributor
|
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. 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 |
321a378 to
c12029c
Compare
RalfJung
reviewed
Apr 24, 2020
RalfJung
reviewed
Apr 24, 2020
RalfJung
reviewed
Apr 24, 2020
RalfJung
reviewed
Apr 24, 2020
This was referenced May 8, 2020
RalfJung
reviewed
May 8, 2020
RalfJung
reviewed
May 8, 2020
| Some(GlobalAlloc::Static(def_id)) => Some(def_id), | ||
| Some(_) => None, | ||
| None => { | ||
| tcx.sess.delay_span_bug(DUMMY_SP, "MIR cannot contain dangling const pointers"); |
Member
There was a problem hiding this comment.
This turns a delay_bug into a bug! -- let's see if we can get away with that. ;)
RalfJung
reviewed
May 8, 2020
| GlobalAlloc::Function(instance) => instance, | ||
| _ => bug!("expected function, got {:?}", self), | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
For symmetry, should we have unwrap_static?
Contributor
Author
There was a problem hiding this comment.
I considered it, but found no possible use sites, thus left it out.
Member
|
@bors r+ |
Collaborator
|
📌 Commit b07a44d has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 9, 2020
Rollup of 5 pull requests Successful merges: - rust-lang#69406 (upgrade chalk and use chalk-solve/chalk-ir/chalk-rust-ir) - rust-lang#71185 (Move tests from `test/run-fail` to UI) - rust-lang#71234 (rustllvm: Use .init_array rather than .ctors) - rust-lang#71508 (Simplify the `tcx.alloc_map` API) - rust-lang#71555 (Remove ast::{Ident, Name} reexports.) Failed merges: r? @ghost
bors
added a commit
to rust-lang/miri
that referenced
this pull request
May 10, 2020
Update to rustc changes changes needed once rust-lang/rust#71508 gets merged
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.
This PR changes all functions that require manually locking the
alloc_mapto functions onTyCtxtthat lock the map internally. In the same step we make theTyCtxt::alloc_mapfield private.r? @RalfJung