softdevteam / lrpar

Rust LR parser
Other
1 stars 0 forks source link

Build fails on x86_64 #74

Closed gwenn closed 6 years ago

gwenn commented 6 years ago
error[E0277]: the trait bound `u32: std::convert::From<usize>` is not satisfied
   --> /Users/gwen/.cargo/git/checkouts/lrlex-ddf8d7de299f325b/2e1a484/src/lib/lexer.rs:249:18
    |
249 |             len: u32::try_from(len).unwrap(),
    |                  ^^^^^^^^^^^^^ the trait `std::convert::From<usize>` is not implemented for `u32`
    |
...
error[E0277]: the trait bound `u32: std::convert::From<usize>` is not satisfied
   --> /Users/gwen/.cargo/git/checkouts/cfgrammar-6e1473d6c831f868/f1dc7bc/src/lib/yacc/grammar.rs:276:31
    |
276 |             nonterms_len:     u32::try_from(nonterm_names.len()).unwrap(),
    |                               ^^^^^^^^^^^^^ the trait `std::convert::From<usize>` is not implemented for `u32`
    |

https://stackoverflow.com/questions/50437732/how-do-i-convert-a-usize-to-a-u32-using-tryfrom

ltratt commented 6 years ago

We're waiting for https://github.com/rust-lang/rust/pull/51564 to be merged in. [Long story short: the functionality above was in nightly; it was yanked in March; and now, with luck, it's going to be put back in soon.] At that point lrpar will compile on a new nightly again. I know this sucks and I'm sorry for the delay :/ At the moment the best you can do is use nightly nightly-2018-03-25 which was the last version before the relevant code was yanked.

gwenn commented 6 years ago

Fixed with rustc 1.29.0-nightly (9fd3d7899 2018-07-07)