diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-06-22 16:05:31 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-06-22 16:05:31 -0700 |
| commit | 3eb8eb942951d66fe1f0cc1be3a47cd9f147fc3e (patch) | |
| tree | 3e4a90f27e765a509ad2a08928cb04c1e2514e76 /src/librustc_middle | |
| parent | 562f4967b4ce7e859b807fc022040bbb22d1f70e (diff) | |
| download | rust-3eb8eb942951d66fe1f0cc1be3a47cd9f147fc3e.tar.gz rust-3eb8eb942951d66fe1f0cc1be3a47cd9f147fc3e.zip | |
review comments
Diffstat (limited to 'src/librustc_middle')
| -rw-r--r-- | src/librustc_middle/ty/context.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_middle/ty/context.rs b/src/librustc_middle/ty/context.rs index 73374bb1e84..e8ea7dba217 100644 --- a/src/librustc_middle/ty/context.rs +++ b/src/librustc_middle/ty/context.rs @@ -1406,7 +1406,8 @@ impl<'tcx> TyCtxt<'tcx> { }) } - pub fn return_type_impl_or_dyn_trait(&self, scope_def_id: DefId) -> Vec<&'tcx hir::Ty<'tcx>> { + /// Given a `DefId` for an `fn`, return all the `dyn` and `impl` traits in its return type. + pub fn return_type_impl_or_dyn_traits(&self, scope_def_id: DefId) -> Vec<&'tcx hir::Ty<'tcx>> { let hir_id = self.hir().as_local_hir_id(scope_def_id.expect_local()); let hir_output = match self.hir().get(hir_id) { Node::Item(hir::Item { |
