fix "cargo contract build" under example directory #1340
Closed
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.
Within current master branch(commit hash: 268e80a), running "cargo contract build" under example directory(e.g. "examples/erc20") will cause:
error[E0658]: use of unstable library feature 'bool_to_option'
--> /Users/wuyang/src/github.com/paritytech/ink/crates/env/src/engine/on_chain/ext.rs:194:29
|
194 | (code.0 < SENTINEL).then_some(code.0)
| ^^^^^^^^^
|
= note: see issue #80967 rust-lang/rust#80967 for more information
= help: add
#![feature(bool_to_option)]
to the crate attributes to enableFor more information about this error, try
rustc --explain E0658
.error: could not compile
ink_env
due to previous errorThis PR fix it by following its instruction.