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

feat: use addr_of! instead to create a raw pointer #714

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

peterpeterparker
Copy link
Contributor

❯ npm run build:console

@junobuild/juno@0.0.34 build:console
scripts/cargo.sh console

warning: creating a shared reference to mutable static is discouraged
--> src/libs/storage/src/store.rs:91:13
|
91 | &NEXT_BATCH_ID,
| ^^^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see issue #114447 rust-lang/rust#114447
= note: this will be a hard error in the 2024 edition
= note: this shared reference has lifetime 'static, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior
= note: #[warn(static_mut_refs)] on by default
help: use addr_of! instead to create a raw pointer
|
91 | addr_of!(NEXT_BATCH_ID),
| ~~~~~~~~~~~~~~~~~~~~~~~

warning: creating a shared reference to mutable static is discouraged
--> src/libs/storage/src/store.rs:139:21
|
139 | &NEXT_CHUNK_ID,
| ^^^^^^^^^^^^^^ shared reference to mutable static
|
= note: for more information, see issue #114447 rust-lang/rust#114447
= note: this will be a hard error in the 2024 edition
= note: this shared reference has lifetime 'static, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior
help: use addr_of! instead to create a raw pointer
|
139 | addr_of!(NEXT_CHUNK_ID),
| ~~~~~~~~~~~~~~~~~~~~~~~

@peterpeterparker peterpeterparker merged commit 5ae44af into main Sep 1, 2024
@peterpeterparker peterpeterparker deleted the feat/raw-pointer branch September 1, 2024 09:35
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.

1 participant