about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-25 19:21:38 +0200
committerGitHub <noreply@github.com>2023-07-25 19:21:38 +0200
commitb7a1ff2aaa05e1f1dc2e1acd01941e00e28a8060 (patch)
treecdf6c34724129a90a131aedb58488a49db3f9c40 /compiler/rustc_interface/src/errors.rs
parent99f404aa733982d081677ab11f5ae3181621babc (diff)
parentc83dfe9aedf79942e3416749b00803e0b5dcb5f2 (diff)
downloadrust-b7a1ff2aaa05e1f1dc2e1acd01941e00e28a8060.tar.gz
rust-b7a1ff2aaa05e1f1dc2e1acd01941e00e28a8060.zip
Rollup merge of #114052 - clubby789:suggest-option-asref, r=WaffleLapkin
Suggest `{Option,Result}::as_ref()` instead of `cloned()` in some cases

Fixes #114050

When we have an expr available that produces the type expectation, we can suggest appending `.as_ref()` to the span, instead of cloning the expr producing the mismatch
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions