Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 8f878d8

Browse files
committed
1 parent 1a94020 commit 8f878d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use syntax::codemap::Span;
1717
use rustc::lint::{Context, LintPass, LintArray};
1818
use rustc::middle::ty;
1919
use rustc::middle::expr_use_visitor as euv;
20+
use rustc::middle::infer;
2021
use rustc::middle::mem_categorization::{cmt, categorization};
2122
use syntax::attr::AttrMetaMethods;
2223

@@ -40,8 +41,9 @@ impl LintPass for TenaciousPass {
4041

4142
fn check_fn(&mut self, cx: &Context, _: visit::FnKind, decl: &FnDecl, body: &Block, _: Span, id: NodeId) {
4243
let param_env = ty::ParameterEnvironment::for_item(cx.tcx, id);
44+
let infcx = infer::new_infer_ctxt(cx.tcx, &cx.tcx.tables, Some(param_env), false);
4345
let mut v = TenaciousDelegate(cx);
44-
let mut vis = euv::ExprUseVisitor::new(&mut v, &param_env);
46+
let mut vis = euv::ExprUseVisitor::new(&mut v, &infcx);
4547
vis.walk_fn(decl, body)
4648
}
4749
fn check_struct_def(&mut self, cx: &Context, def: &StructDef, _: Ident, _: &Generics, id: NodeId) {

0 commit comments

Comments
 (0)