-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-PolishAsync-await issues that are part of the "polish" areaAsync-await issues that are part of the "polish" areaC-bugCategory: This is a bug.Category: This is a bug.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
Code:
#![feature(async_await)]
async fn foo(n: u32, mut vec: Vec<u32>) {
vec.push(n);
}
Error:
error[E0596]: cannot borrow `vec` as mutable, as it is not declared as mutable
--> code\src\lib.rs:4:5
|
3 | async fn foo(n: u32, mut vec: Vec<u32>) {
| ------- help: consider changing this to be mutable: `mut vec`
4 | vec.push(n);
| ^^^ cannot borrow as mutable
Rustc version: rustc 1.36.0-nightly (08bfe16 2019-05-02)
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-PolishAsync-await issues that are part of the "polish" areaAsync-await issues that are part of the "polish" areaC-bugCategory: This is a bug.Category: This is a bug.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.