Document is_user_relevant

Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
Ben Kimock 2022-11-22 10:19:29 -05:00 committed by GitHub
parent 23270ae8d3
commit 1ca3c293b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -968,6 +968,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
self.threads.active_thread_ref().top_user_relevant_frame()
}
/// This is the source of truth for the `is_user_relevant` flag in our `FrameExtra`.
pub fn is_user_relevant(&self, frame: &Frame<'mir, 'tcx, Provenance>) -> bool {
let def_id = frame.instance.def_id();
(def_id.is_local() || self.local_crates.contains(&def_id.krate))