]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_resolve/imports.rs
Auto merge of #68030 - cuviper:llvm-9.0.1, r=nikic
[rust.git] / src / librustc_resolve / imports.rs
index 8fe17e89444cd0aa11e1607805a40fa64fa54e90..9f459834175c126a2584b81db962baefae7de960 100644 (file)
@@ -319,7 +319,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)
@@ -718,7 +722,7 @@ pub fn finalize_imports(&mut self) {
         }
 
         if !errors.is_empty() {
-            self.throw_unresolved_import_error(errors.clone(), None);
+            self.throw_unresolved_import_error(errors, None);
         }
     }