diff options
| author | lcnr <rust@lcnr.de> | 2025-03-14 16:01:09 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-04-08 00:34:40 +0200 |
| commit | f05a23be5c521b865d459154fd7a6cd0f08869ae (patch) | |
| tree | 21447c123be7e907a66c9aada1b3e3fcacb63939 /compiler/rustc_interface/src/passes.rs | |
| parent | e643f59f6da3a84f43e75dea99afaa5b041ea6bf (diff) | |
| download | rust-f05a23be5c521b865d459154fd7a6cd0f08869ae.tar.gz rust-f05a23be5c521b865d459154fd7a6cd0f08869ae.zip | |
borrowck typeck children together with their parent
Diffstat (limited to 'compiler/rustc_interface/src/passes.rs')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 747e36b6a1a..7dfad165836 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -955,7 +955,9 @@ fn run_required_analyses(tcx: TyCtxt<'_>) { // Run unsafety check because it's responsible for stealing and // deallocating THIR. tcx.ensure_ok().check_unsafety(def_id); - tcx.ensure_ok().mir_borrowck(def_id) + if !tcx.is_typeck_child(def_id.to_def_id()) { + tcx.ensure_ok().mir_borrowck(def_id) + } }); }); sess.time("MIR_effect_checking", || { |
