mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Enable reborrow hints in attribute calls
This commit is contained in:
parent
6b696fced8
commit
7cbde1b3a5
1 changed files with 3 additions and 3 deletions
|
@ -388,9 +388,9 @@ fn reborrow_hints(
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
// let descended = sema.descend_node_into_attributes(expr.clone()).pop();
|
let descended = sema.descend_node_into_attributes(expr.clone()).pop();
|
||||||
// let desc_expr = descended.as_ref().unwrap_or(expr);
|
let desc_expr = descended.as_ref().unwrap_or(expr);
|
||||||
let mutability = sema.is_implicit_reborrow(expr)?;
|
let mutability = sema.is_implicit_reborrow(desc_expr)?;
|
||||||
let label = match mutability {
|
let label = match mutability {
|
||||||
hir::Mutability::Shared if config.reborrow_hints != ReborrowHints::MutableOnly => "&*",
|
hir::Mutability::Shared if config.reborrow_hints != ReborrowHints::MutableOnly => "&*",
|
||||||
hir::Mutability::Mut => "&mut *",
|
hir::Mutability::Mut => "&mut *",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue