-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Issue building with Rust edition 2024
.
The error log:
error: unsafe attribute used without unsafe
--> /redacted/flipper/lib.rs:6:5
|
6 | / /// Defines the storage of your contract.
7 | | /// Add new fields to the below struct in order
8 | | /// to add new static storage fields to your contract.
9 | | #[ink(storage)]
... |
12 | | value: bool,
13 | | }
| |_____^ usage of unsafe attribute
|
help: wrap the attribute in `unsafe(...)`
|
6 ~ unsafe(/// Defines the storage of your contract.
7 | /// Add new fields to the below struct in order
...
12 | value: bool,
13 ~ })
|
error: could not compile `flipper` (bin "flipper") due to 1 previous error
ERROR:
To Reproduce
Steps to reproduce the behavior:
- Create the flipper contract example:
cargo contract new flipper
- In the
Cargo.toml
change[package.edition]
to "2024". The default here was "2021". - Build:
cargo contract build
Expected behavior
Having a more intuitive error from the cargo-contract
tooling would help if the edition it's not yet supported.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS:
MacOS M1
cargo-contract
version:5.0.3-unknown-aarch64-apple-darwin
- ink! version:
5.1.1
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working