mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Partially support "overloaded deref" MIR lowering
This commit is contained in:
parent
bf0f99f15d
commit
af90ec8096
14 changed files with 546 additions and 297 deletions
|
@ -1103,7 +1103,10 @@ impl<'db> SemanticsImpl<'db> {
|
|||
let kind = match adjust.kind {
|
||||
hir_ty::Adjust::NeverToAny => Adjust::NeverToAny,
|
||||
hir_ty::Adjust::Deref(Some(hir_ty::OverloadedDeref(m))) => {
|
||||
Adjust::Deref(Some(OverloadedDeref(mutability(m))))
|
||||
// FIXME: Should we handle unknown mutability better?
|
||||
Adjust::Deref(Some(OverloadedDeref(
|
||||
m.map(mutability).unwrap_or(Mutability::Shared),
|
||||
)))
|
||||
}
|
||||
hir_ty::Adjust::Deref(None) => Adjust::Deref(None),
|
||||
hir_ty::Adjust::Borrow(hir_ty::AutoBorrow::RawPtr(m)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue