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: add ToString for no_std add exports some types in no_std #1128

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

yjhmelody
Copy link
Contributor

@yjhmelody yjhmelody commented Feb 26, 2024

Seems some versions of rust need this.

error[E0599]: no method named `to_string` found for reference `&'static str` in the current scope
   --> /Users/yjhmelody/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-6.1.0/src/optimism/handler_register.rs:187:68
    |
187 |                 "[OPTIMISM] Failed to load enveloped transaction.".to_string(),
    |                                                                    ^^^^^^^^^ method not found in `&str`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   + use crate::std::string::ToString;
    |

error[E0599]: no method named `to_string` found for reference `&'static str` in the current scope
   --> /Users/yjhmelody/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-6.1.0/src/optimism/handler_register.rs:228:67
    |
228 |                 "[OPTIMISM] Failed to load L1 block information.".to_string(),
    |                                                                   ^^^^^^^^^ method not found in `&str`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   + use crate::std::string::ToString;
    |

error[E0599]: no method named `to_string` found for reference `&'static str` in the current scope
   --> /Users/yjhmelody/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-6.1.0/src/optimism/handler_register.rs:234:68
    |
234 |                 "[OPTIMISM] Failed to load enveloped transaction.".to_string(),
    |                                                                    ^^^^^^^^^ method not found in `&str`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   + use crate::std::string::ToString;
    |

error[E0599]: no method named `to_string` found for reference `&'static str` in the current scope
   --> /Users/yjhmelody/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-6.1.0/src/optimism/handler_register.rs:247:67
    |
247 |                 "[OPTIMISM] Failed to load L1 Fee Vault account.".to_string(),
    |                                                                   ^^^^^^^^^ method not found in `&str`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   + use crate::std::string::ToString;
    |

error[E0599]: no method named `to_string` found for reference `&'static str` in the current scope
   --> /Users/yjhmelody/.cargo/registry/src/index.crates.io-6f17d22bba15001f/revm-6.1.0/src/optimism/handler_register.rs:260:69
    |
260 |                 "[OPTIMISM] Failed to load Base Fee Vault account.".to_string(),
    |                                                                     ^^^^^^^^^ method not found in `&str`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   + use crate::std::string::ToString;
    |

For more information about this error, try `rustc --explain E0599`.
error: could not compile `revm` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...

And some types should also work in no_std.

@yjhmelody yjhmelody changed the title fix: add ToString for no_std fix: add ToString for no_std add exports some types in no_std Feb 26, 2024
Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

nice one!

@rakita rakita merged commit 1ad6387 into bluealloy:main Feb 26, 2024
25 checks passed
@github-actions github-actions bot mentioned this pull request Feb 26, 2024
fubuloubu pushed a commit to ApeWorX/revm that referenced this pull request Apr 11, 2024
…alloy#1128)

* fix: add ToString for no_std

* fmt

* support no_std for some types
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.

2 participants