diff options
| author | Michael Goulet <michael@errs.io> | 2022-10-04 03:22:45 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-10-04 03:29:19 +0000 |
| commit | e1b313af46b74a446d7772a261e006c199a5b2e0 (patch) | |
| tree | 8bf3c92a89d1334267102792313535e7a0037564 /compiler/rustc_lint/src/noop_method_call.rs | |
| parent | 8c600120e6abd8c25a88443451d190c68142180f (diff) | |
| download | rust-e1b313af46b74a446d7772a261e006c199a5b2e0.tar.gz rust-e1b313af46b74a446d7772a261e006c199a5b2e0.zip | |
We are able to resolve methods even if they need subst
Diffstat (limited to 'compiler/rustc_lint/src/noop_method_call.rs')
| -rw-r--r-- | compiler/rustc_lint/src/noop_method_call.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_lint/src/noop_method_call.rs b/compiler/rustc_lint/src/noop_method_call.rs index 2a3ff3a7546..9a62afd3caf 100644 --- a/compiler/rustc_lint/src/noop_method_call.rs +++ b/compiler/rustc_lint/src/noop_method_call.rs @@ -1,5 +1,4 @@ use crate::context::LintContext; -use crate::rustc_middle::ty::TypeVisitable; use crate::LateContext; use crate::LateLintPass; use rustc_errors::fluent; @@ -65,11 +64,6 @@ impl<'tcx> LateLintPass<'tcx> for NoopMethodCall { let substs = cx .tcx .normalize_erasing_regions(cx.param_env, cx.typeck_results().node_substs(expr.hir_id)); - if substs.needs_subst() { - // We can't resolve on types that require monomorphization, so we don't handle them if - // we need to perform substitution. - return; - } // Resolve the trait method instance. let Ok(Some(i)) = ty::Instance::resolve(cx.tcx, cx.param_env, did, substs) else { return |
