mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
Rollup merge of #124284 - klensy:no-reads, r=fmease
parser: remove unused(no reads) max_angle_bracket_count field Isn't there (clippy) lint for variables with only writes? They should be marked as dead too, probably. Found only https://rust-lang.github.io/rust-clippy/master/index.html#/collection_is_never_read
This commit is contained in:
commit
5d017f27d5
|
@ -162,7 +162,6 @@ pub struct Parser<'a> {
|
||||||
///
|
///
|
||||||
/// See the comments in the `parse_path_segment` function for more details.
|
/// See the comments in the `parse_path_segment` function for more details.
|
||||||
unmatched_angle_bracket_count: u16,
|
unmatched_angle_bracket_count: u16,
|
||||||
max_angle_bracket_count: u16,
|
|
||||||
angle_bracket_nesting: u16,
|
angle_bracket_nesting: u16,
|
||||||
|
|
||||||
last_unexpected_token_span: Option<Span>,
|
last_unexpected_token_span: Option<Span>,
|
||||||
|
@ -430,7 +429,6 @@ pub fn new(
|
||||||
num_bump_calls: 0,
|
num_bump_calls: 0,
|
||||||
break_last_token: false,
|
break_last_token: false,
|
||||||
unmatched_angle_bracket_count: 0,
|
unmatched_angle_bracket_count: 0,
|
||||||
max_angle_bracket_count: 0,
|
|
||||||
angle_bracket_nesting: 0,
|
angle_bracket_nesting: 0,
|
||||||
last_unexpected_token_span: None,
|
last_unexpected_token_span: None,
|
||||||
subparser_name,
|
subparser_name,
|
||||||
|
@ -778,7 +776,6 @@ fn eat_lt(&mut self) -> bool {
|
||||||
if ate {
|
if ate {
|
||||||
// See doc comment for `unmatched_angle_bracket_count`.
|
// See doc comment for `unmatched_angle_bracket_count`.
|
||||||
self.unmatched_angle_bracket_count += 1;
|
self.unmatched_angle_bracket_count += 1;
|
||||||
self.max_angle_bracket_count += 1;
|
|
||||||
debug!("eat_lt: (increment) count={:?}", self.unmatched_angle_bracket_count);
|
debug!("eat_lt: (increment) count={:?}", self.unmatched_angle_bracket_count);
|
||||||
}
|
}
|
||||||
ate
|
ate
|
||||||
|
|
|
@ -299,7 +299,6 @@ pub(super) fn parse_path_segment(
|
||||||
// parsing a new path.
|
// parsing a new path.
|
||||||
if style == PathStyle::Expr {
|
if style == PathStyle::Expr {
|
||||||
self.unmatched_angle_bracket_count = 0;
|
self.unmatched_angle_bracket_count = 0;
|
||||||
self.max_angle_bracket_count = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generic arguments are found - `<`, `(`, `::<` or `::(`.
|
// Generic arguments are found - `<`, `(`, `::<` or `::(`.
|
||||||
|
|
Loading…
Reference in a new issue