Add import errors#265
Merged
KyrylR merged 1 commit intoBlockstreamResearch:dev/importsfrom Apr 1, 2026
Merged
Conversation
KyrylR
reviewed
Apr 1, 2026
src/error.rs
Outdated
| { | ||
| fn merge(self, other: Self) -> Self { | ||
| match (&self.error, &other.error) { | ||
| match (&*self.error, &*other.error) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| match (&*self.error, &*other.error) { | |
| match (self.error.as_ref(), other.error.as_ref()) { |
src/error.rs
Outdated
| if let Error::Syntax { | ||
| label: ref mut l, .. | ||
| } = &mut self.error | ||
| } = &mut *self.error |
Collaborator
There was a problem hiding this comment.
Suggested change
| } = &mut *self.error | |
| } = self.error.as_mut() |
src/error.rs
Outdated
| ), | ||
| Error::Resolution(description) => write!( | ||
| f, | ||
| "Resolution error: {description}" |
Collaborator
There was a problem hiding this comment.
Could you add more explanation to those messages
Collaborator
Author
There was a problem hiding this comment.
As we remove Virtual from the SourceFile struct, it is no longer needed. I will therefore remove it
fad11ab to
31056a9
Compare
31056a9 to
876e973
Compare
KyrylR
reviewed
Apr 1, 2026
876e973 to
0bb3a67
Compare
KyrylR
reviewed
Apr 1, 2026
Ari4ka
approved these changes
Apr 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds a useful set of errors for the import functionality. Also, the
Errorfield inside theRichErrorstruct was changed toBox<Error>to prevent large memory allocations on the stack and resolveclippyerrors.