We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b64de7e + f99d43e commit 782c391Copy full SHA for 782c391
src/librustc/middle/ty.rs
@@ -4147,12 +4147,8 @@ pub fn node_id_to_trait_ref<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId)
4147
}
4148
4149
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
-
4154
pub fn node_id_to_type<'tcx>(cx: &ctxt<'tcx>, id: ast::NodeId) -> Ty<'tcx> {
4155
- match try_node_id_to_type(cx, id) {
+ match node_id_to_type_opt(cx, id) {
4156
Some(ty) => ty,
4157
None => cx.sess.bug(
4158
&format!("node_id_to_type: no type for node `{}`",
0 commit comments