diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-03-17 21:25:38 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-04-11 16:41:42 +0000 |
| commit | d97d2fe7440ea3032a93fa3ebf8d62fea0337d04 (patch) | |
| tree | 84f778762a45c6c7820a0dcdd557292424e9d926 /tests/ui/error-codes/E0508-fail.stderr | |
| parent | d578ac9e476a376246320db1d934972601c5b0f5 (diff) | |
| download | rust-d97d2fe7440ea3032a93fa3ebf8d62fea0337d04.tar.gz rust-d97d2fe7440ea3032a93fa3ebf8d62fea0337d04.zip | |
Mention when the type of the moved value doesn't implement `Clone`
Diffstat (limited to 'tests/ui/error-codes/E0508-fail.stderr')
| -rw-r--r-- | tests/ui/error-codes/E0508-fail.stderr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0508-fail.stderr b/tests/ui/error-codes/E0508-fail.stderr index 1153b1d09c7..96d3bcb67a5 100644 --- a/tests/ui/error-codes/E0508-fail.stderr +++ b/tests/ui/error-codes/E0508-fail.stderr @@ -7,6 +7,11 @@ LL | let _value = array[0]; | cannot move out of here | move occurs because `array[_]` has type `NonCopy`, which does not implement the `Copy` trait | +note: if `NonCopy` implemented `Clone`, you could clone the value + --> $DIR/E0508-fail.rs:1:1 + | +LL | struct NonCopy; + | ^^^^^^^^^^^^^^ help: consider borrowing here | LL | let _value = &array[0]; |
