Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Jun 21, 2018
1 parent 096fbbb commit cc0ab82
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/librustc_typeck/check/method/suggest.rs
Expand Up @@ -265,10 +265,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
let snippet = tcx.sess.codemap().span_to_snippet(span)
.unwrap();
let filename = tcx.sess.codemap().span_to_filename(span);
let is_real_filename = match filename {
FileName::Real(_) => true,
_ => false,
};

let parent_node = self.tcx.hir.get(
self.tcx.hir.get_parent_node(node_id),
Expand All @@ -278,8 +274,8 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
concrete_type,
);

match (is_real_filename, parent_node) {
(true, hir_map::NodeLocal(hir::Local {
match (filename, parent_node) {
(FileName::Real(_), hir_map::NodeLocal(hir::Local {
source: hir::LocalSource::Normal,
ty,
..
Expand Down

0 comments on commit cc0ab82

Please sign in to comment.