Skip to content

Cube: first ported kernel + comptime support + variable reuse + cleanup #4208

Cube: first ported kernel + comptime support + variable reuse + cleanup

Cube: first ported kernel + comptime support + variable reuse + cleanup #4208

GitHub Actions / clippy failed May 22, 2024 in 1s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (5)

crates/burn-cube-macros/src/codegen/branch.rs|62 col 52| error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/burn-cube-macros/src/codegen/branch.rs:62:52
|
62 | syn::Expr::Binary(expr) => (codegen_binary(&expr, loop_level, variable_analyses), false),
| ^^^^^ help: change this to: expr
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: -D clippy::needless-borrow implied by -D warnings
= help: to override -D warnings add #[allow(clippy::needless_borrow)]
crates/burn-cube-macros/src/codegen/branch.rs|63 col 46| error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/burn-cube-macros/src/codegen/branch.rs:63:46
|
63 | syn::Expr::Lit(expr) => (codegen_lit(&expr), false),
| ^^^^^ help: change this to: expr
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
crates/burn-cube-macros/src/codegen/branch.rs|65 col 30| error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/burn-cube-macros/src/codegen/branch.rs:65:30
|
65 | codegen_path_rhs(&expr, loop_level, variable_analyses),
| ^^^^^ help: change this to: expr
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
crates/burn-cube-macros/src/codegen/branch.rs|68 col 54| error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/burn-cube-macros/src/codegen/branch.rs:68:54
|
68 | syn::Expr::Call(expr) => parse_function_call(&expr, loop_level, variable_analyses),
| ^^^^^ help: change this to: expr
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
crates/burn-cube-macros/src/codegen/function.rs|80 col 12| error: this creates an owned instance just for comparison
--> crates/burn-cube-macros/src/codegen/function.rs:80:12
|
80 | if ident.to_string() == "Comptime" {
| ^^^^^^^^^^^^^^^^^ help: try: *ident
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
= note: -D clippy::cmp-owned implied by -D warnings
= help: to override -D warnings add #[allow(clippy::cmp_owned)]

Filtered Findings (0)

Annotations

Check failure on line 62 in crates/burn-cube-macros/src/codegen/branch.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] crates/burn-cube-macros/src/codegen/branch.rs#L62

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:62:52
   |
62 |         syn::Expr::Binary(expr) => (codegen_binary(&expr, loop_level, variable_analyses), false),
   |                                                    ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
Raw output
crates/burn-cube-macros/src/codegen/branch.rs:62:52:e:error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:62:52
   |
62 |         syn::Expr::Binary(expr) => (codegen_binary(&expr, loop_level, variable_analyses), false),
   |                                                    ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`


__END__

Check failure on line 63 in crates/burn-cube-macros/src/codegen/branch.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] crates/burn-cube-macros/src/codegen/branch.rs#L63

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:63:46
   |
63 |         syn::Expr::Lit(expr) => (codegen_lit(&expr), false),
   |                                              ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
crates/burn-cube-macros/src/codegen/branch.rs:63:46:e:error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:63:46
   |
63 |         syn::Expr::Lit(expr) => (codegen_lit(&expr), false),
   |                                              ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow


__END__

Check failure on line 65 in crates/burn-cube-macros/src/codegen/branch.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] crates/burn-cube-macros/src/codegen/branch.rs#L65

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:65:30
   |
65 |             codegen_path_rhs(&expr, loop_level, variable_analyses),
   |                              ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
crates/burn-cube-macros/src/codegen/branch.rs:65:30:e:error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:65:30
   |
65 |             codegen_path_rhs(&expr, loop_level, variable_analyses),
   |                              ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow


__END__

Check failure on line 68 in crates/burn-cube-macros/src/codegen/branch.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] crates/burn-cube-macros/src/codegen/branch.rs#L68

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:68:54
   |
68 |         syn::Expr::Call(expr) => parse_function_call(&expr, loop_level, variable_analyses),
   |                                                      ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
crates/burn-cube-macros/src/codegen/branch.rs:68:54:e:error: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/burn-cube-macros/src/codegen/branch.rs:68:54
   |
68 |         syn::Expr::Call(expr) => parse_function_call(&expr, loop_level, variable_analyses),
   |                                                      ^^^^^ help: change this to: `expr`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow


__END__

Check failure on line 80 in crates/burn-cube-macros/src/codegen/function.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] crates/burn-cube-macros/src/codegen/function.rs#L80

error: this creates an owned instance just for comparison
  --> crates/burn-cube-macros/src/codegen/function.rs:80:12
   |
80 |         if ident.to_string() == "Comptime" {
   |            ^^^^^^^^^^^^^^^^^ help: try: `*ident`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
   = note: `-D clippy::cmp-owned` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`
Raw output
crates/burn-cube-macros/src/codegen/function.rs:80:12:e:error: this creates an owned instance just for comparison
  --> crates/burn-cube-macros/src/codegen/function.rs:80:12
   |
80 |         if ident.to_string() == "Comptime" {
   |            ^^^^^^^^^^^^^^^^^ help: try: `*ident`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
   = note: `-D clippy::cmp-owned` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::cmp_owned)]`


__END__