[INFO] updating cached repository https://github.com/mormahr/lalrpop-shift-repro [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "-c" "remote.origin.fetch=refs/heads/*:refs/heads/*" "fetch" "origin" "--force" "--prune", kill_on_drop: false }` [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3f3566242581a71c82a1bb62aac94ec804b2dbde [INFO] testing mormahr/lalrpop-shift-repro against 1.60.0 for beta-1.61-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmormahr%2Flalrpop-shift-repro" "/workspace/builds/worker-119/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-119/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/mormahr/lalrpop-shift-repro on toolchain 1.60.0 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+1.60.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/mormahr/lalrpop-shift-repro [INFO] finished tweaking git repo https://github.com/mormahr/lalrpop-shift-repro [INFO] tweaked toml for git repo https://github.com/mormahr/lalrpop-shift-repro written to /workspace/builds/worker-119/source/Cargo.toml [INFO] crate git repo https://github.com/mormahr/lalrpop-shift-repro already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+1.60.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-119/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-119/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+1.60.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 75b1647c6d242396a2d0e5c83b8c5d218e271ce77d5ae8b45c62e76281f550a1 [INFO] running `Command { std: "docker" "start" "-a" "75b1647c6d242396a2d0e5c83b8c5d218e271ce77d5ae8b45c62e76281f550a1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "75b1647c6d242396a2d0e5c83b8c5d218e271ce77d5ae8b45c62e76281f550a1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "75b1647c6d242396a2d0e5c83b8c5d218e271ce77d5ae8b45c62e76281f550a1", kill_on_drop: false }` [INFO] [stdout] 75b1647c6d242396a2d0e5c83b8c5d218e271ce77d5ae8b45c62e76281f550a1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-119/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-119/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+1.60.0" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2622c223d2905f61d798a64b8b946aca88f2dcaca5582efb7c02a2727b56092c [INFO] running `Command { std: "docker" "start" "-a" "2622c223d2905f61d798a64b8b946aca88f2dcaca5582efb7c02a2727b56092c", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Compiling libc v0.2.112 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling memchr v2.4.1 [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling parking_lot_core v0.8.5 [INFO] [stderr] Compiling scopeguard v1.1.0 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling smallvec v1.7.0 [INFO] [stderr] Compiling crunchy v0.2.2 [INFO] [stderr] Compiling regex-syntax v0.6.25 [INFO] [stderr] Compiling hashbrown v0.11.2 [INFO] [stderr] Compiling siphasher v0.3.7 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling either v1.6.1 [INFO] [stderr] Compiling fixedbitset v0.2.0 [INFO] [stderr] Compiling bit-vec v0.6.3 [INFO] [stderr] Compiling new_debug_unreachable v1.0.4 [INFO] [stderr] Compiling precomputed-hash v0.1.1 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling pico-args v0.4.2 [INFO] [stderr] Compiling diff v0.1.12 [INFO] [stderr] Compiling lock_api v0.4.5 [INFO] [stderr] Compiling itertools v0.10.3 [INFO] [stderr] Compiling instant v0.1.12 [INFO] [stderr] Compiling bit-set v0.5.2 [INFO] [stderr] Compiling phf_shared v0.8.0 [INFO] [stderr] Compiling ena v0.14.0 [INFO] [stderr] Compiling dirs-sys-next v0.1.2 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling indexmap v1.7.0 [INFO] [stderr] Compiling dirs-next v2.0.0 [INFO] [stderr] Compiling aho-corasick v0.7.18 [INFO] [stderr] Compiling parking_lot v0.11.2 [INFO] [stderr] Compiling petgraph v0.5.1 [INFO] [stderr] Compiling term v0.7.0 [INFO] [stderr] Compiling regex v1.5.4 [INFO] [stderr] Compiling string_cache v0.8.2 [INFO] [stderr] Compiling ascii-canvas v3.0.0 [INFO] [stderr] Compiling lalrpop-util v0.19.6 [INFO] [stderr] Compiling lalrpop v0.19.6 [INFO] [stderr] Compiling lalrpop-shift-repro v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] error: failed to run custom build command for `lalrpop-shift-repro v0.1.0 (/opt/rustwide/workdir)` [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `/opt/rustwide/target/debug/build/lalrpop-shift-repro-15577a5da422897e/build-script-build` (exit status: 1) [INFO] [stderr] --- stdout [INFO] [stderr] processing file `/opt/rustwide/workdir/src/test.lalrpop` [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:37:5: 37:8: Conflict detected [INFO] [stderr] [INFO] [stderr] when in this state: [INFO] [stderr] Expr = Expr (*) "+" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = Expr (*) "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt = Expr (*) ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] [INFO] [stderr] and looking at a token `"+"` we can reduce to a `Stmt` but we can also shift [INFO] [stderr] [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:37:5: 37:8: Local ambiguity detected [INFO] [stderr] [INFO] [stderr] The problem arises after having observed the following symbols in the input: [INFO] [stderr] Stmt+ Expr [INFO] [stderr] At that point, if the next token is a `"-"`, then the parser can proceed in [INFO] [stderr] two different ways. [INFO] [stderr] [INFO] [stderr] First, the parser could execute the production at [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:37:5: 37:8, which would consume the top [INFO] [stderr] 1 token(s) from the stack and produce a `Stmt`. This might then yield a parse [INFO] [stderr] tree like [INFO] [stderr] Expr ╷ Stmt [INFO] [stderr] ├─Stmt──┤ │ [INFO] [stderr] ├─Stmt+─┘ │ [INFO] [stderr] └─Stmt+──────┘ [INFO] [stderr] [INFO] [stderr] Alternatively, the parser could shift the `"-"` token and later use it to [INFO] [stderr] construct a `Expr`. This might then yield a parse tree like [INFO] [stderr] Stmt+ Expr "-" Unary [INFO] [stderr] │ ├─Expr───────┤ [INFO] [stderr] │ └─Stmt───────┤ [INFO] [stderr] └─Stmt+────────────┘ [INFO] [stderr] [INFO] [stderr] See the LALRPOP manual for advice on making your grammar LR(1). [INFO] [stderr] [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:41:5: 41:9: Conflict detected [INFO] [stderr] [INFO] [stderr] when in this state: [INFO] [stderr] Expr = (*) Expr "+" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = (*) Expr "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = (*) Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Num = (*) r#"[0-9]+"# ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt = (*) Expr ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt+ = Stmt+ (*) Stmt ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmts = Stmt+ (*) ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Term = (*) Num ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Term = (*) "(" Expr ")" ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Unary = (*) Term ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Unary = (*) "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] [INFO] [stderr] and looking at a token `"("` we can reduce to a `Stmts` but we can also shift [INFO] [stderr] [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:41:5: 41:9: Conflict detected [INFO] [stderr] [INFO] [stderr] when in this state: [INFO] [stderr] Expr = (*) Expr "+" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = (*) Expr "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = (*) Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Num = (*) r#"[0-9]+"# ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt = (*) Expr ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt+ = Stmt+ (*) Stmt ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmts = Stmt+ (*) ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Term = (*) Num ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Term = (*) "(" Expr ")" ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Unary = (*) Term ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Unary = (*) "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] [INFO] [stderr] and looking at a token `"-"` we can reduce to a `Stmts` but we can also shift [INFO] [stderr] [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:41:5: 41:9: Conflict detected [INFO] [stderr] [INFO] [stderr] when in this state: [INFO] [stderr] Expr = (*) Expr "+" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = (*) Expr "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = (*) Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Num = (*) r#"[0-9]+"# ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt = (*) Expr ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt+ = Stmt+ (*) Stmt ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmts = Stmt+ (*) ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Term = (*) Num ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Term = (*) "(" Expr ")" ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Unary = (*) Term ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Unary = (*) "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] [INFO] [stderr] and looking at a token `r#"[0-9]+"#` we can reduce to a `Stmts` but we can [INFO] [stderr] also shift [INFO] [stderr] [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:37:5: 37:8: Conflict detected [INFO] [stderr] [INFO] [stderr] when in this state: [INFO] [stderr] Expr = Expr (*) "+" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Expr = Expr (*) "-" Unary ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] Stmt = Expr (*) ["(", ")", "+", "-", r#"[0-9]+"#, EOF] [INFO] [stderr] [INFO] [stderr] and looking at a token `"+"` we can reduce to a `Stmt` but we can also shift [INFO] [stderr] [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:37:5: 37:8: Local ambiguity detected [INFO] [stderr] [INFO] [stderr] The problem arises after having observed the following symbols in the input: [INFO] [stderr] Stmt+ Expr [INFO] [stderr] At that point, if the next token is a `"-"`, then the parser can proceed in [INFO] [stderr] two different ways. [INFO] [stderr] [INFO] [stderr] First, the parser could execute the production at [INFO] [stderr] /opt/rustwide/workdir/src/test.lalrpop:37:5: 37:8, which would consume the top [INFO] [stderr] 1 token(s) from the stack and produce a `Stmt`. This might then yield a parse [INFO] [stderr] tree like [INFO] [stderr] Expr ╷ Stmt [INFO] [stderr] ├─Stmt──┤ │ [INFO] [stderr] ├─Stmt+─┘ │ [INFO] [stderr] └─Stmt+──────┘ [INFO] [stderr] [INFO] [stderr] Alternatively, the parser could shift the `"-"` token and later use it to [INFO] [stderr] construct a `Expr`. This might then yield a parse tree like [INFO] [stderr] Stmt+ Expr "-" Unary [INFO] [stderr] │ ├─Expr───────┤ [INFO] [stderr] │ └─Stmt───────┤ [INFO] [stderr] └─Stmt+────────────┘ [INFO] [stderr] [INFO] [stderr] See the LALRPOP manual for advice on making your grammar LR(1). [INFO] running `Command { std: "docker" "inspect" "2622c223d2905f61d798a64b8b946aca88f2dcaca5582efb7c02a2727b56092c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2622c223d2905f61d798a64b8b946aca88f2dcaca5582efb7c02a2727b56092c", kill_on_drop: false }` [INFO] [stdout] 2622c223d2905f61d798a64b8b946aca88f2dcaca5582efb7c02a2727b56092c