diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-03-13 20:58:54 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-04-11 16:41:41 +0000 |
| commit | a1a3abb08fca88ba1c76888c0201870a5f590b5a (patch) | |
| tree | bffd124af056ed51796e7c0a4d26a7b582f09970 /tests/codegen/patchable-function-entry | |
| parent | 7f7f6792f161d8b7f383ca18a1d820d2ca811bc4 (diff) | |
| download | rust-a1a3abb08fca88ba1c76888c0201870a5f590b5a.tar.gz rust-a1a3abb08fca88ba1c76888c0201870a5f590b5a.zip | |
When possible, suggest cloning the result of a call instead of an argument
``` error[E0505]: cannot move out of `a` because it is borrowed --> $DIR/variance-issue-20533.rs:28:14 | LL | let a = AffineU32(1); | - binding `a` declared here LL | let x = foo(&a); | -- borrow of `a` occurs here LL | drop(a); | ^ move out of `a` occurs here LL | drop(x); | - borrow later used here | help: consider cloning the value if the performance cost is acceptable | LL | let x = foo(&a).clone(); | ++++++++ ```
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions
