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

Error when compiling v0.3.6 #23

Closed
realitix opened this issue May 14, 2018 · 3 comments
Closed

Error when compiling v0.3.6 #23

realitix opened this issue May 14, 2018 · 3 comments

Comments

@realitix
Copy link
Contributor

Hello @antiagainst,

I tried to install your module (0.3.6) with the nightly rust and I got this error:

    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading shaderc v0.3.6                                                     
 Downloading cmake v0.1.31                                                      
   Compiling cc v1.0.15                                                         
   Compiling libc v0.2.40
   Compiling rand v0.4.2
   Compiling cmake v0.1.31
   Compiling shaderc v0.3.6
   Compiling test1 v0.1.0 (file:///home/realitix/git/rust_practice/test1)
error[E0623]: lifetime mismatch
 --> src/main.rs:3:9
  |
1 | fn longest<'a,'b>(x: &'a str, y: &'b str) -> &'b str {
  |                      -------                 -------
  |                      |
  |                      this parameter and the return type are declared with different lifetimes...
2 |     if x.len() > y.len() {
3 |         x
  |         ^ ...but data from `x` is returned here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0623`.
error: Could not compile `test1`.

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

Do you know why I get this error ?

@realitix
Copy link
Contributor Author

Sorry it was my code...
My bad.

@realitix
Copy link
Contributor Author

Sadly I can't delete this isssue.

@antiagainst
Copy link
Collaborator

Oh, no worries ;-P

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