Skip to content

Fix ICE in resolve #32813

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

jseyfried
Copy link
Contributor

This fixes #32797, a regression caused by a bug in which we try to mutate a borrowed RefCell. The bug was introduced in #32328 (second to last commit).
r? @nikomatsakis

@@ -332,6 +332,7 @@ impl<'a> ::ModuleS<'a> {

fn define_in_glob_importers(&self, name: Name, ns: Namespace, binding: &'a NameBinding<'a>) {
if !binding.defined_with(DefModifiers::PUBLIC | DefModifiers::IMPORTABLE) { return }
let _resolutions = self.resolutions.borrow();
Copy link
Contributor

Choose a reason for hiding this comment

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

A comment here, preferably one citing some example source, would be fantastic. e.g. I can kind of guess why this makes sense, but it's not at all obvious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do. This is actually somewhat of a hack -- see #32814

@jseyfried
Copy link
Contributor Author

Closing in favor of #32814.

@jseyfried jseyfried closed this Apr 11, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: thread 'rustc' panicked at 'RefCell<T> already borrowed', ../src/libcore/cell.rs:444
2 participants