Skip to content

Commit

Permalink
Auto merge of #87369 - pnkfelix:beta-targetted-revert-81473-warn-writ…
Browse files Browse the repository at this point in the history
…e-only-fields, r=Mark-Simulacrum

Beta targetted revert 81473 warn write only fields

beta backport of PR #86212
  • Loading branch information
bors committed Jul 23, 2021
2 parents ff4ca50 + e541354 commit b959328
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 119 deletions.
6 changes: 1 addition & 5 deletions compiler/rustc_passes/src/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
}
}

#[allow(dead_code)] // FIXME(81658): should be used + lint reinstated after #83171 relands.
fn handle_assign(&mut self, expr: &'tcx hir::Expr<'tcx>) {
if self
.typeck_results()
Expand Down Expand Up @@ -285,11 +286,6 @@ impl<'tcx> Visitor<'tcx> for MarkSymbolVisitor<'tcx> {
hir::ExprKind::MethodCall(..) => {
self.lookup_and_handle_method(expr.hir_id);
}
hir::ExprKind::Assign(ref left, ref right, ..) => {
self.handle_assign(left);
self.visit_expr(right);
return;
}
hir::ExprKind::Field(ref lhs, ..) => {
self.handle_field_access(&lhs, expr.hir_id);
}
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/borrowck/borrowck-assign-to-subfield.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass
// pretty-expanded FIXME #23616
#![allow(dead_code)]

pub fn main() {
struct A {
Expand Down
69 changes: 0 additions & 69 deletions src/test/ui/lint/dead-code/write-only-field.rs

This file was deleted.

44 changes: 0 additions & 44 deletions src/test/ui/lint/dead-code/write-only-field.stderr

This file was deleted.

0 comments on commit b959328

Please sign in to comment.