Skip to content
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.

http-service v0.2.0 fails to build on rustc 1.36.0-nightly (08bfe1612 2019-05-02) #27

Closed
fairingrey opened this issue May 3, 2019 · 2 comments

Comments

@fairingrey
Copy link
Contributor

fairingrey commented May 3, 2019

Pretty unusual from the looks of it, seems to be a nightly regression?

 allen@harumi  ~/Projects/http-service   master  cargo build
   Compiling http-service v0.2.0 (/home/allen/Projects/http-service)
error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
   --> src/lib.rs:102:40
    |
100 |     pub async fn into_vec(mut self) -> std::io::Result<Vec<u8>> {
    |                           -------- help: consider changing this to be mutable: `mut self`
101 |         let mut bytes = Vec::new();
102 |         while let Some(chunk) = await!(self.next()) {
    |                                        ^^^^ cannot borrow as mutable

warning: variable does not need to be mutable
   --> src/lib.rs:100:27
    |
100 |     pub async fn into_vec(mut self) -> std::io::Result<Vec<u8>> {
    |                           ----^^^^
    |                           |
    |                           help: remove this `mut`
    |
    = note: #[warn(unused_mut)] on by default

error: aborting due to previous error

For more information about this error, try `rustc --explain E0596`.
error: Could not compile `http-service`.

To learn more, run the command again with --verbose.

Something goes weird when trying to consume mut self, perhaps related to async?

Will install an earlier version of nightly to make sure stuff works, but just wanted to share since this breaks Tide and other related crates.

@fairingrey
Copy link
Contributor Author

related to rust-lang/rust#60498

@fairingrey
Copy link
Contributor Author

Builds on rustc 1.36.0-nightly (a3404557c 2019-05-03), closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant