Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cstore: return an immutable borrow from visible_parent_map #41061

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Apr 4, 2017

This prevents an ICE when visible_parent_map is called multiple times, for example when an item referenced in an impl signature is imported from an extern crate statement occurs within an impl.

Fixes #41053.

r? @eddyb

@@ -556,6 +563,7 @@ impl CrateStore for cstore::CStore {
}
}

visible_parent_map
drop(visible_parent_map);
self.visible_parent_map.borrow()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we not have a downgrade method for RefMut -> Ref? cc @rust-lang/libs

@eddyb
Copy link
Member

eddyb commented Apr 6, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Apr 6, 2017

📌 Commit 60381cd has been approved by eddyb

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 7, 2017
cstore: return an immutable borrow from `visible_parent_map`

This prevents an ICE when `visible_parent_map` is called multiple times, for example when an item referenced in an impl signature is imported from an  `extern crate` statement occurs within an impl.

Fixes rust-lang#41053.

r? @eddyb
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Apr 7, 2017
cstore: return an immutable borrow from `visible_parent_map`

This prevents an ICE when `visible_parent_map` is called multiple times, for example when an item referenced in an impl signature is imported from an  `extern crate` statement occurs within an impl.

Fixes rust-lang#41053.

r? @eddyb
bors added a commit that referenced this pull request Apr 7, 2017
Rollup of 9 pull requests

- Successful merges: #40797, #41047, #41056, #41061, #41075, #41080, #41120, #41130, #41131
- Failed merges:
@bors bors merged commit 60381cd into rust-lang:master Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants