Skip to content

Commit 72f096b

Browse files
committed
Resolve FIXME(#27942)
1 parent d334027 commit 72f096b

File tree

1 file changed

+1
-21
lines changed
  • src/librustc/infer/error_reporting

1 file changed

+1
-21
lines changed

src/librustc/infer/error_reporting/mod.rs

+1-21
Original file line numberDiff line numberDiff line change
@@ -193,32 +193,12 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
193193

194194
let scope = region.free_region_binding_scope(self);
195195
let node = self.hir.as_local_node_id(scope).unwrap_or(DUMMY_NODE_ID);
196-
let unknown;
197196
let tag = match self.hir.find(node) {
198197
Some(hir_map::NodeBlock(_)) | Some(hir_map::NodeExpr(_)) => "body",
199198
Some(hir_map::NodeItem(it)) => Self::item_scope_tag(&it),
200199
Some(hir_map::NodeTraitItem(it)) => Self::trait_item_scope_tag(&it),
201200
Some(hir_map::NodeImplItem(it)) => Self::impl_item_scope_tag(&it),
202-
203-
// this really should not happen, but it does:
204-
// FIXME(#27942)
205-
Some(_) => {
206-
unknown = format!(
207-
"unexpected node ({}) for scope {:?}. \
208-
Please report a bug.",
209-
self.hir.node_to_string(node),
210-
scope
211-
);
212-
&unknown
213-
}
214-
None => {
215-
unknown = format!(
216-
"unknown node for scope {:?}. \
217-
Please report a bug.",
218-
scope
219-
);
220-
&unknown
221-
}
201+
_ => unreachable!()
222202
};
223203
let (prefix, span) = match *region {
224204
ty::ReEarlyBound(ref br) => {

0 commit comments

Comments
 (0)