summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/as_underscore.rs
blob: 97785ed08a8d0a53a9aa5b3949e49faf5f723103 (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 _);

    let n = 0_u128;
    let _n: u8 = n as _;
}