Make unconditional_recursion
warning detect recursive drops
This commit is contained in:
parent
eed34b8bc1
commit
b4b33df983
7 changed files with 152 additions and 19 deletions
|
@ -18,6 +18,7 @@ rustc_hir = { path = "../rustc_hir" }
|
|||
rustc_index = { path = "../rustc_index" }
|
||||
rustc_middle = { path = "../rustc_middle" }
|
||||
rustc_const_eval = { path = "../rustc_const_eval" }
|
||||
rustc_mir_build = { path = "../rustc_mir_build" }
|
||||
rustc_mir_dataflow = { path = "../rustc_mir_dataflow" }
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
|
|
|
@ -446,6 +446,10 @@ fn mir_drops_elaborated_and_const_checked(tcx: TyCtxt<'_>, def: LocalDefId) -> &
|
|||
|
||||
run_analysis_to_runtime_passes(tcx, &mut body);
|
||||
|
||||
// Now that drop elaboration has been performed, we can check for
|
||||
// unconditional drop recursion.
|
||||
rustc_mir_build::lints::check_drop_recursion(tcx, &body);
|
||||
|
||||
tcx.alloc_steal_mir(body)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue