Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exteranal macros for as_conversions
- Loading branch information
chansuke
committed
Nov 10, 2020
1 parent
dd826b4
commit faa3e23
Showing
3 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#[warn(clippy::as_conversions)] | ||
// aux-build:macro_rules.rs | ||
|
||
#![warn(clippy::as_conversions)] | ||
|
||
#[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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters