Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
  • Loading branch information
Aaron1011 and Centril authored Jul 28, 2019
1 parent 18bf9dd commit 8811b9c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1706,18 +1706,20 @@ fn find_existential_constraints(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
} else {
debug!("find_existential_constraints: scope={:?}", tcx.hir().get(scope));
match tcx.hir().get(scope) {
// We explicitly call 'visit_*' methods, instead of using intravisit::walk_* methods
// We explicitly call `visit_*` methods, instead of using `intravisit::walk_*` methods
// This allows our visitor to process the defining item itself, causing
// it to pick up any 'sibling' defining uses.
//
// For example, this code:
// ```
// fn foo() {
// existential type Blah: Debug;
// let my_closure = || -> Blah { true };
// }
// ```
//
// requires us to explicitly process 'foo()' in order
// to notice the defining usage of 'Blah'
// requires us to explicitly process `foo()` in order
// to notice the defining usage of `Blah`.
Node::Item(ref it) => locator.visit_item(it),
Node::ImplItem(ref it) => locator.visit_impl_item(it),
Node::TraitItem(ref it) => locator.visit_trait_item(it),
Expand Down

0 comments on commit 8811b9c

Please sign in to comment.