mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Merge pull request #18254 from ChayimFriedman2/fix-mut
fix: Nail destructuring assignment once and for all
This commit is contained in:
commit
c286786888
29 changed files with 1171 additions and 860 deletions
|
@ -11,7 +11,7 @@ use std::{
|
|||
|
||||
use either::Either;
|
||||
use hir_def::{
|
||||
hir::Expr,
|
||||
hir::{Expr, ExprOrPatId},
|
||||
lower::LowerCtx,
|
||||
nameres::{MacroSubNs, ModuleOrigin},
|
||||
path::ModPath,
|
||||
|
@ -1777,7 +1777,9 @@ impl<'db> SemanticsImpl<'db> {
|
|||
}
|
||||
|
||||
if let Some(parent) = ast::Expr::cast(parent.clone()) {
|
||||
if let Some(expr_id) = source_map.node_expr(InFile { file_id, value: &parent }) {
|
||||
if let Some(ExprOrPatId::ExprId(expr_id)) =
|
||||
source_map.node_expr(InFile { file_id, value: &parent })
|
||||
{
|
||||
if let Expr::Unsafe { .. } = body[expr_id] {
|
||||
break true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue