remove the last let-chain to restore Rust 1.86 support

This commit is contained in:
Jack O'Connor 2025-07-03 11:42:40 -07:00
parent e3fc88b94a
commit dcda0d22ed

View file

@ -5693,9 +5693,8 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
let current_file = self.file();
let mut is_nonlocal_binding = false;
if let Some(name) = expr.as_name()
&& let Some(symbol_id) = place_table.place_id_by_name(name)
{
if let Some(name) = expr.as_name() {
if let Some(symbol_id) = place_table.place_id_by_name(name) {
if self.skip_non_global_scopes(file_scope_id, symbol_id) {
return global_symbol(self.db(), self.file(), name);
}
@ -5703,6 +5702,7 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
.index
.symbol_is_nonlocal_in_scope(symbol_id, file_scope_id);
}
}
// If it's a function-like scope and there is one or more binding in this scope (but
// none of those bindings are visible from where we are in the control flow), we cannot