about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlavio Percoco <flaper87@gmail.com>2015-01-15 11:59:13 +0100
committerFlavio Percoco <flaper87@gmail.com>2015-01-15 11:59:13 +0100
commitf99d43ecc0d043350d38e44b86f33900a8391491 (patch)
tree34298130e3e55ec8f5aa90721f6fa15f8a0859fe
parent0c96037ec1676b420002a06ea337865f95abbf2c (diff)
downloadrust-f99d43ecc0d043350d38e44b86f33900a8391491.tar.gz
rust-f99d43ecc0d043350d38e44b86f33900a8391491.zip
remove try_node_id_to_type in favor of node_id_to_type_opt
-rw-r--r--src/librustc/middle/ty.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 755983c71bb..cd8d9be2d69 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -4133,12 +4133,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 `{}`",