[INFO] fetching crate rig-ai-sdk 0.1.4... [INFO] testing rig-ai-sdk-0.1.4 against master#562dee4820c458d823175268e41601d4c060588a for pr-154210-2 [INFO] extracting crate rig-ai-sdk 0.1.4 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate rig-ai-sdk 0.1.4 [INFO] finished tweaking crates.io crate rig-ai-sdk 0.1.4 [INFO] tweaked toml for crates.io crate rig-ai-sdk 0.1.4 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rig-ai-sdk 0.1.4 on toolchain 562dee4820c458d823175268e41601d4c060588a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate rig-ai-sdk 0.1.4 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" "+562dee4820c458d823175268e41601d4c060588a" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded as-any v0.3.2 [INFO] [stderr] Downloaded eventsource-stream v0.2.3 [INFO] [stderr] Downloaded zmij v1.0.16 [INFO] [stderr] Downloaded schemars_derive v1.2.0 [INFO] [stderr] Downloaded schemars v1.2.0 [INFO] [stderr] Downloaded rig-core v0.29.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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a76b29d89d2f8e2bef5750a68bf25fd550d347f3f7b37a7029aef8a4a25e9d4c [INFO] running `Command { std: "docker" "start" "-a" "a76b29d89d2f8e2bef5750a68bf25fd550d347f3f7b37a7029aef8a4a25e9d4c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a76b29d89d2f8e2bef5750a68bf25fd550d347f3f7b37a7029aef8a4a25e9d4c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a76b29d89d2f8e2bef5750a68bf25fd550d347f3f7b37a7029aef8a4a25e9d4c", kill_on_drop: false }` [INFO] [stdout] a76b29d89d2f8e2bef5750a68bf25fd550d347f3f7b37a7029aef8a4a25e9d4c [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9b50bf16eae50b0f1fab33b2dbc5fcbe12d3d6aecf5e31a0a08281315d5a45f2 [INFO] running `Command { std: "docker" "start" "-a" "9b50bf16eae50b0f1fab33b2dbc5fcbe12d3d6aecf5e31a0a08281315d5a45f2", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Compiling futures-task v0.3.31 [INFO] [stderr] Compiling zmij v1.0.16 [INFO] [stderr] Compiling tracing-core v0.1.36 [INFO] [stderr] Compiling socket2 v0.6.1 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling dyn-clone v1.0.20 [INFO] [stderr] Compiling futures-timer v3.0.3 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling as-any v0.3.2 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling uuid v1.19.0 [INFO] [stderr] Compiling tokio v1.49.0 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling ordered-float v5.1.0 [INFO] [stderr] Compiling eventsource-stream v0.2.3 [INFO] [stderr] Compiling hyper v1.8.1 [INFO] [stderr] Compiling tokio-util v0.7.18 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling schemars_derive v1.2.0 [INFO] [stderr] Compiling async-stream v0.3.6 [INFO] [stderr] Compiling tracing v0.1.44 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Compiling zerovec v0.11.5 [INFO] [stderr] Compiling zerotrie v0.2.3 [INFO] [stderr] Compiling pin-project v1.1.10 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling tinystr v0.8.2 [INFO] [stderr] Compiling potential_utf v0.1.4 [INFO] [stderr] Compiling icu_collections v2.1.1 [INFO] [stderr] Compiling icu_locale_core v2.1.1 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling icu_provider v2.1.1 [INFO] [stderr] Compiling icu_normalizer v2.1.1 [INFO] [stderr] Compiling icu_properties v2.1.2 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Compiling schemars v1.2.0 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Compiling url v2.5.8 [INFO] [stderr] Compiling tower v0.5.3 [INFO] [stderr] Compiling futures-executor v0.3.31 [INFO] [stderr] Compiling hyper-util v0.1.19 [INFO] [stderr] Compiling futures v0.3.31 [INFO] [stderr] Compiling tracing-futures v0.2.5 [INFO] [stderr] Compiling tower-http v0.6.8 [INFO] [stderr] Compiling reqwest v0.12.28 [INFO] [stderr] Compiling rig-core v0.29.0 [INFO] [stderr] Compiling rig-ai-sdk v0.1.4 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 50.12s [INFO] running `Command { std: "docker" "inspect" "9b50bf16eae50b0f1fab33b2dbc5fcbe12d3d6aecf5e31a0a08281315d5a45f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9b50bf16eae50b0f1fab33b2dbc5fcbe12d3d6aecf5e31a0a08281315d5a45f2", kill_on_drop: false }` [INFO] [stdout] 9b50bf16eae50b0f1fab33b2dbc5fcbe12d3d6aecf5e31a0a08281315d5a45f2 [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f89e5cf26a55a7346296d4c42e1411588a9bbb7f6e844e3f9d61a5d60661e35b [INFO] running `Command { std: "docker" "start" "-a" "f89e5cf26a55a7346296d4c42e1411588a9bbb7f6e844e3f9d61a5d60661e35b", kill_on_drop: false }` [INFO] [stderr] Compiling rig-ai-sdk v0.1.4 (/opt/rustwide/workdir) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 2.73s [INFO] running `Command { std: "docker" "inspect" "f89e5cf26a55a7346296d4c42e1411588a9bbb7f6e844e3f9d61a5d60661e35b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f89e5cf26a55a7346296d4c42e1411588a9bbb7f6e844e3f9d61a5d60661e35b", kill_on_drop: false }` [INFO] [stdout] f89e5cf26a55a7346296d4c42e1411588a9bbb7f6e844e3f9d61a5d60661e35b [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] e49390f30f4c5a87daaf3ca454aacf37ea3cf0e71ca873ac3d9dec6aaacc6fb6 [INFO] running `Command { std: "docker" "start" "-a" "e49390f30f4c5a87daaf3ca454aacf37ea3cf0e71ca873ac3d9dec6aaacc6fb6", kill_on_drop: false }` [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s [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] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/rig_ai_sdk-31b77a17d78af059) [INFO] [stderr] Doc-tests rig_ai_sdk [INFO] [stdout] [INFO] [stdout] running 16 tests [INFO] [stdout] test src/convert.rs - convert (line 33) ... ignored [INFO] [stdout] test src/convert.rs - convert (line 41) ... ignored [INFO] [stdout] test src/convert.rs - convert::extract_prompt_and_history (line 70) ... ignored [INFO] [stdout] test src/event.rs - event (line 49) ... ignored [INFO] [stdout] test src/event.rs - event::AISdkEvent::custom_data (line 353) ... ignored [INFO] [stdout] test src/event.rs - event::AISdkEvent::error (line 332) ... ignored [INFO] [stdout] test src/message.rs - message (line 22) ... ignored [INFO] [stdout] test src/message.rs - message::UIMessage::get_parts_by_type (line 510) ... ignored [INFO] [stdout] test src/message.rs - message::UIMessage::text (line 469) ... ignored [INFO] [stdout] test src/message.rs - message::UIMessagePart::as_text (line 314) ... ignored [INFO] [stdout] test src/stream.rs - stream (line 19) ... ignored [INFO] [stdout] test src/stream.rs - stream (line 36) ... ignored [INFO] [stdout] test src/lib.rs - (line 59) ... FAILED [INFO] [stdout] test src/lib.rs - (line 41) ... FAILED [INFO] [stdout] test src/lib.rs - (line 114) ... FAILED [INFO] [stdout] test src/lib.rs - (line 71) ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/lib.rs - (line 59) stdout ---- [INFO] [stdout] error[E0433]: cannot find module or crate `axum` in this scope [INFO] [stdout] --> src/lib.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | use axum::response::sse::{Event, Sse}; [INFO] [stdout] | ^^^^ use of unresolved module or unlinked crate `axum` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `axum`, use `cargo add axum` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `rig_ai_sdk::adapt_rig_stream_sse` [INFO] [stdout] --> src/lib.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | use rig_ai_sdk::adapt_rig_stream_sse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `adapt_rig_stream_sse` in the root [INFO] [stdout] | [INFO] [stdout] note: found an item that was configured out [INFO] [stdout] --> src/lib.rs:17:37 [INFO] [stdout] | [INFO] [stdout] 16 | #[cfg(feature = "axum-sse")] [INFO] [stdout] | -------------------- the item is gated behind the `axum-sse` feature [INFO] [stdout] 17 | pub use adapter::{adapt_rig_stream, adapt_rig_stream_sse}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] error[E0405]: cannot find trait `Stream` in this scope [INFO] [stdout] --> src/lib.rs:64:37 [INFO] [stdout] | [INFO] [stdout] 64 | async fn chat_handler() -> Sse>> { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Infallible` in this scope [INFO] [stdout] --> src/lib.rs:64:65 [INFO] [stdout] | [INFO] [stdout] 64 | async fn chat_handler() -> Sse>> { [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this enum [INFO] [stdout] | [INFO] [stdout] 58 + use std::convert::Infallible; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `agent` in this scope [INFO] [stdout] --> src/lib.rs:65:22 [INFO] [stdout] | [INFO] [stdout] 65 | let rig_stream = agent.stream_chat(prompt, history).await; [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `prompt` in this scope [INFO] [stdout] --> src/lib.rs:65:40 [INFO] [stdout] | [INFO] [stdout] 65 | let rig_stream = agent.stream_chat(prompt, history).await; [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 58 + use rig::pipeline::agent_ops::prompt; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `history` in this scope [INFO] [stdout] --> src/lib.rs:65:48 [INFO] [stdout] | [INFO] [stdout] 65 | let rig_stream = agent.stream_chat(prompt, history).await; [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0405, E0425, E0432, E0433. [INFO] [stdout] For more information about an error, try `rustc --explain E0405`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 41) stdout ---- [INFO] [stdout] error[E0432]: unresolved import `futures` [INFO] [stdout] --> src/lib.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | use futures::StreamExt; [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `futures` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `futures`, use `cargo add futures` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0432`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 114) stdout ---- [INFO] [stdout] error[E0433]: cannot find type `AISdkStreamBuilder` in this scope [INFO] [stdout] --> src/lib.rs:115:19 [INFO] [stdout] | [INFO] [stdout] 115 | let mut builder = AISdkStreamBuilder::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ use of undeclared type `AISdkStreamBuilder` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 114 + use rig_ai_sdk::AISdkStreamBuilder; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0433`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - (line 71) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `body` in this scope [INFO] [stdout] --> src/lib.rs:75:54 [INFO] [stdout] | [INFO] [stdout] 75 | let messages: Vec = serde_json::from_str(&body)?; [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `agent` in this scope [INFO] [stdout] --> src/lib.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | let response = agent.run_chat(prompt, history).await?; [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:78:48 [INFO] [stdout] | [INFO] [stdout] 72 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_71_0() { [INFO] [stdout] | ---------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 78 | let response = agent.run_chat(prompt, history).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:75:59 [INFO] [stdout] | [INFO] [stdout] 72 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_71_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 75 | let messages: Vec = serde_json::from_str(&body)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 72 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_71_0() -> Result<(), Box> { [INFO] [stdout] 73 | use rig_ai_sdk::{UIMessage, extract_prompt_and_history}; [INFO] [stdout] ... [INFO] [stdout] 78 | let response = agent.run_chat(prompt, history).await?; [INFO] [stdout] 79 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:76:62 [INFO] [stdout] | [INFO] [stdout] 72 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_71_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 76 | let (prompt, history) = extract_prompt_and_history(&messages)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 72 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_71_0() -> Result<(), Box> { [INFO] [stdout] 73 | use rig_ai_sdk::{UIMessage, extract_prompt_and_history}; [INFO] [stdout] ... [INFO] [stdout] 78 | let response = agent.run_chat(prompt, history).await?; [INFO] [stdout] 79 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 5 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] src/lib.rs - (line 114) [INFO] [stdout] src/lib.rs - (line 41) [INFO] [stdout] src/lib.rs - (line 59) [INFO] [stdout] src/lib.rs - (line 71) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 0 passed; 4 failed; 12 ignored; 0 measured; 0 filtered out; finished in 0.24s [INFO] [stdout] [INFO] [stdout] all doctests ran in 0.40s; merged doctests compilation took 0.16s [INFO] [stderr] error: doctest failed, to rerun pass `--doc` [INFO] running `Command { std: "docker" "inspect" "e49390f30f4c5a87daaf3ca454aacf37ea3cf0e71ca873ac3d9dec6aaacc6fb6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e49390f30f4c5a87daaf3ca454aacf37ea3cf0e71ca873ac3d9dec6aaacc6fb6", kill_on_drop: false }` [INFO] [stdout] e49390f30f4c5a87daaf3ca454aacf37ea3cf0e71ca873ac3d9dec6aaacc6fb6