We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
missing_transmute_annotations
1 parent a456519 commit 8f9ef1cCopy full SHA for 8f9ef1c
clippy_lints/src/transmute/mod.rs
@@ -437,8 +437,9 @@ declare_clippy_lint! {
437
/// ### Example
438
/// ```no_run
439
/// # unsafe {
440
+ /// let mut x: i32 = 0;
441
/// // Avoid "naked" calls to `transmute()`!
- /// let x: i32 = std::mem::transmute([1u16, 2u16]);
442
+ /// x = std::mem::transmute([1u16, 2u16]);
443
///
444
/// // `first_answers` is intended to transmute a slice of bool to a slice of u8.
445
/// // But the programmer forgot to index the first element of the outer slice,
0 commit comments