mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Avoid mir in missing_errors_doc
This commit is contained in:
parent
45454f0738
commit
ae8ec07d2e
1 changed files with 3 additions and 3 deletions
|
@ -325,9 +325,9 @@ fn lint_for_missing_headers<'tcx>(
|
|||
if_chain! {
|
||||
if let Some(body_id) = body_id;
|
||||
if let Some(future) = cx.tcx.lang_items().future_trait();
|
||||
let def_id = cx.tcx.hir().body_owner_def_id(body_id);
|
||||
let mir = cx.tcx.optimized_mir(def_id.to_def_id());
|
||||
let ret_ty = mir.return_ty();
|
||||
let typeck = cx.tcx.typeck_body(body_id);
|
||||
let body = cx.tcx.hir().body(body_id);
|
||||
let ret_ty = typeck.expr_ty(&body.value);
|
||||
if implements_trait(cx, ret_ty, future, &[]);
|
||||
if let ty::Opaque(_, subs) = ret_ty.kind();
|
||||
if let Some(gen) = subs.types().next();
|
||||
|
|
Loading…
Reference in a new issue