Fix clippy warnings #351
GitHub Actions / clippy
succeeded
Jan 28, 2024 in 0s
clippy
2 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 2 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.0-nightly (6b4f1c5e7 2024-01-27)
- cargo 1.77.0-nightly (7bb7b5395 2024-01-20)
- clippy 0.1.77 (6b4f1c5 2024-01-27)
Annotations
Check warning on line 60 in src/runtime.rs
github-actions / clippy
mutable reference of mutable static is discouraged
warning: mutable reference of mutable static is discouraged
--> src/runtime.rs:60:9
|
60 | &mut RUNTIME
| ^^^^^^^^^^^^ mutable reference of mutable static
|
= note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447>
= note: reference of mutable static is a hard error from 2024 edition
= note: mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
= note: `#[warn(static_mut_ref)]` on by default
help: mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
|
60 | addr_of_mut!(RUNTIME)
|
Check warning on line 15 in src/memory.rs
github-actions / clippy
unused imports: `local_roots as ocaml_sys_local_roots`, `set_local_roots as ocaml_sys_set_local_roots`
warning: unused imports: `local_roots as ocaml_sys_local_roots`, `set_local_roots as ocaml_sys_set_local_roots`
--> src/memory.rs:15:17
|
15 | caml_alloc, local_roots as ocaml_sys_local_roots, set_local_roots as ocaml_sys_set_local_roots,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Loading