Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libs/Patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ into the main commit for that patch, and then the *Update* line can be removed.
slightly such that we build a `&mut [u8]` slice and then cast it to a `*mut
u8`, thereby avoiding the need for `u32` altogether.

* Return dummy location in `Location::caller` (last applied: January 22, 2026)

`crucible-mir` does not currently support the `intrinsics::caller_location()`
intrinsic. To prevent this function from throwing translation errors, we have
it return a constant dummy location.

# Notes

This section contains more detailed notes about why certain patches are written
Expand Down
8 changes: 7 additions & 1 deletion libs/core/src/panic/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ impl<'a> Location<'a> {
#[track_caller]
#[inline]
pub const fn caller() -> &'static Location<'static> {
crate::intrinsics::caller_location()
static DUMMY_LOCATION: Location<'static> = Location {
filename: NonNull::from_ref("dummy.rs"),
line: 0,
col: 0,
_filename: PhantomData,
};
&DUMMY_LOCATION
}

/// Returns the name of the source file from which the panic originated.
Expand Down