summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/as_underscore.fixed
blob: 948f6d8e6b10b15266fb0b7fb49b0dc523d8ebf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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;
}