mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Format let-else
This commit is contained in:
parent
28fcd1bdd7
commit
69cd3c30ac
38 changed files with 572 additions and 306 deletions
|
@ -61,7 +61,9 @@ impl CommentBlock {
|
|||
let mut blocks = CommentBlock::extract_untagged(text);
|
||||
blocks.retain_mut(|block| {
|
||||
let first = block.contents.remove(0);
|
||||
let Some(id) = first.strip_prefix(&tag) else { return false; };
|
||||
let Some(id) = first.strip_prefix(&tag) else {
|
||||
return false;
|
||||
};
|
||||
|
||||
if block.is_doc {
|
||||
panic!("Use plain (non-doc) comments with tags like {tag}:\n {first}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue