Update CHANGELOG #350
clippy
8 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 8 |
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 117 in src/memory.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'b
warning: the following explicit lifetimes could be elided: 'b
--> src/memory.rs:117:24
|
117 | pub fn alloc_error<'a, 'b, A, Err>(
| ^^
118 | cr: &'a mut OCamlRuntime,
119 | err: OCamlRef<'b, Err>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
117 ~ pub fn alloc_error<'a, A, Err>(
118 | cr: &'a mut OCamlRuntime,
119 ~ err: OCamlRef<'_, Err>,
|
Check warning on line 106 in src/memory.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'b
warning: the following explicit lifetimes could be elided: 'b
--> src/memory.rs:106:21
|
106 | pub fn alloc_ok<'a, 'b, A, Err>(
| ^^
107 | cr: &'a mut OCamlRuntime,
108 | value: OCamlRef<'b, A>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
106 ~ pub fn alloc_ok<'a, A, Err>(
107 | cr: &'a mut OCamlRuntime,
108 ~ value: OCamlRef<'_, A>,
|
Check warning on line 95 in src/memory.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'b
warning: the following explicit lifetimes could be elided: 'b
--> src/memory.rs:95:23
|
95 | pub fn alloc_some<'a, 'b, A>(
| ^^
96 | cr: &'a mut OCamlRuntime,
97 | value: OCamlRef<'b, A>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
95 ~ pub fn alloc_some<'a, A>(
96 | cr: &'a mut OCamlRuntime,
97 ~ value: OCamlRef<'_, A>,
|
Check warning on line 25 in src/conv/to_ocaml.rs
github-actions / clippy
docs for unsafe trait missing `# Safety` section
warning: docs for unsafe trait missing `# Safety` section
--> src/conv/to_ocaml.rs:25:1
|
25 | pub unsafe trait ToOCaml<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
Check warning on line 14 in src/conv/from_ocaml.rs
github-actions / clippy
docs for unsafe trait missing `# Safety` section
warning: docs for unsafe trait missing `# Safety` section
--> src/conv/from_ocaml.rs:14:1
|
14 | pub unsafe trait FromOCaml<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `#[warn(clippy::missing_safety_doc)]` on by default
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,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 11 in src/conv/from_ocaml.rs
github-actions / clippy
unused import: `caml_alloc`
warning: unused import: `caml_alloc`
--> src/conv/from_ocaml.rs:11:17
|
11 | use ocaml_sys::{caml_alloc, caml_sys_double_field};
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default