2023-08-24 21:32:12 +02:00
|
|
|
//@aux-build:proc_macros.rs
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
#![warn(clippy::as_conversions)]
|
2023-07-02 14:35:19 +02:00
|
|
|
#![allow(clippy::borrow_as_ptr, unused)]
|
2020-12-06 15:01:03 +01:00
|
|
|
|
2023-03-24 14:04:35 +01:00
|
|
|
extern crate proc_macros;
|
2023-07-17 10:19:29 +02:00
|
|
|
use proc_macros::{external, with_span};
|
2019-11-15 22:27:07 +03:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let i = 0u32 as u64;
|
|
|
|
|
|
|
|
let j = &i as *const u64 as *mut u64;
|
2020-12-06 15:01:03 +01:00
|
|
|
|
2023-03-24 14:04:35 +01:00
|
|
|
external!(0u32 as u64);
|
2019-11-15 22:27:07 +03:00
|
|
|
}
|
2023-07-02 14:35:19 +02:00
|
|
|
|
|
|
|
with_span!(
|
|
|
|
span
|
|
|
|
|
2024-01-11 17:27:03 +01:00
|
|
|
fn converting() {
|
2023-07-02 14:35:19 +02:00
|
|
|
let x = 0u32 as u64;
|
|
|
|
}
|
|
|
|
);
|