mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Mark unused mbe variable as Binding::Empty
This commit is contained in:
parent
26b4998114
commit
4ba4747578
2 changed files with 61 additions and 13 deletions
|
@ -1244,7 +1244,12 @@ fn test_cfg_if_main() {
|
|||
$( ( ($($meta),*) ($($it)*) ), )*
|
||||
( () ($($it2)*) ),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Internal macro to Apply a cfg attribute to a list of items
|
||||
(@__apply $m:meta, $($it:item)*) => {
|
||||
$(#[$m] $it)*
|
||||
};
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
@ -1262,6 +1267,12 @@ cfg_if ! {
|
|||
}
|
||||
"#,
|
||||
"__cfg_if_items ! {() ; ((target_env = \"msvc\") ()) , ((all (target_arch = \"wasm32\" , not (target_os = \"emscripten\"))) ()) , (() (mod libunwind ; pub use libunwind :: * ;)) ,}");
|
||||
|
||||
assert_expansion(MacroKind::Items, &rules, r#"
|
||||
cfg_if ! { @ __apply cfg ( all ( not ( any ( not ( any ( target_os = "solaris" , target_os = "illumos" ) ) ) ) ) ) , }
|
||||
"#,
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue