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
A SourceCode is anything that implements the SourceCode trait. If you want to work off a file more dynamically, you'll need to write an implementation for it. All you need to be able to do is tell miette how to read a specific span from it: https://github.com/zkat/miette/blob/main/src/protocol.rs#L211-L231
I always thought that miette was a crate like coloreyre. Later I figured out that miette is suitable for some lexical analysis or as a language interpreter. I'm not sure. I always want to let miette capture the context part of the current rs code to use in some fancy output can be displayed when panic, this is probably some misunderstanding of mine
In the example in the repo README, the src of the NamedSource is a hardcoded source
Does this mean that I need to hardcode some current error context codes for each error, and calculate the offset that needs to be labeled by myself?
I saw the SourceCode in the proc-macro, just got the ident, it seems that there is no step to get the source code file?
The text was updated successfully, but these errors were encountered: