Skip to content

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
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.

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