diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-15 14:12:03 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-15 14:12:03 -0800 |
| commit | 782c3917898a70ff9f52815c2a48cdef38cb8139 (patch) | |
| tree | 77af8020629eb49b1d87d260cfec7b03a8c57baa | |
| parent | b64de7ea769c047ef60c64e5a6aa3868f46a759e (diff) | |
| parent | f99d43ecc0d043350d38e44b86f33900a8391491 (diff) | |
rollup merge of #21190: FlaPer87/remove_duplicated_func
small cleanup r? @nikomatsakis
| -rw-r--r-- | src/librustc/middle/ty.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 46cce164781..11b605e2e2f 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -4147,12 +4147,8 @@ pub fn node_id_to_trait_ref<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId) } } -pub fn try_node_id_to_type<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId) -> Option<Ty<'tcx>> { - cx.node_types.borrow().get(&id).cloned() -} - pub fn node_id_to_type<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId) -> Ty<'tcx> { - match try_node_id_to_type(cx, id) { + match node_id_to_type_opt(cx, id) { Some(ty) => ty, None => cx.sess.bug( &format!("node_id_to_type: no type for node `{}`", |
