Skip to content

Commit cc0ab82

Browse files
committed
review comment
1 parent 096fbbb commit cc0ab82

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/librustc_typeck/check/method/suggest.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
265265
let snippet = tcx.sess.codemap().span_to_snippet(span)
266266
.unwrap();
267267
let filename = tcx.sess.codemap().span_to_filename(span);
268-
let is_real_filename = match filename {
269-
FileName::Real(_) => true,
270-
_ => false,
271-
};
272268

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

281-
match (is_real_filename, parent_node) {
282-
(true, hir_map::NodeLocal(hir::Local {
277+
match (filename, parent_node) {
278+
(FileName::Real(_), hir_map::NodeLocal(hir::Local {
283279
source: hir::LocalSource::Normal,
284280
ty,
285281
..

0 commit comments

Comments
 (0)