Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(parser): add no_std support for CustomError #718

Closed
wants to merge 1 commit into from

Conversation

shuhuiluo
Copy link

@shuhuiluo shuhuiluo commented Sep 1, 2024

Motivation

Closes #717.

Solution

impl core::error::Error for CustomError

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

This commit implements `core::error::Error` for `CustomError` when the `std` feature is not enabled. This change ensures compatibility with environments that do not support the standard library.
Comment on lines +27 to +28
#[cfg(not(feature = "std"))]
impl core::error::Error for CustomError {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be no_std already?

this isn't supported yet with the current msrv

Copy link

@StackOverflowExcept1on StackOverflowExcept1on Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb add https://crates.io/crates/rustversion macro here? (impl core::error::Error for rust 1.81+)

@DaniPopes
Copy link
Member

This breaks MSRV, and have another fix in #720

@DaniPopes DaniPopes closed this Sep 3, 2024
@shuhuiluo shuhuiluo deleted the custom-error branch September 3, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Alloy-sol-type-parser blocking compile of alloy crate
4 participants