-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
UPDATE: There are some initial mentoring instructions below.
fn main() {
let v = vec![String::from("oh no")];
let e = v[0];
}
suggests
error[E0507]: cannot move out of indexed content
--> <anon>:4:13
|
4 | let e = v[0];
| - ^^^^ cannot move out of indexed content
| |
| hint: to prevent move, use `ref e` or `ref mut e`
let ref e
is not idiomatic here, so this is misleading (and confusing, frankly)
cc @eevee
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.