Scryer-prolog: Compilation problems

Created on 20 Feb 2020  路  4Comments  路  Source: mthom/scryer-prolog

$ cargo run
   Compiling scryer-prolog v0.8.118 (/opt/gupu/scryer-prolog)
error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:326:67
    |
326 |                     (Addr::Lis(a1), Addr::Con(Constant::String(n, s)))
    |                                                                   ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:327:52
    |
327 |                   | (Addr::Con(Constant::String(n, s)), Addr::Lis(a1))
    |                                                    ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:360:79
    |
360 |                     (Addr::PStrLocation(h, n), Addr::Con(Constant::String(n1, s)))
    |                                                                               ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:361:53
    |
361 |                   | (Addr::Con(Constant::String(n1, s)), Addr::PStrLocation(h, n))
    |                                                     ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:489:67
    |
489 |                     (Addr::Lis(a1), Addr::Con(Constant::String(n, s)))
    |                                                                   ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:490:52
    |
490 |                   | (Addr::Con(Constant::String(n, s)), Addr::Lis(a1))
    |                                                    ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:522:79
    |
522 |                     (Addr::PStrLocation(h, n), Addr::Con(Constant::String(n1, s)))
    |                                                                               ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/machine_state_impl.rs:523:53
    |
523 |                   | (Addr::Con(Constant::String(n1, s)), Addr::PStrLocation(h, n))
    |                                                     ^ moves value into pattern guard

error[E0008]: cannot bind by-move into a pattern guard
   --> src/prolog/machine/system_calls.rs:125:43
    |
125 |             Addr::Con(Constant::String(n, s)) if !self.flags.double_quotes.is_atom() => {
    |                                           ^ moves value into pattern guard

error: aborting due to 9 previous errors

For more information about this error, try `rustc --explain E0008`.
error: Could not compile `scryer-prolog`.

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

Most helpful comment

I use the rustup tool. If you go to http://rustup.rs and follow the instructions from Ubuntu, you should have the latest version of rustc running.

All 4 comments

Which version of rustc are you using? Type rustc --version. It may need an upgrade. The needed feature landed in rustc 1.39:

https://github.com/rust-lang/rust/pull/63118/

rustc 1.37.0 - most recent of Ubuntu 18.04.3 LTS

What platform are you using? Maybe binaries?

I use the rustup tool. If you go to http://rustup.rs and follow the instructions from Ubuntu, you should have the latest version of rustc running.

Add to README: Remove existing rustc installation and use rustup.rs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jburse picture jburse  路  5Comments

triska picture triska  路  4Comments

XVilka picture XVilka  路  3Comments

XVilka picture XVilka  路  3Comments

UWN picture UWN  路  3Comments