Skip to content

Doc comments, moved TemplateExpansion #39

Doc comments, moved TemplateExpansion

Doc comments, moved TemplateExpansion #39

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy failed Oct 17, 2023 in 0s

clippy

4 errors

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check failure on line 324 in src/lazy/expanded/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

error: returning the result of a `let` binding from a block
   --> src/lazy/expanded/mod.rs:324:9
    |
315 | /         let mut_value = unsafe {
316 | |             // Cast the const pointer to a mut pointer
317 | |             let mut_ptr = ptr as *mut T;
318 | |             // Cast the mut pointer to a mut reference
319 | |             &mut *mut_ptr
320 | |         };
    | |__________- unnecessary `let` binding
...
324 |           mut_value
    |           ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `-D clippy::let-and-return` implied by `-D warnings`
help: return the expression directly
    |
315 ~         
316 |         // ^--- These operations only "exist" at compile time, and should boil away during rustc's
317 |         //      optimization passes.
318 | 
319 ~         unsafe {
320 +             // Cast the const pointer to a mut pointer
321 +             let mut_ptr = ptr as *mut T;
322 +             // Cast the mut pointer to a mut reference
323 +             &mut *mut_ptr
324 +         } as _
    |

Check failure on line 293 in src/lazy/expanded/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mutable borrow from immutable input(s)

error: mutable borrow from immutable input(s)
   --> src/lazy/expanded/mod.rs:293:40
    |
293 |     fn unsafe_get_mut<T>(value: &T) -> &mut T {
    |                                        ^^^^^^
    |
note: immutable borrow here
   --> src/lazy/expanded/mod.rs:293:33
    |
293 |     fn unsafe_get_mut<T>(value: &T) -> &mut T {
    |                                 ^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
    = note: `#[deny(clippy::mut_from_ref)]` on by default

Check failure on line 324 in src/lazy/expanded/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

error: returning the result of a `let` binding from a block
   --> src/lazy/expanded/mod.rs:324:9
    |
315 | /         let mut_value = unsafe {
316 | |             // Cast the const pointer to a mut pointer
317 | |             let mut_ptr = ptr as *mut T;
318 | |             // Cast the mut pointer to a mut reference
319 | |             &mut *mut_ptr
320 | |         };
    | |__________- unnecessary `let` binding
...
324 |           mut_value
    |           ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `-D clippy::let-and-return` implied by `-D warnings`
help: return the expression directly
    |
315 ~         
316 |         // ^--- These operations only "exist" at compile time, and should boil away during rustc's
317 |         //      optimization passes.
318 | 
319 ~         unsafe {
320 +             // Cast the const pointer to a mut pointer
321 +             let mut_ptr = ptr as *mut T;
322 +             // Cast the mut pointer to a mut reference
323 +             &mut *mut_ptr
324 +         } as _
    |

Check failure on line 293 in src/lazy/expanded/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mutable borrow from immutable input(s)

error: mutable borrow from immutable input(s)
   --> src/lazy/expanded/mod.rs:293:40
    |
293 |     fn unsafe_get_mut<T>(value: &T) -> &mut T {
    |                                        ^^^^^^
    |
note: immutable borrow here
   --> src/lazy/expanded/mod.rs:293:33
    |
293 |     fn unsafe_get_mut<T>(value: &T) -> &mut T {
    |                                 ^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
    = note: `#[deny(clippy::mut_from_ref)]` on by default