about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-07-10 17:15:42 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-07-10 17:23:29 +0000
commit7dfc3e9af45ad54832c083baf0d2d0ca8e0d979a (patch)
tree402cbafb83b5b24077b444f4e71f38d0a613a088 /compiler/rustc_errors
parent78a6e132984dba0303ebad7dcfd1305c93ad5835 (diff)
downloadrust-7dfc3e9af45ad54832c083baf0d2d0ca8e0d979a.tar.gz
rust-7dfc3e9af45ad54832c083baf0d2d0ca8e0d979a.zip
Rework borrowing suggestions to use `Expr` instead of just `Span`
In the suggestion machinery for borrowing expressions and types, always use the available obligation `Span` to find the appropriate `Expr` to perform appropriateness checks no the `ExprKind` instead of on the textual snippet corresponding to the `Span`.

Unify the logic for the case where `&` *and* `&mut` are appropriate with the logic for only one of those cases.

Handle the case when `S::foo()` should have been `<&S>::foo()` (instead of suggesting the prior `&S::foo()`.
Diffstat (limited to 'compiler/rustc_errors')
0 files changed, 0 insertions, 0 deletions