[INFO] cloning repository https://github.com/karlexark/shell_in_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/karlexark/shell_in_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkarlexark%2Fshell_in_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkarlexark%2Fshell_in_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e45576e783e6010b81ea97ac4aef45c10059a5af [INFO] testing karlexark/shell_in_rust against try#c2e32f1c9652b13ed99608599c1e855462f421f3 for pr-146098-7 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkarlexark%2Fshell_in_rust" "/workspace/builds/worker-0-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/karlexark/shell_in_rust [INFO] finished tweaking git repo https://github.com/karlexark/shell_in_rust [INFO] tweaked toml for git repo https://github.com/karlexark/shell_in_rust written to /workspace/builds/worker-0-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/karlexark/shell_in_rust on toolchain c2e32f1c9652b13ed99608599c1e855462f421f3 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/karlexark/shell_in_rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a86372f32d8856530030624bc228b3f4b562e47db5dea7dccbd9afb0b9e27de7 [INFO] running `Command { std: "docker" "start" "-a" "a86372f32d8856530030624bc228b3f4b562e47db5dea7dccbd9afb0b9e27de7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a86372f32d8856530030624bc228b3f4b562e47db5dea7dccbd9afb0b9e27de7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a86372f32d8856530030624bc228b3f4b562e47db5dea7dccbd9afb0b9e27de7", kill_on_drop: false }` [INFO] [stdout] a86372f32d8856530030624bc228b3f4b562e47db5dea7dccbd9afb0b9e27de7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/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=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0c5b401823262a58842d093892c87423fd0c048a00b685355cb4a8b5e38c5f22 [INFO] running `Command { std: "docker" "start" "-a" "0c5b401823262a58842d093892c87423fd0c048a00b685355cb4a8b5e38c5f22", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Compiling bitflags v2.9.1 [INFO] [stderr] Compiling linux-raw-sys v0.9.4 [INFO] [stderr] Compiling thiserror v1.0.63 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling smallvec v1.15.0 [INFO] [stderr] Compiling anyhow v1.0.86 [INFO] [stderr] Compiling endian-type v0.1.2 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling nix v0.30.1 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling bytes v1.7.1 [INFO] [stderr] Compiling nibble_vec v0.1.0 [INFO] [stderr] Compiling radix_trie v0.2.1 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling syn v2.0.87 [INFO] [stderr] Compiling dirs-sys v0.5.0 [INFO] [stderr] Compiling dirs v6.0.0 [INFO] [stderr] Compiling fd-lock v4.0.4 [INFO] [stderr] Compiling tempfile v3.20.0 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Compiling rustyline-derive v0.11.1 [INFO] [stderr] Compiling rustyline v16.0.0 [INFO] [stderr] Compiling filedescriptor v0.8.3 [INFO] [stderr] Compiling gag v1.0.0 [INFO] [stderr] Compiling codecrafters-shell v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `cmd_cd`, `cmd_ext`, `cmd_history`, `cmd_ls`, and `cmd_pwd` [INFO] [stdout] --> src/tests_functions.rs:2:23 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::builtins::{cmd_cd, cmd_echo, cmd_ext, cmd_history, cmd_ls, cmd_pwd, cmd_type}; [INFO] [stdout] | ^^^^^^ ^^^^^^^ ^^^^^^^^^^^ ^^^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module [INFO] [stdout] --> src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | mod tests_functions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path` [INFO] [stdout] --> src/tests_functions.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::path; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: if this is a test module, consider adding a `#[cfg(test)]` to the containing module [INFO] [stdout] --> src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | mod tests_functions; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 38 | return; [INFO] [stdout] | ------ any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 42 | / let mut editor = match Editor::::new() { [INFO] [stdout] 43 | | Ok(edit) => edit, [INFO] [stdout] 44 | | Err(e) => { [INFO] [stdout] 45 | | eprintln!("Erreur à l'initialisation de l'Editor : {}", e); [INFO] [stdout] ... | [INFO] [stdout] 48 | | }; [INFO] [stdout] | |______^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `editor` [INFO] [stdout] --> src/main.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let mut editor = match Editor::::new() { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_editor` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `edit` [INFO] [stdout] --> src/main.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | Ok(edit) => edit, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_edit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `helper` [INFO] [stdout] --> src/main.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let helper = HelpTab::new(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_helper` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/main.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let line = editor.readline("$ "); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sline` [INFO] [stdout] --> src/main.rs:60:16 [INFO] [stdout] | [INFO] [stdout] 60 | Ok(sline) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_sline` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | let input = sline.trim(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `words` [INFO] [stdout] --> src/main.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | let words: Vec<&str> = input.split_whitespace().collect(); // split the line by space to get the words [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_words` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:72:30 [INFO] [stdout] | [INFO] [stdout] 72 | ["exit", args @ ..] => match args { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | [x] => println!("{} n'est pas un argument reconnu par exit.", x), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:78:30 [INFO] [stdout] | [INFO] [stdout] 78 | ... ["echo", args @ ..] => cmd_echo(args), // if the first word is echo i inject the rest of the line in the echo function [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 79 | ["type", args @ ..] => cmd_type(args, &paths), // same with type but we also need the path for external commande [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:80:33 [INFO] [stdout] | [INFO] [stdout] 80 | ["history", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/main.rs:89:42 [INFO] [stdout] | [INFO] [stdout] 89 | } else if let Ok(n) = args[0].parse::() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:97:29 [INFO] [stdout] | [INFO] [stdout] 97 | ["pwd", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:108:28 [INFO] [stdout] | [INFO] [stdout] 108 | ["cd", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:120:28 [INFO] [stdout] | [INFO] [stdout] 120 | ["ls", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/main.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | let path = if args.is_empty() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/main.rs:123:36 [INFO] [stdout] | [INFO] [stdout] 123 | ... Ok(p) => p.to_string_lossy().to_string(), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:124:37 [INFO] [stdout] | [INFO] [stdout] 124 | ... Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `file` [INFO] [stdout] --> src/main.rs:138:29 [INFO] [stdout] | [INFO] [stdout] 138 | for file in cmd_ls(&path) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/main.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | Err(err) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.91s [INFO] running `Command { std: "docker" "inspect" "0c5b401823262a58842d093892c87423fd0c048a00b685355cb4a8b5e38c5f22", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0c5b401823262a58842d093892c87423fd0c048a00b685355cb4a8b5e38c5f22", kill_on_drop: false }` [INFO] [stdout] 0c5b401823262a58842d093892c87423fd0c048a00b685355cb4a8b5e38c5f22 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/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=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6098ce9b93c1ba1177765a112323de7c55a20d22a25478ed019513661c452861 [INFO] running `Command { std: "docker" "start" "-a" "6098ce9b93c1ba1177765a112323de7c55a20d22a25478ed019513661c452861", kill_on_drop: false }` [INFO] [stderr] Compiling codecrafters-shell v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `cmd_cd`, `cmd_ext`, `cmd_history`, `cmd_ls`, and `cmd_pwd` [INFO] [stdout] --> src/tests_functions.rs:2:23 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::builtins::{cmd_cd, cmd_echo, cmd_ext, cmd_history, cmd_ls, cmd_pwd, cmd_type}; [INFO] [stdout] | ^^^^^^ ^^^^^^^ ^^^^^^^^^^^ ^^^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path` [INFO] [stdout] --> src/tests_functions.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::path; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/main.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 38 | return; [INFO] [stdout] | ------ any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 42 | / let mut editor = match Editor::::new() { [INFO] [stdout] 43 | | Ok(edit) => edit, [INFO] [stdout] 44 | | Err(e) => { [INFO] [stdout] 45 | | eprintln!("Erreur à l'initialisation de l'Editor : {}", e); [INFO] [stdout] ... | [INFO] [stdout] 48 | | }; [INFO] [stdout] | |______^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `editor` [INFO] [stdout] --> src/main.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let mut editor = match Editor::::new() { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_editor` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `edit` [INFO] [stdout] --> src/main.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | Ok(edit) => edit, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_edit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `helper` [INFO] [stdout] --> src/main.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let helper = HelpTab::new(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_helper` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `line` [INFO] [stdout] --> src/main.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let line = editor.readline("$ "); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sline` [INFO] [stdout] --> src/main.rs:60:16 [INFO] [stdout] | [INFO] [stdout] 60 | Ok(sline) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_sline` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/main.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | let input = sline.trim(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `words` [INFO] [stdout] --> src/main.rs:69:21 [INFO] [stdout] | [INFO] [stdout] 69 | let words: Vec<&str> = input.split_whitespace().collect(); // split the line by space to get the words [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_words` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:72:30 [INFO] [stdout] | [INFO] [stdout] 72 | ["exit", args @ ..] => match args { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:75:26 [INFO] [stdout] | [INFO] [stdout] 75 | [x] => println!("{} n'est pas un argument reconnu par exit.", x), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:78:30 [INFO] [stdout] | [INFO] [stdout] 78 | ... ["echo", args @ ..] => cmd_echo(args), // if the first word is echo i inject the rest of the line in the echo function [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:79:30 [INFO] [stdout] | [INFO] [stdout] 79 | ["type", args @ ..] => cmd_type(args, &paths), // same with type but we also need the path for external commande [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:80:33 [INFO] [stdout] | [INFO] [stdout] 80 | ["history", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/main.rs:89:42 [INFO] [stdout] | [INFO] [stdout] 89 | } else if let Ok(n) = args[0].parse::() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:97:29 [INFO] [stdout] | [INFO] [stdout] 97 | ["pwd", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:108:28 [INFO] [stdout] | [INFO] [stdout] 108 | ["cd", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `args` [INFO] [stdout] --> src/main.rs:120:28 [INFO] [stdout] | [INFO] [stdout] 120 | ["ls", args @ ..] => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/main.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | let path = if args.is_empty() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/main.rs:123:36 [INFO] [stdout] | [INFO] [stdout] 123 | ... Ok(p) => p.to_string_lossy().to_string(), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:124:37 [INFO] [stdout] | [INFO] [stdout] 124 | ... Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `file` [INFO] [stdout] --> src/main.rs:138:29 [INFO] [stdout] | [INFO] [stdout] 138 | for file in cmd_ls(&path) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/main.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | Err(err) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.58s [INFO] running `Command { std: "docker" "inspect" "6098ce9b93c1ba1177765a112323de7c55a20d22a25478ed019513661c452861", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6098ce9b93c1ba1177765a112323de7c55a20d22a25478ed019513661c452861", kill_on_drop: false }` [INFO] [stdout] 6098ce9b93c1ba1177765a112323de7c55a20d22a25478ed019513661c452861 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/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=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 9e70a00e9c8d6c9023f0333a4ffea0bd2451ee7db50d7c63f48310f5f11b5d37 [INFO] running `Command { std: "docker" "start" "-a" "9e70a00e9c8d6c9023f0333a4ffea0bd2451ee7db50d7c63f48310f5f11b5d37", kill_on_drop: false }` [INFO] [stderr] warning: unused imports: `cmd_cd`, `cmd_ext`, `cmd_history`, `cmd_ls`, and `cmd_pwd` [INFO] [stderr] --> src/tests_functions.rs:2:23 [INFO] [stderr] | [INFO] [stderr] 2 | use crate::builtins::{cmd_cd, cmd_echo, cmd_ext, cmd_history, cmd_ls, cmd_pwd, cmd_type}; [INFO] [stderr] | ^^^^^^ ^^^^^^^ ^^^^^^^^^^^ ^^^^^^ ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::path` [INFO] [stderr] --> src/tests_functions.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::path; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unreachable statement [INFO] [stderr] --> src/main.rs:42:5 [INFO] [stderr] | [INFO] [stderr] 38 | return; [INFO] [stderr] | ------ any code following this expression is unreachable [INFO] [stderr] ... [INFO] [stderr] 42 | / let mut editor = match Editor::::new() { [INFO] [stderr] 43 | | Ok(edit) => edit, [INFO] [stderr] 44 | | Err(e) => { [INFO] [stderr] 45 | | eprintln!("Erreur à l'initialisation de l'Editor : {}", e); [INFO] [stderr] ... | [INFO] [stderr] 48 | | }; [INFO] [stderr] | |______^ unreachable statement [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `editor` [INFO] [stderr] --> src/main.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | let mut editor = match Editor::::new() { [INFO] [stderr] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_editor` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `edit` [INFO] [stderr] --> src/main.rs:43:12 [INFO] [stderr] | [INFO] [stderr] 43 | Ok(edit) => edit, [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_edit` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/main.rs:44:13 [INFO] [stderr] | [INFO] [stderr] 44 | Err(e) => { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `helper` [INFO] [stderr] --> src/main.rs:49:9 [INFO] [stderr] | [INFO] [stderr] 49 | let helper = HelpTab::new(); [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_helper` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `line` [INFO] [stderr] --> src/main.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | let line = editor.readline("$ "); [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_line` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `sline` [INFO] [stderr] --> src/main.rs:60:16 [INFO] [stderr] | [INFO] [stderr] 60 | Ok(sline) => { [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_sline` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `input` [INFO] [stderr] --> src/main.rs:63:21 [INFO] [stderr] | [INFO] [stderr] 63 | let input = sline.trim(); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `words` [INFO] [stderr] --> src/main.rs:69:21 [INFO] [stderr] | [INFO] [stderr] 69 | let words: Vec<&str> = input.split_whitespace().collect(); // split the line by space to get the words [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_words` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:72:30 [INFO] [stderr] | [INFO] [stderr] 72 | ["exit", args @ ..] => match args { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `x` [INFO] [stderr] --> src/main.rs:75:26 [INFO] [stderr] | [INFO] [stderr] 75 | [x] => println!("{} n'est pas un argument reconnu par exit.", x), [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:78:30 [INFO] [stderr] | [INFO] [stderr] 78 | ... ["echo", args @ ..] => cmd_echo(args), // if the first word is echo i inject the rest of the line in the echo function [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:79:30 [INFO] [stderr] | [INFO] [stderr] 79 | ["type", args @ ..] => cmd_type(args, &paths), // same with type but we also need the path for external commande [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:80:33 [INFO] [stderr] | [INFO] [stderr] 80 | ["history", args @ ..] => { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/main.rs:89:42 [INFO] [stderr] | [INFO] [stderr] 89 | } else if let Ok(n) = args[0].parse::() { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:97:29 [INFO] [stderr] | [INFO] [stderr] 97 | ["pwd", args @ ..] => { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:108:28 [INFO] [stderr] | [INFO] [stderr] 108 | ["cd", args @ ..] => { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `args` [INFO] [stderr] --> src/main.rs:120:28 [INFO] [stderr] | [INFO] [stderr] 120 | ["ls", args @ ..] => { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_args` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `path` [INFO] [stderr] --> src/main.rs:121:29 [INFO] [stderr] | [INFO] [stderr] 121 | let path = if args.is_empty() { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `p` [INFO] [stderr] --> src/main.rs:123:36 [INFO] [stderr] | [INFO] [stderr] 123 | ... Ok(p) => p.to_string_lossy().to_string(), [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/main.rs:124:37 [INFO] [stderr] | [INFO] [stderr] 124 | ... Err(e) => { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `file` [INFO] [stderr] --> src/main.rs:138:29 [INFO] [stderr] | [INFO] [stderr] 138 | for file in cmd_ls(&path) { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `err` [INFO] [stderr] --> src/main.rs:148:17 [INFO] [stderr] | [INFO] [stderr] 148 | Err(err) => { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stderr] [INFO] [stderr] warning: `codecrafters-shell` (bin "codecrafters-shell" test) generated 25 warnings (run `cargo fix --bin "codecrafters-shell" -p codecrafters-shell --tests` to apply 24 suggestions) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.08s [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/codecrafters_shell-f241a00449cbb29e) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "9e70a00e9c8d6c9023f0333a4ffea0bd2451ee7db50d7c63f48310f5f11b5d37", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9e70a00e9c8d6c9023f0333a4ffea0bd2451ee7db50d7c63f48310f5f11b5d37", kill_on_drop: false }` [INFO] [stdout] 9e70a00e9c8d6c9023f0333a4ffea0bd2451ee7db50d7c63f48310f5f11b5d37