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
36 macro_rules! string_add {
38 let y = "".to_owned();
44 macro_rules! take_external {
46 std::mem::replace($s, Default::default())
51 macro_rules! option_env_unwrap_external {
53 option_env!($env).unwrap()
55 ($env: expr, $message: expr) => {
56 option_env!($env).expect($message)
61 macro_rules! ref_arg_binding {
68 macro_rules! ref_arg_function {
70 fn fun_example(ref _x: usize) {}
75 macro_rules! as_conv_with_arg {
82 macro_rules! as_conv {
89 macro_rules! large_enum_variant {
91 enum LargeEnumInMacro {
99 macro_rules! field_reassign_with_default {
107 let mut a: A = Default::default();