mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Stabilize transmute
in constants and statics but not const fn
This commit is contained in:
parent
c41fcad908
commit
1eb0053dcd
1 changed files with 1 additions and 9 deletions
|
@ -57,14 +57,6 @@ LL | | t
|
||||||
LL | | }
|
LL | | }
|
||||||
| |_^
|
| |_^
|
||||||
|
|
||||||
error: this could be a `const fn`
|
|
||||||
--> $DIR/could_be_const.rs:48:1
|
|
||||||
|
|
|
||||||
LL | / fn sub(x: u32) -> usize {
|
|
||||||
LL | | unsafe { transmute(&x) }
|
|
||||||
LL | | }
|
|
||||||
| |_^
|
|
||||||
|
|
||||||
error: this could be a `const fn`
|
error: this could be a `const fn`
|
||||||
--> $DIR/could_be_const.rs:67:9
|
--> $DIR/could_be_const.rs:67:9
|
||||||
|
|
|
|
||||||
|
@ -73,5 +65,5 @@ LL | | B
|
||||||
LL | | }
|
LL | | }
|
||||||
| |_________^
|
| |_________^
|
||||||
|
|
||||||
error: aborting due to 9 previous errors
|
error: aborting due to 8 previous errors
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue