forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#61192 - estebank:issue-61187, r=oli-obk
Do not ICE on missing access place description during mutability error reporting Fix rust-lang#61187.
- Loading branch information
Showing
3 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// edition:2018 | ||
#![feature(async_await)] | ||
|
||
fn main() { | ||
} | ||
|
||
async fn response(data: Vec<u8>) { | ||
data.reverse(); //~ ERROR E0596 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0596]: cannot borrow `async fn` parameter as mutable, as it is not declared as mutable | ||
--> $DIR/issue-61187.rs:8:5 | ||
| | ||
LL | async fn response(data: Vec<u8>) { | ||
| ---- help: consider changing this to be mutable: `mut data` | ||
LL | data.reverse(); | ||
| ^^^^ cannot borrow as mutable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0596`. |