3 //! Used to test that certain lints don't trigger in imported external macros
13 macro_rules! must_use_unit {
21 macro_rules! try_err {
23 pub fn try_err_fn() -> Result<i32, i32> {
25 // To avoid warnings during rustfix
26 if true { Err(err)? } else { Ok(2) }
32 macro_rules! string_add {
34 let y = "".to_owned();
40 macro_rules! take_external {
42 std::mem::replace($s, Default::default())
47 macro_rules! option_env_unwrap_external {
49 option_env!($env).unwrap()
51 ($env: expr, $message: expr) => {
52 option_env!($env).expect($message)
57 macro_rules! ref_arg_binding {
64 macro_rules! ref_arg_function {
66 fn fun_example(ref _x: usize) {}
71 macro_rules! as_conv_with_arg {
78 macro_rules! as_conv {
85 macro_rules! large_enum_variant {
87 enum LargeEnumInMacro {
95 macro_rules! field_reassign_with_default {
103 let mut a: A = Default::default();
111 macro_rules! default_numeric_fallback {