Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3c69a4 commit 899aae4Copy full SHA for 899aae4
compiler/rustc_passes/src/dead.rs
@@ -37,17 +37,13 @@ fn should_explore(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool {
37
)
38
}
39
40
-fn base_expr<'a>(expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a> {
41
- let mut current = expr;
+fn base_expr<'a>(mut expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a>
42
loop {
43
- match current.kind {
44
- hir::ExprKind::Field(base, ..) => {
45
- current = base;
46
- }
47
- _ => break,
+ match expr.kind {
+ hir::ExprKind::Field(base, ..) => expr = base,
+ _ => return expr,
48
49
50
- current
51
52
53
struct MarkSymbolVisitor<'tcx> {
0 commit comments