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

Compile errors with latest rust #20

Closed
burtonageo opened this issue Dec 9, 2014 · 1 comment · Fixed by #21
Closed

Compile errors with latest rust #20

burtonageo opened this issue Dec 9, 2014 · 1 comment · Fixed by #21

Comments

@burtonageo
Copy link
Contributor

With my current rustc version (0.13.0-dev (c56e59c72 2014-12-09 07:51:52 +0000)), there are multiple compile errors when building Semver, all of which are due to moving values from &-pointers

@burtonageo
Copy link
Contributor Author

Compiling semver v0.1.3 (file:///Users/georgeburton/Downloads/semver)
/Users/georgeburton/Downloads/semver/src/version_req.rs:238:19: 238:23 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:238             Gt => self.is_greater(ver),
                                                                              ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:239:43: 239:47 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:239             GtEq => self.is_exact(ver) || self.is_greater(ver),
                                                                                                      ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:240:43: 240:47 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:240             Lt => !self.is_exact(ver) && !self.is_greater(ver),
                                                                                                      ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:241:22: 241:26 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:241             LtEq => !self.is_greater(ver),
                                                                                 ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:242:22: 242:26 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:242             Tilde => self.matches_tilde(ver),
                                                                                 ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:243:27: 243:31 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:243             Compatible => self.is_compatible(ver),
                                                                                      ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:244:28: 244:32 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:244             Wildcard(_) => self.matches_wildcard(ver)
                                                                                       ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:422:24: 422:28 error: cannot move out of dereference of `&`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:422         let op = match self.op {
                                                                                   ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:423:18: 423:19 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:423             Some(x) => x,
                                                                             ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:423:18: 423:19 help: to prevent the move, use `ref x` or `ref mut x` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:423             Some(x) => x,
                                                                             ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:31: 522:35 error: cannot move out of dereference of `&mut`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                          ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:538:13: 538:21 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:538:13: 538:21 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 help: to prevent the move, use `ref s` or `ref mut s` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:538:13: 538:21 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:31: 522:35 error: cannot move out of dereference of `&mut`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                          ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:548:25: 548:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:548:25: 548:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 help: to prevent the move, use `ref s` or `ref mut s` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:548:25: 548:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:31: 522:35 error: cannot move out of dereference of `&mut`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                          ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:553:25: 553:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:553:25: 553:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 help: to prevent the move, use `ref s` or `ref mut s` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:553:25: 553:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:31: 522:35 error: cannot move out of dereference of `&mut`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                          ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:558:25: 558:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:558:25: 558:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 help: to prevent the move, use `ref s` or `ref mut s` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:558:25: 558:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:31: 522:35 error: cannot move out of dereference of `&mut`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                          ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:574:25: 574:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:574:25: 574:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 help: to prevent the move, use `ref s` or `ref mut s` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:574:25: 574:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:31: 522:35 error: cannot move out of dereference of `&mut`-pointer
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                          ^~~~
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:582:25: 582:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 note: attempting to move value to here
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:582:25: 582:33 note: expansion site
/Users/georgeburton/Downloads/semver/src/version_req.rs:522:27: 522:28 help: to prevent the move, use `ref s` or `ref mut s` to capture value by reference
/Users/georgeburton/Downloads/semver/src/version_req.rs:522                       let s = self.state;
                                                                                      ^
/Users/georgeburton/Downloads/semver/src/version_req.rs:514:9: 528:20 note: in expansion of next!
/Users/georgeburton/Downloads/semver/src/version_req.rs:582:25: 582:33 note: expansion site
error: aborting due to 14 previous errors
Could not compile `semver`.

alexcrichton added a commit that referenced this issue Dec 10, 2014
Fix #20 (Compile errors with latest rustc)
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

Successfully merging a pull request may close this issue.

1 participant