diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-11 17:01:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-11 17:01:36 +0200 |
| commit | 8de487fdbd88889ed00e928bf4e13df68f3a61b6 (patch) | |
| tree | ad1fe9c034d4fe27965e855dedca52f7579d2280 /compiler/rustc_codegen_gcc/src | |
| parent | c92a8e4d4d7e8da53aa05309ef8d4fac2c9af52f (diff) | |
| parent | 2df4f7dd8c51e1c3e65b615d1c44fdc9d0b4b044 (diff) | |
| download | rust-8de487fdbd88889ed00e928bf4e13df68f3a61b6.tar.gz rust-8de487fdbd88889ed00e928bf4e13df68f3a61b6.zip | |
Rollup merge of #124599 - estebank:issue-41708, r=wesleywiser
Suggest borrowing on fn argument that is `impl AsRef` When encountering a move conflict, on an expression that is `!Copy` passed as an argument to an `fn` that is `impl AsRef`, suggest borrowing the expression. ``` error[E0382]: use of moved value: `bar` --> f204.rs:14:15 | 12 | let bar = Bar; | --- move occurs because `bar` has type `Bar`, which does not implement the `Copy` trait 13 | foo(bar); | --- value moved here 14 | let baa = bar; | ^^^ value used here after move | help: borrow the value to avoid moving it | 13 | foo(&bar); | + ``` Fix #41708
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
0 files changed, 0 insertions, 0 deletions
