diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 46cce164781f..11b605e2e2fe 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> { - 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 `{}`",