From 8811b9ce9ffafdbe483cc82ea8a3bcb4ab7cb9af Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sun, 28 Jul 2019 18:33:32 -0400 Subject: [PATCH] Fix formatting Co-Authored-By: Mazdak Farrokhzad --- src/librustc_typeck/collect.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 0f0cbd5d76b4..395e266ae46a 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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),