-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingT-const-genericsType: Issues related to const genericsType: Issues related to const genericsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
cargo clippy -V
#=> clippy 0.0.212 (07f1736 2020-02-11)
warning: this could be a `const fn`
--> src/vm/unmarshal.rs:23:1
|
23 | / fn fix_slice_size<T, const N : usize>(slice : &[T]) -> &[T; N] {
24 | | let ptr = slice.as_ptr() as *const [T; N];
25 | | unsafe { &*ptr }
26 | | }
| |_^
|
This is a false suggestion, since const parameters are not permitted in const fn
.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingT-const-genericsType: Issues related to const genericsType: Issues related to const genericsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy