Skip to content

Move core to workspace crate rune-core

Sign in for the full log view
GitHub Actions / clippy succeeded Dec 9, 2023 in 3s

clippy

194 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 194
Note 0
Help 0

Versions

  • rustc 1.75.0-beta.5 (1a06ac5b5 2023-12-01)
  • cargo 1.75.0-beta.5 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (1a06ac5 2023-12-01)

Annotations

Check warning on line 98 in crates/rune-core/src/gc/context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
  --> crates/rune-core/src/gc/context.rs:98:5
   |
98 |     pub fn new_local_unchecked() -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new_local_unchecked() -> Self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 93 in crates/rune-core/src/gc/context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
  --> crates/rune-core/src/gc/context.rs:93:5
   |
93 |     pub fn new_local() -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new_local() -> Self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 68 in crates/rune-core/src/gc/trace.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

impl for `HashSet` should be generalized over different hashers

warning: impl for `HashSet` should be generalized over different hashers
  --> crates/rune-core/src/gc/trace.rs:68:26
   |
68 | impl<T: Trace> Trace for HashSet<T> {
   |                          ^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
help: consider adding a type parameter
   |
68 | impl<T: Trace, S: ::std::hash::BuildHasher> Trace for HashSet<T, S> {
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           ~~~~~~~~~~~~~

Check warning on line 57 in crates/rune-core/src/gc/trace.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

impl for `HashMap` should be generalized over different hashers

warning: impl for `HashMap` should be generalized over different hashers
  --> crates/rune-core/src/gc/trace.rs:57:36
   |
57 | impl<K: Trace, V: Trace> Trace for HashMap<K, V> {
   |                                    ^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
help: consider adding a type parameter
   |
57 | impl<K: Trace, V: Trace, S: ::std::hash::BuildHasher> Trace for HashMap<K, V, S> {
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           ~~~~~~~~~~~~~~~~

Check warning on line 543 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

impl for `HashSet` should be generalized over different hashers

warning: impl for `HashSet` should be generalized over different hashers
   --> crates/rune-core/src/gc/root.rs:543:22
    |
543 | impl<T> Deref for Rt<HashSet<T>> {
    |                      ^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
help: consider adding a type parameter
    |
543 | impl<T, S: ::std::hash::BuildHasher> Deref for Rt<HashSet<T, S>> {
    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ~~~~~~~~~~~~~

Check warning on line 535 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

impl for `HashMap` should be generalized over different hashers

warning: impl for `HashMap` should be generalized over different hashers
   --> crates/rune-core/src/gc/root.rs:535:25
    |
535 | impl<K, V> Deref for Rt<HashMap<K, V>> {
    |                         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
help: consider adding a type parameter
    |
535 | impl<K, V, S: ::std::hash::BuildHasher> Deref for Rt<HashMap<K, V, S>> {
    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ~~~~~~~~~~~~~~~~

Check warning on line 510 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

impl for `HashMap` should be generalized over different hashers

warning: impl for `HashMap` should be generalized over different hashers
   --> crates/rune-core/src/gc/root.rs:510:15
    |
510 | impl<K, V> Rt<HashMap<K, V>>
    |               ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
    = note: `-W clippy::implicit-hasher` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::implicit_hasher)]`
help: consider adding a type parameter
    |
510 | impl<K, V, S: ::std::hash::BuildHasher> Rt<HashMap<K, V, S>>
    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~

Check warning on line 371 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> crates/rune-core/src/gc/root.rs:369:5
    |
369 | /     pub fn try_as_option<T, E>(&self) -> Result<Option<&Rt<Gc<T>>>, E>
370 | |     where
371 | |         GcObj<'static>: TryInto<Gc<T>, Error = E>,
    | |__________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 334 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/rune-core/src/gc/root.rs:334:5
    |
334 |     pub fn as_cons(&self) -> &Rt<Gc<&Cons>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn as_cons(&self) -> &Rt<Gc<&Cons>>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 324 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/rune-core/src/gc/root.rs:324:5
    |
324 |     pub fn use_as<U>(&self) -> &Rt<Gc<U>>
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn use_as<U>(&self) -> &Rt<Gc<U>>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 318 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> crates/rune-core/src/gc/root.rs:315:5
    |
315 | /     pub fn bind_as<'ob, U, E>(&self, _cx: &'ob Context) -> Result<U, E>
316 | |     where
317 | |         Gc<T>: WithLifetime<'ob> + Copy,
318 | |         <Gc<T> as WithLifetime<'ob>>::Out: TryInto<U, Error = E> + Copy,
    | |________________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 307 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
   --> crates/rune-core/src/gc/root.rs:305:5
    |
305 | /     pub fn try_into<U, E>(&self) -> Result<&Rt<Gc<U>>, E>
306 | |     where
307 | |         Gc<T>: TryInto<Gc<U>, Error = E> + Copy,
    | |________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 260 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unsafe function's docs miss `# Safety` section

warning: unsafe function's docs miss `# Safety` section
   --> crates/rune-core/src/gc/root.rs:258:5
    |
258 | /     pub unsafe fn bind_unchecked<'ob>(&'ob self) -> <T as WithLifetime<'ob>>::Out
259 | |     where
260 | |         T: WithLifetime<'ob> + Copy,
    | |____________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc

Check warning on line 98 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unsafe function's docs miss `# Safety` section

warning: unsafe function's docs miss `# Safety` section
  --> crates/rune-core/src/gc/root.rs:98:5
   |
98 |     pub unsafe fn new(data: &'rt mut T, root_set: &'rt RootSet) -> __StackRoot<'rt, T> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc

Check warning on line 26 in crates/rune-core/src/gc/root.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unsafe function's docs miss `# Safety` section

warning: unsafe function's docs miss `# Safety` section
  --> crates/rune-core/src/gc/root.rs:26:5
   |
26 |     unsafe fn into_root(self) -> T;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc

Check warning on line 45 in crates/rune-core/src/object/vector.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
  --> crates/rune-core/src/object/vector.rs:45:5
   |
45 |     pub fn try_mut(&self) -> Result<&[MutObjCell]> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 36 in crates/rune-core/src/object/vector.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unsafe function's docs miss `# Safety` section

warning: unsafe function's docs miss `# Safety` section
  --> crates/rune-core/src/object/vector.rs:36:5
   |
36 |     pub unsafe fn new(vec: Vec<GcObj>) -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc

Check warning on line 36 in crates/rune-core/src/object/vector.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
  --> crates/rune-core/src/object/vector.rs:36:5
   |
36 |     pub unsafe fn new(vec: Vec<GcObj>) -> Self {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub unsafe fn new(vec: Vec<GcObj>) -> Self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 1443 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
    --> crates/rune-core/src/object/tagged.rs:1443:5
     |
1443 |     pub fn car(self) -> GcObj<'ob> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn car(self) -> GcObj<'ob>`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 1326 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
    --> crates/rune-core/src/object/tagged.rs:1326:5
     |
1326 |     pub fn as_cons(self) -> &'ob Cons {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn as_cons(self) -> &'ob Cons`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 1179 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
    --> crates/rune-core/src/object/tagged.rs:1179:5
     |
1179 |     pub fn is_nil(self) -> bool {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_nil(self) -> bool`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 1170 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

docs for function returning `Result` missing `# Errors` section

warning: docs for function returning `Result` missing `# Errors` section
    --> crates/rune-core/src/object/tagged.rs:1168:5
     |
1168 | /     pub fn try_from_option<T, E>(value: GcObj<'ob>) -> Result<Option<T>, E>
1169 | |     where
1170 | |         GcObj<'ob>: TryInto<T, Error = E>,
     | |__________________________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc

Check warning on line 991 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/rune-core/src/object/tagged.rs:991:5
    |
991 |     pub fn get_type(self) -> Type {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn get_type(self) -> Type`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 902 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/rune-core/src/object/tagged.rs:902:5
    |
902 |     pub fn empty() -> Gc<Self> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn empty() -> Gc<Self>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate

Check warning on line 769 in crates/rune-core/src/object/tagged.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this method could have a `#[must_use]` attribute

warning: this method could have a `#[must_use]` attribute
   --> crates/rune-core/src/object/tagged.rs:769:5
    |
769 |     pub fn val(self) -> NumberValue {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn val(self) -> NumberValue`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate