]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_resolve/src/effective_visibilities.rs
New upstream version 1.71.1+dfsg1
[rustc.git] / compiler / rustc_resolve / src / effective_visibilities.rs
index bed579f6b9258607aa766900b326ac8f4a903ce4..7393bdb388a56e8c57db275de99a4e4b0e2701be 100644 (file)
@@ -175,7 +175,7 @@ impl<'r, 'a, 'tcx> EffectiveVisibilitiesVisitor<'r, 'a, 'tcx> {
     /// to not update anything and we can skip it.
     ///
     /// We are checking this condition only if the correct value of private visibility is
-    /// cheaply available, otherwise it does't make sense performance-wise.
+    /// cheaply available, otherwise it doesn't make sense performance-wise.
     ///
     /// `None` is returned if the update can be skipped,
     /// and cheap private visibility is returned otherwise.
@@ -199,7 +199,7 @@ impl<'r, 'a, 'tcx> EffectiveVisibilitiesVisitor<'r, 'a, 'tcx> {
         let tcx = self.r.tcx;
         self.changed |= self.import_effective_visibilities.update(
             binding,
-            nominal_vis,
+            Some(nominal_vis),
             || cheap_private_vis.unwrap_or_else(|| self.r.private_vis_import(binding)),
             inherited_eff_vis,
             parent_id.level(),
@@ -213,7 +213,7 @@ impl<'r, 'a, 'tcx> EffectiveVisibilitiesVisitor<'r, 'a, 'tcx> {
         let tcx = self.r.tcx;
         self.changed |= self.def_effective_visibilities.update(
             def_id,
-            nominal_vis,
+            Some(nominal_vis),
             || cheap_private_vis.unwrap_or_else(|| self.r.private_vis_def(def_id)),
             inherited_eff_vis,
             parent_id.level(),