Skip to content

Commit

Permalink
Unrolled build for rust-lang#124284
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rust-timer authored Apr 23, 2024
2 parents c672773 + 9bd175c commit ee1a1ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions compiler/rustc_parse/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ pub struct Parser<'a> {
///
/// See the comments in the `parse_path_segment` function for more details.
unmatched_angle_bracket_count: u16,
max_angle_bracket_count: u16,
angle_bracket_nesting: u16,

last_unexpected_token_span: Option<Span>,
Expand Down Expand Up @@ -430,7 +429,6 @@ impl<'a> Parser<'a> {
num_bump_calls: 0,
break_last_token: false,
unmatched_angle_bracket_count: 0,
max_angle_bracket_count: 0,
angle_bracket_nesting: 0,
last_unexpected_token_span: None,
subparser_name,
Expand Down Expand Up @@ -778,7 +776,6 @@ impl<'a> Parser<'a> {
if ate {
// See doc comment for `unmatched_angle_bracket_count`.
self.unmatched_angle_bracket_count += 1;
self.max_angle_bracket_count += 1;
debug!("eat_lt: (increment) count={:?}", self.unmatched_angle_bracket_count);
}
ate
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_parse/src/parser/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ impl<'a> Parser<'a> {
// parsing a new path.
if style == PathStyle::Expr {
self.unmatched_angle_bracket_count = 0;
self.max_angle_bracket_count = 0;
}

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

0 comments on commit ee1a1ff

Please sign in to comment.