1
Fork 0

Replace mir_built query with a hook and use mir_const everywhere instead

This commit is contained in:
Oli Scherer 2024-03-19 10:17:15 +00:00
parent 91b87c4f45
commit 36728f1cdd
15 changed files with 56 additions and 73 deletions

View file

@ -485,19 +485,12 @@ rustc_queries! {
separate_provide_extern
}
/// Fetch the MIR for a given `DefId` right after it's built - this includes
/// unreachable code.
query mir_built(key: LocalDefId) -> &'tcx Steal<mir::Body<'tcx>> {
desc { |tcx| "building MIR for `{}`", tcx.def_path_str(key) }
}
/// Fetch the MIR for a given `DefId` up till the point where it is
/// ready for const qualification.
///
/// See the README for the `mir` module for details.
query mir_const(key: LocalDefId) -> &'tcx Steal<mir::Body<'tcx>> {
desc { |tcx| "preparing `{}` for borrow checking", tcx.def_path_str(key) }
no_hash
}
/// Try to build an abstract representation of the given constant.