]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/builtin.rs
rustc: remove unnecessary ItemSubsts wrapper.
[rust.git] / src / librustc_lint / builtin.rs
index 13c69d105302f0d9e1bea2db3be546e9f2914358..8a374358bb9981d00e48c048a1ca8108d412e5e2 100644 (file)
@@ -911,8 +911,7 @@ fn expr_refers_to_this_method(cx: &LateContext,
                     };
                     match def {
                         Def::Method(def_id) => {
-                            let substs = cx.tables.node_id_item_substs(callee.id)
-                                .unwrap_or_else(|| cx.tcx.intern_substs(&[]));
+                            let substs = cx.tables.node_substs(callee.id);
                             method_call_refers_to_method(
                                 cx.tcx, method, def_id, substs, id)
                         }