[INFO] cloning repository https://github.com/dhananjaykuber/simple-rust-api [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dhananjaykuber/simple-rust-api" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdhananjaykuber%2Fsimple-rust-api", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdhananjaykuber%2Fsimple-rust-api'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 465fd239c32d25ed21b32284d4bcd8d6f36bf1d9 [INFO] testing dhananjaykuber/simple-rust-api against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_with_libc_patch_0 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdhananjaykuber%2Fsimple-rust-api" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/dhananjaykuber/simple-rust-api [INFO] finished tweaking git repo https://github.com/dhananjaykuber/simple-rust-api [INFO] tweaked toml for git repo https://github.com/dhananjaykuber/simple-rust-api written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/dhananjaykuber/simple-rust-api on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/dhananjaykuber/simple-rust-api 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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded quote v1.0.38 [INFO] [stderr] Downloaded cpufeatures v0.2.16 [INFO] [stderr] Downloaded siphasher v0.3.11 [INFO] [stderr] Downloaded postgres-types v0.2.8 [INFO] [stderr] Downloaded serde v1.0.217 [INFO] [stderr] Downloaded async-trait v0.1.84 [INFO] [stderr] Downloaded tokio-postgres v0.7.12 [INFO] [stderr] Downloaded serde_derive v1.0.217 [INFO] [stderr] Downloaded tokio-util v0.7.13 [INFO] [stderr] Downloaded phf_shared v0.11.2 [INFO] [stderr] Downloaded phf v0.11.2 [INFO] [stderr] Downloaded postgres-protocol v0.6.7 [INFO] [stderr] Downloaded postgres v0.19.9 [INFO] [stderr] Downloaded syn v2.0.95 [INFO] [stderr] Downloaded tokio v1.42.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b2848a3415c2e66e690e6a2ac7f56bb77a20ff6a38dd6e3a58a1590440adf9e7 [INFO] running `Command { std: "docker" "start" "-a" "b2848a3415c2e66e690e6a2ac7f56bb77a20ff6a38dd6e3a58a1590440adf9e7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b2848a3415c2e66e690e6a2ac7f56bb77a20ff6a38dd6e3a58a1590440adf9e7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b2848a3415c2e66e690e6a2ac7f56bb77a20ff6a38dd6e3a58a1590440adf9e7", kill_on_drop: false }` [INFO] [stdout] b2848a3415c2e66e690e6a2ac7f56bb77a20ff6a38dd6e3a58a1590440adf9e7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 606cf13859f61ab2fba20ca01c0899dad74847ca44869a1e145ca6713490e259 [INFO] running `Command { std: "docker" "start" "-a" "606cf13859f61ab2fba20ca01c0899dad74847ca44869a1e145ca6713490e259", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Compiling byteorder v1.5.0 [INFO] [stderr] Compiling subtle v2.6.1 [INFO] [stderr] Compiling tinyvec_macros v0.1.1 [INFO] [stderr] Compiling bytes v1.9.0 [INFO] [stderr] Compiling unicode-properties v0.1.3 [INFO] [stderr] Compiling unicode-bidi v0.3.18 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling cpufeatures v0.2.16 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Compiling smallvec v1.13.2 [INFO] [stderr] Compiling fallible-iterator v0.2.0 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling whoami v1.5.2 [INFO] [stderr] Compiling serde_json v1.0.134 [INFO] [stderr] Compiling tinyvec v1.8.1 [INFO] [stderr] Compiling log v0.4.22 [INFO] [stderr] Compiling phf_shared v0.11.2 [INFO] [stderr] Compiling itoa v1.0.14 [INFO] [stderr] Compiling ryu v1.0.18 [INFO] [stderr] Compiling syn v2.0.95 [INFO] [stderr] Compiling phf v0.11.2 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling crypto-common v0.1.6 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Compiling mio v1.0.3 [INFO] [stderr] Compiling socket2 v0.5.8 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Compiling unicode-normalization v0.1.24 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Compiling sha2 v0.10.8 [INFO] [stderr] Compiling md-5 v0.10.6 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling parking_lot v0.12.3 [INFO] [stderr] Compiling stringprep v0.1.5 [INFO] [stderr] Compiling tokio v1.42.0 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling async-trait v0.1.84 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling tokio-util v0.7.13 [INFO] [stderr] Compiling zerocopy v0.7.35 [INFO] [stderr] Compiling ppv-lite86 v0.2.20 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling postgres-protocol v0.6.7 [INFO] [stderr] Compiling postgres-types v0.2.8 [INFO] [stderr] Compiling tokio-postgres v0.7.12 [INFO] [stderr] Compiling postgres v0.19.9 [INFO] [stderr] Compiling simple-rust-api v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: environment variable `DATABASE_URL` not defined at compile time [INFO] [stdout] --> src/main.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | const DB_URL: &str = env!("DATABASE_URL"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: use `std::env::var("DATABASE_URL")` to read the variable at run time [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / /** [INFO] [stdout] 33 | | * - Calls the set_database() function and checks if it returns an error [INFO] [stdout] 34 | | * - `if let` is a pattern matching construct that only executes the code block if the pattern matches [INFO] [stdout] 35 | | * - Err(_) means "if there's an error [INFO] [stdout] 36 | | * - If there's an error, print "Error setting database" and return [INFO] [stdout] 37 | | * - If there's no error, continue [INFO] [stdout] 38 | | */ [INFO] [stdout] | |_______^ [INFO] [stdout] 39 | / if let Err(_) = set_database() { [INFO] [stdout] 40 | | println!("Error setting database"); [INFO] [stdout] 41 | | return; [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | / /** [INFO] [stdout] 46 | | * - `TcpListener::bind()` creates a server that can accept connections [INFO] [stdout] 47 | | * - 0.0.0.0 means "listen on all available network interfaces" [INFO] [stdout] 48 | | * - unwrap() gets the result value or crashes if there's an error [INFO] [stdout] 49 | | */ [INFO] [stdout] | |_______^ [INFO] [stdout] 50 | let listener = TcpListener::bind(format!("0.0.0.0:3000")).unwrap(); [INFO] [stdout] | ------------------------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / /** [INFO] [stdout] 55 | | * - `listener.incoming()` returns an iterator over incoming connections [INFO] [stdout] 56 | | * - `for` loops over each incoming connection [INFO] [stdout] 57 | | * - `match` is a pattern matching construct [INFO] [stdout] ... | [INFO] [stdout] 61 | | * - If the connection is successful, call the `handle_client()` function to handle the request [INFO] [stdout] 62 | | */ [INFO] [stdout] | |_______^ [INFO] [stdout] 63 | / for stream in listener.incoming() { [INFO] [stdout] 64 | | match stream { [INFO] [stdout] 65 | | Ok(stream) => { [INFO] [stdout] 66 | | handle_client(stream); [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | / /** [INFO] [stdout] 81 | | * - Creates a buffer array of 1024 zeros to temporarily store incoming data [INFO] [stdout] 82 | | * - Creates an empty string to store the request [INFO] [stdout] 83 | | */ [INFO] [stdout] | |_______^ [INFO] [stdout] 84 | let mut buffer = [0; 1024]; [INFO] [stdout] | --------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / /** [INFO] [stdout] 90 | | * If read is successful: [INFO] [stdout] 91 | | * - `size` is how many bytes were read [INFO] [stdout] 92 | | * - `&buffer[..size]` takes a slice of the buffer up to the number of bytes read [INFO] [stdout] ... | [INFO] [stdout] 95 | | * - `push_str()` appends the string to the request [INFO] [stdout] 96 | | */ [INFO] [stdout] | |___________^ [INFO] [stdout] 97 | / Ok(size) => { [INFO] [stdout] 98 | | request.push_str(String::from_utf8_lossy(&buffer[..size]).as_ref()); [INFO] [stdout] 99 | | [INFO] [stdout] 100 | | /** [INFO] [stdout] ... | [INFO] [stdout] 116 | | .unwrap(); [INFO] [stdout] 117 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for match arms [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | / /** [INFO] [stdout] 101 | | * - Uses pattern matching to check the start of the request string [INFO] [stdout] 102 | | * - Calls the appropriate function based on the request [INFO] [stdout] 103 | | * - The pattern r if r.starts_with(...) binds the request to r and checks if it starts with the given path [INFO] [stdout] 104 | | */ [INFO] [stdout] | |_______________^ [INFO] [stdout] 105 | / let (status_line, content) = match &*request { [INFO] [stdout] 106 | | r if r.starts_with("POST /users") => handle_post_request(r), [INFO] [stdout] 107 | | r if r.starts_with("GET /users/") => handle_get_request(r), [INFO] [stdout] 108 | | r if r.starts_with("GET /users") => handle_get_all_request(r), [INFO] [stdout] ... | [INFO] [stdout] 111 | | _ => (NOT_FOUND.to_string(), "404 not found".to_string()), [INFO] [stdout] 112 | | }; [INFO] [stdout] | |______________- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / /** [INFO] [stdout] 128 | | * This match block does the following: [INFO] [stdout] 129 | | * - Calls the get_user_request_body() function to get the user data from the request body [INFO] [stdout] 130 | | * - Calls the Client::connect() function to connect to the database [INFO] [stdout] 131 | | * - Both operations return Result types, which is why we use match [INFO] [stdout] 132 | | */ [INFO] [stdout] | |_______^ [INFO] [stdout] 133 | / match ( [INFO] [stdout] 134 | | get_user_request_body(&request), [INFO] [stdout] 135 | | Client::connect(DB_URL, NoTls), [INFO] [stdout] 136 | | ) { [INFO] [stdout] ... | [INFO] [stdout] 151 | | _ => (INTERNAL_ERROR.to_string(), "Internal error".to_string()), [INFO] [stdout] 152 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | / /** [INFO] [stdout] 138 | | * - Ok(user) means we successfully parsed the User from request [INFO] [stdout] 139 | | * - Ok(mut client) means we successfully connected to the database [INFO] [stdout] 140 | | */ [INFO] [stdout] | |___________^ [INFO] [stdout] 141 | / (Ok(user), Ok(mut client)) => { [INFO] [stdout] 142 | | client [INFO] [stdout] 143 | | .execute( [INFO] [stdout] 144 | | "INSERT INTO users (name, email) VALUES ($1, $2)", [INFO] [stdout] ... | [INFO] [stdout] 149 | | (OK_RESPONSE.to_string(), "User created".to_string()) [INFO] [stdout] 150 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for match arms [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `simple-rust-api` (bin "simple-rust-api") due to 1 previous error; 8 warnings emitted [INFO] running `Command { std: "docker" "inspect" "606cf13859f61ab2fba20ca01c0899dad74847ca44869a1e145ca6713490e259", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "606cf13859f61ab2fba20ca01c0899dad74847ca44869a1e145ca6713490e259", kill_on_drop: false }` [INFO] [stdout] 606cf13859f61ab2fba20ca01c0899dad74847ca44869a1e145ca6713490e259