Rocket: compile error. error[E0308]: mismatched types

Created on 4 Jan 2017  Â·  4Comments  Â·  Source: SergioBenitez/Rocket

Greetings,

trying out rocket and learning rust also coming from Go and haskell.

I came with this error for trying example hello-rocket

➜  hello-rocket git:(master) ✗ cargo run
   Compiling rocket_codegen v0.1.3
error[E0308]: mismatched types
  --> /Users/jeanepaul/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.1.3/src/utils/meta_item_ext.rs:26:9
   |
26 |           self.literal().and_then(|lit| match lit.node {
   |  _________^ starting here...
27 | |             LitKind::Int(n, _) => Some(n),
28 | |             _ => None,
29 | |         })
   | |__________^ ...ending here: expected u64, found u128
   |
   = help: here are some functions which might fulfill your needs:
 - .take()
 - .unwrap()
 - .unwrap_or_default()

error[E0308]: mismatched types
   --> /Users/jeanepaul/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.1.3/src/parser/route.rs:252:17
    |
252 |         if n <= max as u64 {
    |                 ^^^^^^^^^^ expected u128, found u64

error[E0308]: mismatched types
  --> /Users/jeanepaul/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_codegen-0.1.3/src/parser/error.rs:68:39
   |
68 |             return code_from_u64(span(n, lit.span))
   |                                       ^ expected u64, found u128

error: aborting due to 3 previous errors

error: Could not compile `rocket_codegen`.

rust env

➜  hello rustc -V
rustc 1.16.0-nightly (468227129 2017-01-03)

and Cargo toml

[dependencies]
rocket = "0.1.3"
rocket_codegen = "0.1.3"

apologies, did I missed something? I followed getting_started

accepted bug

Most helpful comment

Fixed in b202fb97484607f585530081563942e3282d6169. A cargo update should get you version 0.1.4, which contains this fix.

All 4 comments

Nope, this is on Rocket's side! There's a new nightly with breaking changes. :D

Pushing out a fix immediately.

thanks! I thought I missed something! I'll take a break then, until fix

Fixed in b202fb97484607f585530081563942e3282d6169. A cargo update should get you version 0.1.4, which contains this fix.

awesome fix! thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lambda-fairy picture lambda-fairy  Â·  4Comments

sphinxc0re picture sphinxc0re  Â·  3Comments

incker picture incker  Â·  3Comments

loothood picture loothood  Â·  4Comments

lucklove picture lucklove  Â·  4Comments