You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could override intrinsics::caller_location in crucible-mir, I suppose. The main drawback of doing so is that it we'd have to fill out the fields of the Location struct using the crucible-mir API, which would be quite a bit more verbose than writing the same code directly in Rust. Doable, but perhaps a bit tiresome. Moreover, we'd need to ensure that we update this code any time the definition of Location changes.
Given this, I decided to go with the approach of patching Location::caller instead. This function is the only place in all of the standard libraries where intrinsics::caller_location is invoked, so patching Location::caller seemed to give the same benefits with less code. It's possible that there might be another crate in the wild that calls intrinsics::caller_location directly, but I haven't ran into one yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
standard librariesIssues involving mir-json's modified versions of the Rust standard libraries
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #227.