[INFO] cloning repository https://github.com/dhananjaykuber/simple-rust-api
[INFO] running `"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"`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdhananjaykuber%2Fsimple-rust-api'...
[INFO] running `"git" "rev-parse" "HEAD"`
[INFO] [stdout] 465fd239c32d25ed21b32284d4bcd8d6f36bf1d9
[INFO] testing dhananjaykuber/simple-rust-api against 1.101.0-beta.1+cargoflags=--release for beta-release-1.101-2
[INFO] running `"git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdhananjaykuber%2Fsimple-rust-api" "/workspace/builds/worker-5-tc2/source"`
[INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/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-5-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/dhananjaykuber/simple-rust-api on toolchain 1.101.0-beta.1
[INFO] running `"cargo" "+1.101.0-beta.1" "metadata" "--manifest-path" "Cargo.toml" "--no-deps"`
[INFO] crate git repo https://github.com/dhananjaykuber/simple-rust-api already has a lockfile, it will not be regenerated
[INFO] running `"cargo" "+1.101.0-beta.1" "fetch" "--manifest-path" "Cargo.toml"`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,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" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:13253766d39459fde29cea4e7c35a3fe37c2c19b4a224f71f2c27711c2837d36" "sleep" "infinity"`
[INFO] [stdout] 3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7
[INFO] running `"docker" "start" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7"`
[INFO] running `"docker" "inspect" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7"`
[INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "metadata" "--no-deps" "--format-version=1"`
[INFO] running `"docker" "inspect" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7"`
[INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "build" "--frozen" "--message-format=json" "--release"`
[INFO] [stderr]    Compiling libc v0.2.169
[INFO] [stderr]    Compiling bytes v1.9.0
[INFO] [stderr]    Compiling cpufeatures v0.2.16
[INFO] [stderr]    Compiling unicode-properties v0.1.3
[INFO] [stderr]    Compiling unicode-bidi v0.3.18
[INFO] [stderr]    Compiling tinyvec v1.8.1
[INFO] [stderr]    Compiling quote v1.0.38
[INFO] [stderr]    Compiling siphasher v0.3.11
[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 digest v0.10.7
[INFO] [stderr]    Compiling hmac v0.12.1
[INFO] [stderr]    Compiling md-5 v0.10.6
[INFO] [stderr]    Compiling sha2 v0.10.8
[INFO] [stderr]    Compiling phf_shared v0.11.2
[INFO] [stderr]    Compiling syn v2.0.95
[INFO] [stderr]    Compiling phf v0.11.2
[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 rand_core v0.6.4
[INFO] [stderr]    Compiling parking_lot v0.12.3
[INFO] [stderr]    Compiling tokio v1.42.0
[INFO] [stderr]    Compiling unicode-normalization v0.1.24
[INFO] [stderr]    Compiling stringprep v0.1.5
[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 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 tokio-util v0.7.13
[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)]` (part of `#[warn(unused)]`) 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 `"docker" "inspect" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7"`
[INFO] running `"docker" "rm" "-f" "3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7"`
[INFO] [stdout] 3582979a47bdae0fa15552c830890b4ed20976879e2a9b8123e2e9dd1a57f5e7
