Skip to content

Commit ab7b345

Browse files
committed
Parens + issue number + typo
1 parent 61cbc84 commit ab7b345

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_privacy/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
234234
// `pub` is explicitly listed.
235235
_ => {
236236
self.prev_public = self.prev_public && item.vis == hir::Public;
237-
self.prev_exported = self.prev_exported && item.vis == hir::Public ||
237+
self.prev_exported = (self.prev_exported && item.vis == hir::Public) ||
238238
self.reexports.contains(&item.id);
239239

240240
self.maybe_insert_id(item.id);
@@ -275,7 +275,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
275275
// It's not known until monomorphization if a trait impl item should be reachable
276276
// from external crates or not. So, we conservatively mark all of them exported and
277277
// the reachability pass (middle::reachable) marks all exported items as reachable.
278-
// For example of private trait impl for private type that shoud be reachable see
278+
// For example of private trait impl for private type that should be reachable see
279279
// src/test/auxiliary/issue-11225-3.rs
280280
hir::ItemImpl(_, _, _, Some(ref trait_ref), ref ty, ref impl_items) => {
281281
let (public_ty, _exported_ty) = self.is_public_exported_ty(&ty);
@@ -344,7 +344,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
344344
hir::ItemForeignMod(ref foreign_mod) => {
345345
for foreign_item in &foreign_mod.items {
346346
let public = self.prev_public && foreign_item.vis == hir::Public;
347-
let exported = self.prev_exported && foreign_item.vis == hir::Public ||
347+
let exported = (self.prev_exported && foreign_item.vis == hir::Public) ||
348348
self.reexports.contains(&foreign_item.id);
349349

350350
if public {
@@ -1471,7 +1471,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for VisiblePrivateTypesVisitor<'a, 'tcx> {
14711471
// expression/block context can't possibly contain exported things.
14721472
// (Making them no-ops stops us from traversing the whole AST without
14731473
// having to be super careful about our `walk_...` calls above.)
1474-
// FIXME: Unfortunately this ^^^ is not true, blocks can contain
1474+
// FIXME(#29524): Unfortunately this ^^^ is not true, blocks can contain
14751475
// exported items (e.g. impls) and actual code in rustc itself breaks
14761476
// if we don't traverse blocks in `EmbargoVisitor`
14771477
fn visit_block(&mut self, _: &hir::Block) {}

0 commit comments

Comments
 (0)