@@ -234,7 +234,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
234
234
// `pub` is explicitly listed.
235
235
_ => {
236
236
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 ) ||
238
238
self . reexports . contains ( & item. id ) ;
239
239
240
240
self . maybe_insert_id ( item. id ) ;
@@ -275,7 +275,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
275
275
// It's not known until monomorphization if a trait impl item should be reachable
276
276
// from external crates or not. So, we conservatively mark all of them exported and
277
277
// 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
279
279
// src/test/auxiliary/issue-11225-3.rs
280
280
hir:: ItemImpl ( _, _, _, Some ( ref trait_ref) , ref ty, ref impl_items) => {
281
281
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> {
344
344
hir:: ItemForeignMod ( ref foreign_mod) => {
345
345
for foreign_item in & foreign_mod. items {
346
346
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 ) ||
348
348
self . reexports . contains ( & foreign_item. id ) ;
349
349
350
350
if public {
@@ -1471,7 +1471,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for VisiblePrivateTypesVisitor<'a, 'tcx> {
1471
1471
// expression/block context can't possibly contain exported things.
1472
1472
// (Making them no-ops stops us from traversing the whole AST without
1473
1473
// 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
1475
1475
// exported items (e.g. impls) and actual code in rustc itself breaks
1476
1476
// if we don't traverse blocks in `EmbargoVisitor`
1477
1477
fn visit_block ( & mut self , _: & hir:: Block ) { }
0 commit comments