mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Auto merge of #14755 - poliorcetics:clippy-fixes, r=Veykril
Fix: a TODO and some clippy fixes - fix(todo): implement IntoIterator for ArenaMap<IDX, V> - chore: remove unused method - fix: remove useless `return`s - fix: various clippy lints - fix: simplify boolean test to a single negation
This commit is contained in:
commit
2df56cadcb
10 changed files with 71 additions and 30 deletions
|
@ -417,7 +417,7 @@ fn postfix_expr(
|
|||
allow_calls = true;
|
||||
block_like = BlockLike::NotBlock;
|
||||
}
|
||||
return (lhs, block_like);
|
||||
(lhs, block_like)
|
||||
}
|
||||
|
||||
fn postfix_dot_expr<const FLOAT_RECOVERY: bool>(
|
||||
|
|
|
@ -19,7 +19,7 @@ use super::*;
|
|||
// struct S;
|
||||
pub(super) fn mod_contents(p: &mut Parser<'_>, stop_on_r_curly: bool) {
|
||||
attributes::inner_attrs(p);
|
||||
while !p.at(EOF) && !(p.at(T!['}']) && stop_on_r_curly) {
|
||||
while !(p.at(EOF) || (p.at(T!['}']) && stop_on_r_curly)) {
|
||||
item_or_macro(p, stop_on_r_curly);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ impl<'t> Parser<'t> {
|
|||
marker.bomb.defuse();
|
||||
marker = new_marker;
|
||||
};
|
||||
self.pos += 1 as usize;
|
||||
self.pos += 1;
|
||||
self.push_event(Event::FloatSplitHack { ends_in_dot });
|
||||
(ends_in_dot, marker)
|
||||
}
|
||||
|
|
|
@ -46,10 +46,8 @@ impl<'a> LexedStr<'a> {
|
|||
// Tag the token as joint if it is float with a fractional part
|
||||
// we use this jointness to inform the parser about what token split
|
||||
// event to emit when we encounter a float literal in a field access
|
||||
if kind == SyntaxKind::FLOAT_NUMBER {
|
||||
if !self.text(i).ends_with('.') {
|
||||
res.was_joint();
|
||||
}
|
||||
if kind == SyntaxKind::FLOAT_NUMBER && !self.text(i).ends_with('.') {
|
||||
res.was_joint();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue