mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 05:42:47 +00:00
13 lines
170 B
Rust
13 lines
170 B
Rust
// run-rustfix
|
|
|
|
#![warn(clippy::as_underscore)]
|
|
|
|
fn foo(_n: usize) {}
|
|
|
|
fn main() {
|
|
let n: u16 = 256;
|
|
foo(n as _);
|
|
|
|
let n = 0_u128;
|
|
let _n: u8 = n as _;
|
|
}
|