]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_resolve/imports.rs
Do not ICE on multipart suggestions touching multiple files
[rust.git] / src / librustc_resolve / imports.rs
index 5bd10303162b295711ce9e076d04b7f22a632d84..55ce51e0ff057508c783226910adebf394c653b1 100644 (file)
@@ -29,8 +29,6 @@
 use syntax::unwrap_or;
 use syntax::util::lev_distance::find_best_match_for_name;
 
-use rustc_error_codes::*;
-
 use log::*;
 
 use std::cell::Cell;
@@ -319,7 +317,11 @@ impl<'a> Resolver<'a> {
                        // Remove this together with `PUB_USE_OF_PRIVATE_EXTERN_CRATE`
                        !(self.last_import_segment && binding.is_extern_crate())
                         {
-                            self.privacy_errors.push(PrivacyError(path_span, ident, binding));
+                            self.privacy_errors.push(PrivacyError {
+                                ident,
+                                binding,
+                                dedup_span: path_span,
+                            });
                         }
 
                         Ok(binding)