Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[chore] compiling with rustc 1.35.0 warns on borrowing *self as mutable #20

Closed
ghost opened this issue May 31, 2019 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented May 31, 2019

Thank you for building and publishing this tool! I am trying it out to replace another process manager. I wanted to report this maintenance task for any contributor or user who may see this.
I cloned the repository as of c590366 and ran cargo build --release. It printed the following (and a few similar compiler warnings):

warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
   --> src/main.rs:358:37
    |
357 |       match self.spec.procs[idx].shutdown {
    |             --------------- immutable borrow occurs here
358 |         Some(ref shutdown) => match self.run_command(&shutdown.clone(), &env, deadline, None) {
    |                                     ^^^^              -------- immutable borrow later used here
    |                                     |
    |                                     mutable borrow occurs here
    |
    = note: #[warn(mutable_borrow_reservation_conflict)] on by default
    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
    = note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>

The upstream issue is rust-lang/rust#59159.

@andrewchambers
Copy link
Owner

Thank you for reporting this, this indeed needs to be fixed. I will look at it soon.

@andrewchambers
Copy link
Owner

Should be fixed now.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant