diff --git a/src/librustc/middle/resolve.rs b/src/librustc/middle/resolve.rs index cd3375799a3..ac37af05359 100644 --- a/src/librustc/middle/resolve.rs +++ b/src/librustc/middle/resolve.rs @@ -2040,7 +2040,7 @@ impl<'a> Resolver<'a> { return; } - let mut imports = module.imports.borrow_mut(); + let imports = module.imports.borrow(); let import_count = imports.len(); while module.resolved_import_count.get() < import_count { let import_index = module.resolved_import_count.get(); diff --git a/src/test/compile-fail/issue-8208.rs b/src/test/compile-fail/issue-8208.rs new file mode 100644 index 00000000000..8d8e87da76e --- /dev/null +++ b/src/test/compile-fail/issue-8208.rs @@ -0,0 +1,17 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(globs)] + +use self::*; //~ ERROR: unresolved import + +fn main() { +} +