You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just did a clippy lint over a project I'm trying to dust off, and managed to hit a whole heap of these:
warning: immediately dereferencing a reference
--> src/grid.rs:342:43
|
342 | let l = phi.slice(s![lx - 2..lx + 3, ly - 2..ly + 3, lz - 2..lz + 3]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#deref_addrof
= note: this error originates in a macro outside of the current crate(in Nightly builds, run with -Z external-macro-backtrace for more info)
help: try this
|
39 | &match $ r {40 | r => {41 | s![42 | @ parse $ crate::SliceNextDim:: next_dim (& r , $ dim ),[43 | $ ( $ stack )* s ! ( @ convert r ),] $ ( $ t )*]}}};
The macro it's highlighting is this one, but adding the suggested additional ampersand isn't the entire solution (if it is at least part of it).
My macro capability is close to 0, so hopefully someone else can identify a fix.
The text was updated successfully, but these errors were encountered:
My guess is that this warning is a result of this workaround for compiler bug rust-lang/rust#23014. I just tried removing the extra *& on the latest stable compiler (1.27), but the workaround is still necessary.
I just tried a few different ways of adding an annotation to tell clippy to ignore this, but didn't have much success getting anything that allowed the tests to compile. (The compiler gave a variety of errors for my attempts, the most common one being error[E0658]: attributes on expressions are experimental. (see issue #15701).)
If anyone can find a way to add an attribute to tell clippy to ignore this, please feel free to submit a PR.
Just did a clippy lint over a project I'm trying to dust off, and managed to hit a whole heap of these:
The macro it's highlighting is this one, but adding the suggested additional ampersand isn't the entire solution (if it is at least part of it).
My macro capability is close to 0, so hopefully someone else can identify a fix.
The text was updated successfully, but these errors were encountered: