mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
match_like_matches_macro
This commit is contained in:
parent
2ae2512378
commit
add40c8660
9 changed files with 29 additions and 43 deletions
|
@ -259,10 +259,8 @@ fn crate_supports_no_std(db: &dyn DefDatabase, crate_id: CrateId) -> bool {
|
|||
None => continue,
|
||||
};
|
||||
|
||||
let segments = tt.split(|tt| match tt {
|
||||
tt::TokenTree::Leaf(tt::Leaf::Punct(p)) if p.char == ',' => true,
|
||||
_ => false,
|
||||
});
|
||||
let segments =
|
||||
tt.split(|tt| matches!(tt, tt::TokenTree::Leaf(tt::Leaf::Punct(p)) if p.char == ','));
|
||||
for output in segments.skip(1) {
|
||||
match output {
|
||||
[tt::TokenTree::Leaf(tt::Leaf::Ident(ident))] if ident.text == "no_std" => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue