]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #89615 - willcrichton:fix-get-body-with-borrowck-facts, r=oli-obk
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 7 Oct 2021 14:24:54 +0000 (16:24 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Oct 2021 14:24:54 +0000 (16:24 +0200)
commit0fbb011eb447ba4eebdaab6c32b12aac3b6422a2
treed4d30c3c0caf43012a1237d2b07eb06522b93af4
parente32328bdc5a749d4b7d35297c85337522a07bddf
parent549a68b73e4839e8a8d4d3a427a6ccb72f6d164c
Rollup merge of #89615 - willcrichton:fix-get-body-with-borrowck-facts, r=oli-obk

Add InferCtxt::with_opaque_type_inference to get_body_with_borrowck_facts

`mir_borrowck` uses `with_opaque_type_inference` before calling `do_mir_borrowck`: https://github.com/rust-lang/rust/blob/0eabf25b90396dead0b2a1aaa275af18a1ae6008/compiler/rustc_borrowck/src/lib.rs#L132

However `get_body_with_borrowck_facts` does not. Therefore I get an ICE eg when calling this function on the bodies of an async function as described here: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20ICE.20when.20using.20get_body_with_borrowck_facts.20with.20async

This change fixes that bug.

r? `@nikomatsakis`