Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

v0.4.4: compilation warning #93

Closed
ngirard opened this issue Aug 15, 2019 · 4 comments
Closed

v0.4.4: compilation warning #93

ngirard opened this issue Aug 15, 2019 · 4 comments

Comments

@ngirard
Copy link

ngirard commented Aug 15, 2019

Using rustc 1.37.0 (eae3437df 2019-08-13), compiling liner v0.4.4 leads to this message:

warning[E0503]: cannot use `self.key_bindings` because it was mutably borrowed
  --> /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/liner-0.4.4/src/context.rs:98:17
   |
96 |             let ed = try!(Editor::new_with_init_buffer(stdout, prompt, self, buffer));
   |                                                                        ---- borrow of `*self` occurs here
97 |             match self.key_bindings {
98 |                 KeyBindings::Emacs => Self::handle_keys(keymap::Emacs::new(ed), handler),
   |                 ^^^^^^^^^^^^^^^^^^ use of borrowed `*self`
99 |                 KeyBindings::Vi => Self::handle_keys(keymap::Vi::new(ed), handler),
   |                                                                      -- borrow later used here
   |
   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
   = note: for more information, try `rustc --explain E0729`

@iamcodemaker
Copy link
Contributor

iamcodemaker commented Aug 15, 2019

Report at https://gitlab.redox-os.org/redox-os/liner

Edit: that fork is active, this repo has gone stale

@ngirard
Copy link
Author

ngirard commented Aug 15, 2019

Oh. Got it, thanks.

May I suggest creating an issue whose title directs people to gitlab ?

@iamcodemaker
Copy link
Contributor

Good idea. Feel free take care of that 😉

@ngirard
Copy link
Author

ngirard commented Aug 15, 2019

Alright: see #94

@ngirard ngirard closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants