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

Build errors on installation #20

Closed
dwijnand opened this issue Jun 15, 2018 · 2 comments
Closed

Build errors on installation #20

dwijnand opened this issue Jun 15, 2018 · 2 comments

Comments

@dwijnand
Copy link
Contributor

I'm getting the following errors when trying to install rerast:

$ cargo +nightly install rerast
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading rerast v0.1.19
  Installing rerast v0.1.19
 Downloading json v0.11.13
 Downloading rerast_macros v0.1.12
   Compiling unicode-xid v0.0.4
   Compiling quote v0.3.15
   Compiling cfg-if v0.1.3
   Compiling unicode-width v0.1.5
   Compiling libc v0.2.42
   Compiling rustc-demangle v0.1.8
   Compiling bitflags v1.0.3
   Compiling either v1.5.0
   Compiling ansi_term v0.11.0
   Compiling strsim v0.7.0
   Compiling lazy_static v0.2.11
   Compiling vec_map v0.8.1
   Compiling diff v0.1.11
   Compiling json v0.11.13
   Compiling rerast_macros v0.1.12
   Compiling textwrap v0.9.0
   Compiling synom v0.11.3
   Compiling itertools v0.5.10
   Compiling colored v1.6.0
   Compiling atty v0.2.10
   Compiling backtrace v0.3.8
   Compiling syn v0.11.11
   Compiling clap v2.31.2
   Compiling synstructure v0.6.1
   Compiling failure_derive v0.1.1
   Compiling failure v0.1.1
   Compiling rerast v0.1.19
error[E0412]: cannot find type `AnonConst` in module `hir`
    --> src/rule_matcher.rs:1087:25
     |
1087 | impl Matchable for hir::AnonConst {
     |                         ^^^^^^^^^ not found in `hir`

error[E0532]: expected tuple struct/variant, found unit variant `Crate`
    --> src/rule_matcher.rs:1125:14
     |
1125 |             (Crate(p_sugar), Crate(c_sugar)) => p_sugar == c_sugar,
     |              ^^^^^ not a tuple struct/variant
help: possible better candidate is found in another module, you can import it into scope
     |
15   | use syntax::ast::VisibilityKind::Crate;
     |

error[E0532]: expected tuple struct/variant, found unit variant `Crate`
    --> src/rule_matcher.rs:1125:30
     |
1125 |             (Crate(p_sugar), Crate(c_sugar)) => p_sugar == c_sugar,
     |                              ^^^^^ not a tuple struct/variant
help: possible better candidate is found in another module, you can import it into scope
     |
15   | use syntax::ast::VisibilityKind::Crate;
     |

error[E0053]: method `build_controller` has an incompatible type for trait
   --> src/change_to_rule.rs:260:5
    |
260 | /     fn build_controller(
261 | |         self: Box<Self>,
262 | |         sess: &rustc::session::Session,
263 | |         matches: &getopts::Matches,
...   |
271 | |         control
272 | |     }
    | |_____^ expected mutable reference, found struct `std::boxed::Box`
    |
    = note: expected type `fn(&mut change_to_rule::RCompilerCalls, &rustc::session::Session, &getopts::Matches) -> rustc_driver::driver::CompileController<'a>`
               found type `fn(std::boxed::Box<change_to_rule::RCompilerCalls>, &rustc::session::Session, &getopts::Matches) -> rustc_driver::driver::CompileController<'a>`

error[E0053]: method `build_controller` has an incompatible type for trait
   --> src/lib.rs:335:5
    |
335 | /     fn build_controller(
336 | |         self: Box<Self>,
337 | |         sess: &Session,
338 | |         matches: &getopts::Matches,
...   |
347 | |         control
348 | |     }
    | |_____^ expected mutable reference, found struct `std::boxed::Box`
    |
    = note: expected type `fn(&mut RerastCompilerCalls, &rustc::session::Session, &getopts::Matches) -> rustc_driver::driver::CompileController<'a>`
               found type `fn(std::boxed::Box<RerastCompilerCalls>, &rustc::session::Session, &getopts::Matches) -> rustc_driver::driver::CompileController<'a>`

error: aborting due to 5 previous errors

Some errors occurred: E0053, E0412, E0532.
For more information about an error, try `rustc --explain E0053`.
error: failed to compile `rerast v0.1.19`, intermediate artifacts can be found at `/var/folders/jy/jgttnxcd4750bdcw119bc9cw0000gn/T/cargo-installABdedY`

Caused by:
  Could not compile `rerast`.

To learn more, run the command again with --verbose.
@davidlattimore
Copy link
Contributor

Thanks for the to report. It looks like you might be using an older version of the nightly compiler. Could you try running "rustup update nightly" then try again? I should expand the instructions in the readme to cover this

@dwijnand
Copy link
Contributor Author

Oh yeah! Oops, sorry about that. All good

   Compiling rerast v0.1.19
    Finished release [optimized] target(s) in 39.21s
  Installing /Users/dnw/.cargo/bin/cargo-rerast

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