-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
The warning message of cast_possible_truncation incorrectly refers to cast_precision_loss.
Example code:
#[warn(clippy::cast_possible_truncation)]
#[allow(clippy::cast_precision_loss)]
fn main() {
let x: u16 = 0;
println!("{}", x as u8);
}
The warning message contains the line:
= help: if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss)]` ...
This message is produced by this line of code:
diag.help("if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss)]` ..."); |
Metadata
Metadata
Assignees
Labels
No labels