Skip to content

Commit 782c391

Browse files
committed
rollup merge of #21190: FlaPer87/remove_duplicated_func
small cleanup r? @nikomatsakis
2 parents b64de7e + f99d43e commit 782c391

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/librustc/middle/ty.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4147,12 +4147,8 @@ pub fn node_id_to_trait_ref<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId)
41474147
}
41484148
}
41494149

4150-
pub fn try_node_id_to_type<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId) -> Option<Ty<'tcx>> {
4151-
cx.node_types.borrow().get(&id).cloned()
4152-
}
4153-
41544150
pub fn node_id_to_type<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId) -> Ty<'tcx> {
4155-
match try_node_id_to_type(cx, id) {
4151+
match node_id_to_type_opt(cx, id) {
41564152
Some(ty) => ty,
41574153
None => cx.sess.bug(
41584154
&format!("node_id_to_type: no type for node `{}`",

0 commit comments

Comments
 (0)