Skip to content

Commit 17ed1ff

Browse files
committed
Fix rebase: Node::Local rename
1 parent db7f308 commit 17ed1ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
135135
// This is a special case: when `fn foo() -> dyn Trait` and we call `foo()`
136136
// in the init of a `let` binding, we will already emit an unsized local
137137
// error, so we check for this case and unify the errors.
138-
if let hir::Node::Local(local) = self.tcx.parent_hir_node(*hir_id) {
138+
if let hir::Node::LetStmt(local) = self.tcx.parent_hir_node(*hir_id) {
139139
span = local.pat.span;
140140
}
141141
}
142142
ObligationCauseCode::ExprBindingObligation(_, _, hir_id, _) => {
143143
// For method calls like `let x = y.foo();` that are `?Sized`, we also dedup
144-
if let hir::Node::Local(local) = self.tcx.parent_hir_node(*hir_id) {
144+
if let hir::Node::LetStmt(local) = self.tcx.parent_hir_node(*hir_id) {
145145
span = local.pat.span;
146146
}
147147
}

0 commit comments

Comments
 (0)