mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-18 03:13:31 +00:00
Fix new nightly lints
This commit is contained in:
parent
232432411e
commit
6c23f25e7f
24 changed files with 81 additions and 51 deletions
|
|
@ -79,7 +79,7 @@ impl CommentBlock {
|
|||
let mut block = dummy_block.clone();
|
||||
for (line_num, line) in lines.enumerate() {
|
||||
match line.strip_prefix("//") {
|
||||
Some(mut contents) => {
|
||||
Some(mut contents) if !contents.starts_with('/') => {
|
||||
if let Some('/' | '!') = contents.chars().next() {
|
||||
contents = &contents[1..];
|
||||
block.is_doc = true;
|
||||
|
|
@ -89,7 +89,7 @@ impl CommentBlock {
|
|||
}
|
||||
block.contents.push(contents.to_owned());
|
||||
}
|
||||
None => {
|
||||
_ => {
|
||||
if !block.contents.is_empty() {
|
||||
let block = mem::replace(&mut block, dummy_block.clone());
|
||||
res.push(block);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue