rust/tests/ui/as_underscore.fixed

14 lines
175 B
Rust
Raw Normal View History

2022-06-03 08:59:26 -05:00
// run-rustfix
#![warn(clippy::as_underscore)]
fn foo(_n: usize) {}
fn main() {
let n: u16 = 256;
foo(n as usize);
let n = 0_u128;
let _n: u8 = n as u8;
}