Closed
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
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment