[INFO] fetching crate rustyopenai 0.1.0... [INFO] checking rustyopenai-0.1.0 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] extracting crate rustyopenai 0.1.0 into /workspace/builds/worker-1-tc2/source [INFO] validating manifest of crates.io crate rustyopenai 0.1.0 on toolchain ccf408f4326a858c00dd845a64a86b16f360a801 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate rustyopenai 0.1.0 [INFO] finished tweaking crates.io crate rustyopenai 0.1.0 [INFO] tweaked toml for crates.io crate rustyopenai 0.1.0 written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] crate crates.io crate rustyopenai 0.1.0 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" "+ccf408f4326a858c00dd845a64a86b16f360a801" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c525d54e8070eb27fdc69f05a6c83565ed6eb589380dc95b40e094c8c88c06c5 [INFO] running `Command { std: "docker" "start" "-a" "c525d54e8070eb27fdc69f05a6c83565ed6eb589380dc95b40e094c8c88c06c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c525d54e8070eb27fdc69f05a6c83565ed6eb589380dc95b40e094c8c88c06c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c525d54e8070eb27fdc69f05a6c83565ed6eb589380dc95b40e094c8c88c06c5", kill_on_drop: false }` [INFO] [stdout] c525d54e8070eb27fdc69f05a6c83565ed6eb589380dc95b40e094c8c88c06c5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 612bcdee1f813788a7060dba76849e57a508bea896f50e4083dbce76eca58377 [INFO] running `Command { std: "docker" "start" "-a" "612bcdee1f813788a7060dba76849e57a508bea896f50e4083dbce76eca58377", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Migrating Cargo.toml from 2021 edition to 2024 [INFO] [stderr] Compiling proc-macro2 v1.0.70 [INFO] [stderr] Compiling unicode-ident v1.0.12 [INFO] [stderr] Compiling libc v0.2.151 [INFO] [stderr] Checking pin-project-lite v0.2.13 [INFO] [stderr] Checking memchr v2.6.4 [INFO] [stderr] Compiling futures-core v0.3.29 [INFO] [stderr] Compiling vcpkg v0.2.15 [INFO] [stderr] Compiling pkg-config v0.3.27 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling futures-channel v0.3.29 [INFO] [stderr] Checking futures-sink v0.3.29 [INFO] [stderr] Checking bytes v1.5.0 [INFO] [stderr] Compiling futures-task v0.3.29 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Compiling futures-util v0.3.29 [INFO] [stderr] Checking bitflags v2.4.1 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Checking itoa v1.0.10 [INFO] [stderr] Checking futures-io v0.3.29 [INFO] [stderr] Compiling syn v2.0.41 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking mio v0.8.10 [INFO] [stderr] Checking socket2 v0.5.5 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling openssl v0.10.61 [INFO] [stderr] Compiling serde v1.0.193 [INFO] [stderr] Checking http v0.2.11 [INFO] [stderr] Compiling ident_case v1.0.1 [INFO] [stderr] Compiling strsim v0.10.0 [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Checking tinyvec_macros v0.1.1 [INFO] [stderr] Compiling native-tls v0.2.11 [INFO] [stderr] Checking hashbrown v0.14.3 [INFO] [stderr] Checking try-lock v0.2.5 [INFO] [stderr] Checking tinyvec v1.6.0 [INFO] [stderr] Compiling rustix v0.38.28 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Checking want v0.3.1 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking aho-corasick v1.1.2 [INFO] [stderr] Checking linux-raw-sys v0.4.12 [INFO] [stderr] Checking httpdate v1.0.3 [INFO] [stderr] Checking unicode-bidi v0.3.14 [INFO] [stderr] Checking indexmap v2.1.0 [INFO] [stderr] Checking regex-syntax v0.8.2 [INFO] [stderr] Checking unicode-normalization v0.1.22 [INFO] [stderr] Compiling openssl-sys v0.9.97 [INFO] [stderr] Compiling serde_json v1.0.108 [INFO] [stderr] Checking ryu v1.0.16 [INFO] [stderr] Compiling anyhow v1.0.75 [INFO] [stderr] Checking encoding_rs v0.8.33 [INFO] [stderr] Checking ipnet v2.9.0 [INFO] [stderr] Checking idna v0.5.0 [INFO] [stderr] Checking base64 v0.21.5 [INFO] [stderr] Checking termcolor v1.4.0 [INFO] [stderr] Checking is-terminal v0.4.9 [INFO] [stderr] Checking humantime v2.1.0 [INFO] [stderr] Checking mime v0.3.17 [INFO] [stderr] Checking url v2.5.0 [INFO] [stderr] Checking dotenv v0.15.0 [INFO] [stderr] Checking regex-automata v0.4.3 [INFO] [stderr] Compiling darling_core v0.20.3 [INFO] [stderr] Compiling futures-macro v0.3.29 [INFO] [stderr] Compiling tokio-macros v2.2.0 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling serde_derive v1.0.193 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking tokio v1.35.0 [INFO] [stderr] Checking regex v1.10.2 [INFO] [stderr] Checking env_logger v0.10.1 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Compiling darling_macro v0.20.3 [INFO] [stderr] Compiling darling v0.20.3 [INFO] [stderr] Compiling serde_with_macros v3.4.0 [INFO] [stderr] Checking futures-executor v0.3.29 [INFO] [stderr] Checking futures v0.3.29 [INFO] [stderr] Checking tokio-util v0.7.10 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking h2 v0.3.22 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking serde_with v3.4.0 [INFO] [stderr] Checking hyper v0.14.27 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.22 [INFO] [stderr] Checking rustyopenai v0.1.0 (/tmp/fixit) [INFO] [stderr] Migrating src/lib.rs from 2021 edition to 2024 [INFO] [stderr] Fixed src/chat/api_call.rs (1 fix) [INFO] [stderr] Fixed src/chat/response/mod.rs (1 fix) [INFO] [stdout] warning: fields `id`, `choices`, `object`, `created`, `model`, and `usage` are never read [INFO] [stdout] --> src/chat/response/response.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct OpenAIChatResponse { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 5 | pub id: String, [INFO] [stdout] | ^^ [INFO] [stdout] 6 | pub choices: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 7 | pub object: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 8 | pub created: i64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub model: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 10 | pub usage: ChatTokenUsage, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `finish_reason`, `index`, and `message` are never read [INFO] [stdout] --> src/chat/response/response.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct OpenAIChatResponseChoice { [INFO] [stdout] | ------------------------ fields in this struct [INFO] [stdout] 15 | pub finish_reason: String, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 16 | pub index: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub message: OpenAIChatResponseMessage, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponseChoice` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `content` and `role` are never read [INFO] [stdout] --> src/chat/response/response.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct OpenAIChatResponseMessage { [INFO] [stdout] | ------------------------- fields in this struct [INFO] [stdout] 22 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | pub role: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponseMessage` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prompt_tokens`, `completion_tokens`, and `total_tokens` are never read [INFO] [stdout] --> src/chat/response/response.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct ChatTokenUsage { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 28 | pub prompt_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub completion_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 30 | pub total_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ChatTokenUsage` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id`, `choices`, `object`, `created`, `model`, and `usage` are never read [INFO] [stdout] --> src/chat/response/response.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct OpenAIChatResponse { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 5 | pub id: String, [INFO] [stdout] | ^^ [INFO] [stdout] 6 | pub choices: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 7 | pub object: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 8 | pub created: i64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub model: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 10 | pub usage: ChatTokenUsage, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/main.rs from 2021 edition to 2024 [INFO] [stdout] warning: fields `finish_reason`, `index`, and `message` are never read [INFO] [stdout] --> src/chat/response/response.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct OpenAIChatResponseChoice { [INFO] [stdout] | ------------------------ fields in this struct [INFO] [stdout] 15 | pub finish_reason: String, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 16 | pub index: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub message: OpenAIChatResponseMessage, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponseChoice` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `content` and `role` are never read [INFO] [stdout] --> src/chat/response/response.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct OpenAIChatResponseMessage { [INFO] [stdout] | ------------------------- fields in this struct [INFO] [stdout] 22 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | pub role: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponseMessage` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prompt_tokens`, `completion_tokens`, and `total_tokens` are never read [INFO] [stdout] --> src/chat/response/response.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct ChatTokenUsage { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 28 | pub prompt_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub completion_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 30 | pub total_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ChatTokenUsage` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/chat/api_call.rs:112:15 [INFO] [stdout] | [INFO] [stdout] 112 | while let Some(chunk) = stream.next().await { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^------^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/chat/api_call.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | } [INFO] [stdout] | ^ [INFO] [stdout] = note: `--force-warn if-let-rescope` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.51s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking rustyopenai v0.1.0 (/tmp/fixit) [INFO] [stdout] warning: fields `id`, `choices`, `object`, `created`, `model`, and `usage` are never read [INFO] [stdout] --> src/chat/response/response.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct OpenAIChatResponse { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 5 | pub id: String, [INFO] [stdout] | ^^ [INFO] [stdout] 6 | pub choices: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 7 | pub object: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 8 | pub created: i64, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 9 | pub model: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 10 | pub usage: ChatTokenUsage, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `finish_reason`, `index`, and `message` are never read [INFO] [stdout] --> src/chat/response/response.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 14 | pub struct OpenAIChatResponseChoice { [INFO] [stdout] | ------------------------ fields in this struct [INFO] [stdout] 15 | pub finish_reason: String, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 16 | pub index: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | pub message: OpenAIChatResponseMessage, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponseChoice` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `content` and `role` are never read [INFO] [stdout] --> src/chat/response/response.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct OpenAIChatResponseMessage { [INFO] [stdout] | ------------------------- fields in this struct [INFO] [stdout] 22 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 23 | pub role: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `OpenAIChatResponseMessage` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `prompt_tokens`, `completion_tokens`, and `total_tokens` are never read [INFO] [stdout] --> src/chat/response/response.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | pub struct ChatTokenUsage { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 28 | pub prompt_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 29 | pub completion_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] 30 | pub total_tokens: u32, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ChatTokenUsage` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/chat/api_call.rs:100:14 [INFO] [stdout] | [INFO] [stdout] 100 | &OpenAIClient::builder().timeout(Duration::from_secs(60)).build()?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use [INFO] [stdout] ... [INFO] [stdout] 110 | ).await?; [INFO] [stdout] | - temporary value is freed at the end of this statement [INFO] [stdout] 111 | [INFO] [stdout] 112 | while let Some(chunk) = stream.next().await { [INFO] [stdout] | ------ borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 99 ~ let binding = OpenAIClient::builder().timeout(Duration::from_secs(60)).build()?; [INFO] [stdout] 100 ~ let mut stream = get_streamed_chat_response( [INFO] [stdout] 101 ~ &binding, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/chat/api_call.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | &ChatRequestBody::builder() [INFO] [stdout] | ______________^ [INFO] [stdout] 102 | | .messages( [INFO] [stdout] 103 | | vec![ChatMessage { [INFO] [stdout] 104 | | role: ChatRole::User, [INFO] [stdout] ... | [INFO] [stdout] 108 | | .temperature(0.0) [INFO] [stdout] 109 | | .build() [INFO] [stdout] | |________________________^ creates a temporary value which is freed while still in use [INFO] [stdout] 110 | ).await?; [INFO] [stdout] | - temporary value is freed at the end of this statement [INFO] [stdout] 111 | [INFO] [stdout] 112 | while let Some(chunk) = stream.next().await { [INFO] [stdout] | ------ borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 99 ~ let binding = ChatRequestBody::builder() [INFO] [stdout] 100 + .messages( [INFO] [stdout] 101 + vec![ChatMessage { [INFO] [stdout] 102 + role: ChatRole::User, [INFO] [stdout] 103 + content: "What is Rust?".to_string(), [INFO] [stdout] 104 + }] [INFO] [stdout] 105 + ) [INFO] [stdout] 106 + .temperature(0.0) [INFO] [stdout] 107 + .build(); [INFO] [stdout] 108 ~ let mut stream = get_streamed_chat_response( [INFO] [stdout] 109 | &OpenAIClient::builder().timeout(Duration::from_secs(60)).build()?, [INFO] [stdout] 110 ~ &binding [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0716`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rustyopenai` (lib test) due to 3 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: failed to check after updating to 2024 [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `cargo check --frozen --all --all-targets --message-format=json` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "612bcdee1f813788a7060dba76849e57a508bea896f50e4083dbce76eca58377", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "612bcdee1f813788a7060dba76849e57a508bea896f50e4083dbce76eca58377", kill_on_drop: false }` [INFO] [stdout] 612bcdee1f813788a7060dba76849e57a508bea896f50e4083dbce76eca58377