summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/as_conversions.rs
blob: 69f1c541c4eed2ff735bf9aa95ccae585276ceb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@aux-build:proc_macros.rs:proc-macro

#![warn(clippy::as_conversions)]
#![allow(clippy::borrow_as_ptr, unused)]

extern crate proc_macros;
use proc_macros::{external, with_span};

fn main() {
    let i = 0u32 as u64;

    let j = &i as *const u64 as *mut u64;

    external!(0u32 as u64);
}

with_span!(
    span

    fn coverting() {
        let x = 0u32 as u64;
    }
);