]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_privacy/lib.rs
Add Alexis thesis to bibliography
[rust.git] / src / librustc_privacy / lib.rs
index 955e68be0b00699ce293eab597a4f7790e544e81..d3da93a3e080d53508928af23f0c8b0068568b03 100644 (file)
@@ -329,9 +329,11 @@ fn visit_mod(&mut self, m: &hir::Mod, _sp: Span, id: ast::NodeId) {
         // This code is here instead of in visit_item so that the
         // crate module gets processed as well.
         if self.prev_level.is_some() {
-            for export in self.export_map.get(&id).expect("module isn't found in export map") {
-                if let Some(node_id) = self.tcx.map.as_local_node_id(export.def_id) {
-                    self.update(node_id, Some(AccessLevel::Exported));
+            if let Some(exports) = self.export_map.get(&id) {
+                for export in exports {
+                    if let Some(node_id) = self.tcx.map.as_local_node_id(export.def_id) {
+                        self.update(node_id, Some(AccessLevel::Exported));
+                    }
                 }
             }
         }
@@ -1528,7 +1530,7 @@ fn visit_ty(&mut self, ty: &hir::Ty) {
                                         lint::builtin::PRIVATE_IN_PUBLIC,
                                         node_id,
                                         ty.span,
-                                        "private type in public interface (error E0446)".to_string()
+                                        format!("private type in public interface"),
                                     );
                                 }
                             }