summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/as_conversions.rs
blob: ba4394defbf20d75f6f3c33bc47c48123b9fcb4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// aux-build:macro_rules.rs

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

#[macro_use]
extern crate macro_rules;

fn with_external_macro() {
    as_conv_with_arg!(0u32 as u64);
    as_conv!();
}

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

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

    with_external_macro();
}