Skip to content

Commit 5d017f2

Browse files
authored
Rollup merge of rust-lang#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
2 parents 57dad1d + 9bd175c commit 5d017f2

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

compiler/rustc_parse/src/parser/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ pub struct Parser<'a> {
162162
///
163163
/// See the comments in the `parse_path_segment` function for more details.
164164
unmatched_angle_bracket_count: u16,
165-
max_angle_bracket_count: u16,
166165
angle_bracket_nesting: u16,
167166

168167
last_unexpected_token_span: Option<Span>,
@@ -430,7 +429,6 @@ impl<'a> Parser<'a> {
430429
num_bump_calls: 0,
431430
break_last_token: false,
432431
unmatched_angle_bracket_count: 0,
433-
max_angle_bracket_count: 0,
434432
angle_bracket_nesting: 0,
435433
last_unexpected_token_span: None,
436434
subparser_name,
@@ -778,7 +776,6 @@ impl<'a> Parser<'a> {
778776
if ate {
779777
// See doc comment for `unmatched_angle_bracket_count`.
780778
self.unmatched_angle_bracket_count += 1;
781-
self.max_angle_bracket_count += 1;
782779
debug!("eat_lt: (increment) count={:?}", self.unmatched_angle_bracket_count);
783780
}
784781
ate

compiler/rustc_parse/src/parser/path.rs

-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ impl<'a> Parser<'a> {
299299
// parsing a new path.
300300
if style == PathStyle::Expr {
301301
self.unmatched_angle_bracket_count = 0;
302-
self.max_angle_bracket_count = 0;
303302
}
304303

305304
// Generic arguments are found - `<`, `(`, `::<` or `::(`.

0 commit comments

Comments
 (0)