[INFO] fetching crate ev3dev-rs 0.3.1... [INFO] testing ev3dev-rs-0.3.1 against master#562dee4820c458d823175268e41601d4c060588a for pr-154210-1 [INFO] extracting crate ev3dev-rs 0.3.1 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate ev3dev-rs 0.3.1 [INFO] finished tweaking crates.io crate ev3dev-rs 0.3.1 [INFO] tweaked toml for crates.io crate ev3dev-rs 0.3.1 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ev3dev-rs 0.3.1 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 ev3dev-rs 0.3.1 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 futures-io v0.3.31 [INFO] [stderr] Downloaded quote v1.0.44 [INFO] [stderr] Downloaded az v1.3.0 [INFO] [stderr] Downloaded futures-lite v2.6.1 [INFO] [stderr] Downloaded bytemuck v1.24.0 [INFO] [stderr] Downloaded pin-project v1.1.10 [INFO] [stderr] Downloaded zerocopy-derive v0.8.33 [INFO] [stderr] Downloaded unicode-ident v1.0.22 [INFO] [stderr] Downloaded fixedbitset v0.5.7 [INFO] [stderr] Downloaded pin-project-internal v1.1.10 [INFO] [stderr] Downloaded futures-concurrency v7.7.1 [INFO] [stderr] Downloaded tokio-macros v2.6.0 [INFO] [stderr] Downloaded zerocopy v0.8.33 [INFO] [stderr] Downloaded fixed v1.30.0 [INFO] [stderr] Downloaded syn v2.0.114 [INFO] [stderr] Downloaded tokio v1.49.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] e95c5326f1f077b473eba49cf6bc6a36a34de3d0984ef47aa658606f27ea6a6f [INFO] running `Command { std: "docker" "start" "-a" "e95c5326f1f077b473eba49cf6bc6a36a34de3d0984ef47aa658606f27ea6a6f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e95c5326f1f077b473eba49cf6bc6a36a34de3d0984ef47aa658606f27ea6a6f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e95c5326f1f077b473eba49cf6bc6a36a34de3d0984ef47aa658606f27ea6a6f", kill_on_drop: false }` [INFO] [stdout] e95c5326f1f077b473eba49cf6bc6a36a34de3d0984ef47aa658606f27ea6a6f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 57966467d8cf1485fd2a9d7359de5fa2d2740b0836110c2ac0c795337e30a338 [INFO] running `Command { std: "docker" "start" "-a" "57966467d8cf1485fd2a9d7359de5fa2d2740b0836110c2ac0c795337e30a338", kill_on_drop: false }` [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling unicode-ident v1.0.22 [INFO] [stderr] Compiling zerocopy v0.8.33 [INFO] [stderr] Compiling pin-project-lite v0.2.16 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling futures-io v0.3.31 [INFO] [stderr] Compiling parking v2.2.1 [INFO] [stderr] Compiling cfg-if v1.0.4 [INFO] [stderr] Compiling futures-core v0.3.31 [INFO] [stderr] Compiling fixed v1.30.0 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling az v1.3.0 [INFO] [stderr] Compiling fixedbitset v0.5.7 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling bytemuck v1.24.0 [INFO] [stderr] Compiling scopeguard v1.2.0 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling futures-lite v2.6.1 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Compiling zerocopy-derive v0.8.33 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling tokio v1.49.0 [INFO] [stderr] Compiling pin-project v1.1.10 [INFO] [stderr] Compiling futures-concurrency v7.7.1 [INFO] [stderr] Compiling half v2.7.1 [INFO] [stderr] Compiling ev3dev-rs v0.3.1 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 25.19s [INFO] running `Command { std: "docker" "inspect" "57966467d8cf1485fd2a9d7359de5fa2d2740b0836110c2ac0c795337e30a338", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "57966467d8cf1485fd2a9d7359de5fa2d2740b0836110c2ac0c795337e30a338", kill_on_drop: false }` [INFO] [stdout] 57966467d8cf1485fd2a9d7359de5fa2d2740b0836110c2ac0c795337e30a338 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 9bda307931f7d7a393f27231df3291a876ae252a98bfef752f5f9455d9a5b7bf [INFO] running `Command { std: "docker" "start" "-a" "9bda307931f7d7a393f27231df3291a876ae252a98bfef752f5f9455d9a5b7bf", kill_on_drop: false }` [INFO] [stderr] Compiling ev3dev-rs v0.3.1 (/opt/rustwide/workdir) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.75s [INFO] running `Command { std: "docker" "inspect" "9bda307931f7d7a393f27231df3291a876ae252a98bfef752f5f9455d9a5b7bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9bda307931f7d7a393f27231df3291a876ae252a98bfef752f5f9455d9a5b7bf", kill_on_drop: false }` [INFO] [stdout] 9bda307931f7d7a393f27231df3291a876ae252a98bfef752f5f9455d9a5b7bf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 361cc66c9a4490d36ebf10974c4698eb835daa7b0e97817a1e2db24d04f6ffa0 [INFO] running `Command { std: "docker" "start" "-a" "361cc66c9a4490d36ebf10974c4698eb835daa7b0e97817a1e2db24d04f6ffa0", kill_on_drop: false }` [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.06s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/ev3dev_rs-b7001752ef7e0c88) [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] Doc-tests ev3dev_rs [INFO] [stdout] [INFO] [stdout] running 21 tests [INFO] [stdout] test src/robotics/drive_base.rs - robotics::drive_base::DriveBase (line 19) - compile ... FAILED [INFO] [stdout] test src/pupdevices/gyro_sensor.rs - pupdevices::gyro_sensor::GyroSensor (line 11) - compile ... FAILED [INFO] [stdout] test src/pupdevices/color_sensor.rs - pupdevices::color_sensor::ColorSensor::raw_rgb (line 69) - compile ... FAILED [INFO] [stdout] test src/pupdevices/touch_sensor.rs - pupdevices::touch_sensor::TouchSensor (line 11) - compile ... FAILED [INFO] [stdout] test src/pupdevices/motor.rs - pupdevices::motor::Motor::new (line 57) - compile ... FAILED [INFO] [stdout] test src/robotics/gyro_controller.rs - robotics::gyro_controller::GyroController (line 14) ... FAILED [INFO] [stdout] test src/pupdevices/gyro_sensor.rs - pupdevices::gyro_sensor::GyroSensor::heading_and_velocity (line 65) - compile ... FAILED [INFO] [stdout] test src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_1 (line 85) ... FAILED [INFO] [stdout] test src/tools.rs - tools::select (line 26) ... FAILED [INFO] [stdout] test src/pupdevices/ultrasonic_sensor.rs - pupdevices::ultrasonic_sensor::UltrasonicSensor (line 11) - compile ... FAILED [INFO] [stdout] test src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_4 (line 136) - compile ... FAILED [INFO] [stdout] test src/pupdevices/color_sensor.rs - pupdevices::color_sensor::ColorSensor (line 12) - compile ... FAILED [INFO] [stdout] test src/robotics/gyro_controller.rs - robotics::gyro_controller::GyroController<'a>::new (line 39) - compile ... FAILED [INFO] [stdout] test src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_2 (line 102) ... FAILED [INFO] [stdout] test src/lib.rs - (line 78) - compile ... ok [INFO] [stdout] test src/robotics/drive_base.rs - robotics::drive_base::DriveBase<'a>::with_gyro (line 116) - compile ... ok [INFO] [stdout] test src/robotics/drive_base.rs - robotics::drive_base::DriveBase<'a>::with_gyros (line 153) - compile ... ok [INFO] [stdout] test src/lib.rs - (line 42) - compile ... ok [INFO] [stdout] test src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_3 (line 119) - compile ... FAILED [INFO] [stdout] test src/tools.rs - tools::join (line 12) ... FAILED [INFO] [stdout] test src/lib.rs - (line 6) - compile ... ok [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/robotics/drive_base.rs - robotics::drive_base::DriveBase (line 19) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:25:69 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 25 | let left = Motor::new(MotorPort::OutA, Direction::CounterClockwise).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:26:70 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 26 | let right = Motor::new(MotorPort::OutD, Direction::CounterClockwise).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:29:56 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 29 | let drive = DriveBase::new(&left, &right, 62.4, 130.5).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:34:56 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 34 | let drive = DriveBase::new(&left, &right, 62.4, 130.5).await?.with_gyro(&gyro).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:34:80 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 34 | let drive = DriveBase::new(&left, &right, 62.4, 130.5).await?.with_gyro(&gyro).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 46 | drive.straight(500).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/drive_base.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 47 | drive.turn(90).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/robotics/drive_base.rs:32:44 [INFO] [stdout] | [INFO] [stdout] 20 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() { [INFO] [stdout] | -------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 32 | let gyro = GyroSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 20 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_drive_base_rs_19_0() -> Result<(), Box> { [INFO] [stdout] 21 | use ev3dev_rs::parameters::{Direction, MotorPort, SensorPort, Stop}; [INFO] [stdout] ... [INFO] [stdout] 47 | drive.turn(90).await?; [INFO] [stdout] 48 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 8 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/gyro_sensor.rs - pupdevices::gyro_sensor::GyroSensor (line 11) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:18:47 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 18 | println!("Heading: {}", gyro_sensor.heading().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:19:57 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 19 | println!("Velocity: {}", gyro_sensor.angular_velocity().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:20:41 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 20 | println!("Tilt: {}", gyro_sensor.tilt().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:21:59 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 21 | println!("Tilt Velocity: {}", gyro_sensor.tilt_velocity().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/pupdevices/gyro_sensor.rs:16:51 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 16 | let gyro_sensor = GyroSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 12 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_11_0() -> Result<(), Box> { [INFO] [stdout] 13 | use ev3dev_rs::pupdevices::GyroSensor; [INFO] [stdout] ... [INFO] [stdout] 21 | println!("Tilt Velocity: {}", gyro_sensor.tilt_velocity().await?); [INFO] [stdout] 22 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 5 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/color_sensor.rs - pupdevices::color_sensor::ColorSensor::raw_rgb (line 69) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `sensor` in this scope [INFO] [stdout] --> src/pupdevices/color_sensor.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | let (r, g, b) = sensor.raw_rgb().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/pupdevices/color_sensor.rs:70:34 [INFO] [stdout] | [INFO] [stdout] 69 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_69_0() { [INFO] [stdout] | ------------------------------------------------------ this is not `async` [INFO] [stdout] 70 | let (r, g, b) = sensor.raw_rgb().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/touch_sensor.rs - pupdevices::touch_sensor::TouchSensor (line 11) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/touch_sensor.rs:18:67 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_touch_sensor_rs_11_0() { [INFO] [stdout] | ------------------------------------------------------ this is not `async` [INFO] [stdout] ... [INFO] [stdout] 18 | println!("Is the sensor pressed? : {}", if touch_sensor.pressed().await? {"Yes"} else {"No"}); [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/pupdevices/touch_sensor.rs:16:53 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_touch_sensor_rs_11_0() { [INFO] [stdout] | ------------------------------------------------------ this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 16 | let touch_sensor = TouchSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 12 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_touch_sensor_rs_11_0() -> Result<(), Box> { [INFO] [stdout] 13 | use ev3dev_rs::pupdevices::TouchSensor; [INFO] [stdout] ... [INFO] [stdout] 18 | println!("Is the sensor pressed? : {}", if touch_sensor.pressed().await? {"Yes"} else {"No"}); [INFO] [stdout] 19 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/motor.rs - pupdevices::motor::Motor::new (line 57) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/motor.rs:63:15 [INFO] [stdout] | [INFO] [stdout] 58 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_motor_rs_57_0() { [INFO] [stdout] | ----------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 63 | motor.reset().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/motor.rs:64:28 [INFO] [stdout] | [INFO] [stdout] 58 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_motor_rs_57_0() { [INFO] [stdout] | ----------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 64 | motor.run_target(300, 360).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `reset` found for opaque type `impl Future>` in the current scope [INFO] [stdout] --> src/pupdevices/motor.rs:63:7 [INFO] [stdout] | [INFO] [stdout] 63 | motor.reset().await?; [INFO] [stdout] | ^^^^^ method not found in `impl Future>` [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `run_target` found for opaque type `impl Future>` in the current scope [INFO] [stdout] --> src/pupdevices/motor.rs:64:7 [INFO] [stdout] | [INFO] [stdout] 64 | motor.run_target(300, 360).await?; [INFO] [stdout] | ^^^^^^^^^^ method not found in `impl Future>` [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0599, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0599`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/robotics/gyro_controller.rs - robotics::gyro_controller::GyroController (line 14) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/gyro_controller.rs:23:60 [INFO] [stdout] | [INFO] [stdout] 15 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() { [INFO] [stdout] | ------------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 23 | let controller = GyroController::new(vec![&gyro1, &gyro2]).await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/gyro_controller.rs:25:36 [INFO] [stdout] | [INFO] [stdout] 15 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() { [INFO] [stdout] | ------------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 25 | let heading = controller.heading().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/gyro_controller.rs:26:54 [INFO] [stdout] | [INFO] [stdout] 15 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() { [INFO] [stdout] | ------------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 26 | let angular_velocity = controller.angular_velocity().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/robotics/gyro_controller.rs:20:45 [INFO] [stdout] | [INFO] [stdout] 15 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() { [INFO] [stdout] | ------------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 20 | let gyro1 = GyroSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 15 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() -> Result<(), Box> { [INFO] [stdout] 16 | use ev3dev_rs::robotics::GyroController; [INFO] [stdout] ... [INFO] [stdout] 29 | println!("Angular Velocity: {}", angular_velocity); [INFO] [stdout] 30 + 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/robotics/gyro_controller.rs:21:45 [INFO] [stdout] | [INFO] [stdout] 15 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() { [INFO] [stdout] | ------------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 21 | let gyro2 = GyroSensor::new(SensorPort::In2)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 15 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_14_0() -> Result<(), Box> { [INFO] [stdout] 16 | use ev3dev_rs::robotics::GyroController; [INFO] [stdout] ... [INFO] [stdout] 29 | println!("Angular Velocity: {}", angular_velocity); [INFO] [stdout] 30 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 5 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/gyro_sensor.rs - pupdevices::gyro_sensor::GyroSensor::heading_and_velocity (line 65) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `sensor` in this scope [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:66:27 [INFO] [stdout] | [INFO] [stdout] 66 | let (heading, velocity) = sensor.heading_and_velocity()?; [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `sensor` in this scope [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:67:21 [INFO] [stdout] | [INFO] [stdout] 67 | assert_eq!(heading, sensor.heading().await?); [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `sensor` in this scope [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | assert_eq!(velocity, sensor.angular_velocity().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/pupdevices/gyro_sensor.rs:67:38 [INFO] [stdout] | [INFO] [stdout] 65 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_65_0() { [INFO] [stdout] | ----------------------------------------------------- this is not `async` [INFO] [stdout] 66 | let (heading, velocity) = sensor.heading_and_velocity()?; [INFO] [stdout] 67 | assert_eq!(heading, sensor.heading().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/gyro_sensor.rs:68:48 [INFO] [stdout] | [INFO] [stdout] 65 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_gyro_sensor_rs_65_0() { [INFO] [stdout] | ----------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 68 | assert_eq!(velocity, sensor.angular_velocity().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 5 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_1 (line 85) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `infrared_sensor` in this scope [INFO] [stdout] --> src/pupdevices/infrared_sensor.rs:86:27 [INFO] [stdout] | [INFO] [stdout] 86 | let (heading, distance) = infrared_sensor.seek_channel_1().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/pupdevices/infrared_sensor.rs:86:60 [INFO] [stdout] | [INFO] [stdout] 85 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_infrared_sensor_rs_85_0() { [INFO] [stdout] | --------------------------------------------------------- this is not `async` [INFO] [stdout] 86 | let (heading, distance) = infrared_sensor.seek_channel_1().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/tools.rs - tools::select (line 26) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `drive` in this scope [INFO] [stdout] --> src/tools.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | select!(drive.straight(100), attachment_motor.run_until_stalled(-45))?; [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `attachment_motor` in this scope [INFO] [stdout] --> src/tools.rs:29:30 [INFO] [stdout] | [INFO] [stdout] 29 | select!(drive.straight(100), attachment_motor.run_until_stalled(-45))?; [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/tools.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 27 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_tools_rs_26_0() { [INFO] [stdout] | ------------------------------------ this is not `async` [INFO] [stdout] 28 | use ev3dev_rs::select; [INFO] [stdout] 29 | select!(drive.straight(100), attachment_motor.run_until_stalled(-45))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `select` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/ultrasonic_sensor.rs - pupdevices::ultrasonic_sensor::UltrasonicSensor (line 11) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/ultrasonic_sensor.rs:18:63 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_ultrasonic_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 18 | println!("Distance (in): {}", ultrasonic_sensor.distance_in().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/ultrasonic_sensor.rs:19:63 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_ultrasonic_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 19 | println!("Distance (cm): {}", ultrasonic_sensor.distance_cm().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/pupdevices/ultrasonic_sensor.rs:16:63 [INFO] [stdout] | [INFO] [stdout] 12 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_ultrasonic_sensor_rs_11_0() { [INFO] [stdout] | ----------------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 16 | let ultrasonic_sensor = UltrasonicSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 12 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_ultrasonic_sensor_rs_11_0() -> Result<(), Box> { [INFO] [stdout] 13 | use ev3dev_rs::pupdevices::UltrasonicSensor; [INFO] [stdout] ... [INFO] [stdout] 19 | println!("Distance (cm): {}", ultrasonic_sensor.distance_cm().await?); [INFO] [stdout] 20 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_4 (line 136) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `infrared_sensor` in this scope [INFO] [stdout] --> src/pupdevices/infrared_sensor.rs:137:27 [INFO] [stdout] | [INFO] [stdout] 137 | let (heading, distance) = infrared_sensor.seek_channel_4().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/pupdevices/infrared_sensor.rs:137:60 [INFO] [stdout] | [INFO] [stdout] 136 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_infrared_sensor_rs_136_0() { [INFO] [stdout] | ---------------------------------------------------------- this is not `async` [INFO] [stdout] 137 | let (heading, distance) = infrared_sensor.seek_channel_4().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/color_sensor.rs - pupdevices::color_sensor::ColorSensor (line 12) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/color_sensor.rs:19:69 [INFO] [stdout] | [INFO] [stdout] 13 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_12_0() { [INFO] [stdout] | ------------------------------------------------------ this is not `async` [INFO] [stdout] ... [INFO] [stdout] 19 | println!("Reflected light intensity: {}", color_sensor.reflection().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/color_sensor.rs:20:64 [INFO] [stdout] | [INFO] [stdout] 13 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_12_0() { [INFO] [stdout] | ------------------------------------------------------ this is not `async` [INFO] [stdout] ... [INFO] [stdout] 20 | println!("Ambient light intensity: {}", color_sensor.ambient().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/color_sensor.rs:21:52 [INFO] [stdout] | [INFO] [stdout] 13 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_12_0() { [INFO] [stdout] | ------------------------------------------------------ this is not `async` [INFO] [stdout] ... [INFO] [stdout] 21 | println!("Current color: {}", color_sensor.color().await?); [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/pupdevices/color_sensor.rs:23:40 [INFO] [stdout] | [INFO] [stdout] 13 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_12_0() { [INFO] [stdout] | ------------------------------------------------------ this is not `async` [INFO] [stdout] ... [INFO] [stdout] 23 | let (r, g, b) = color_sensor.raw_rgb().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/pupdevices/color_sensor.rs:17:53 [INFO] [stdout] | [INFO] [stdout] 13 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_12_0() { [INFO] [stdout] | ------------------------------------------------------ this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 17 | let color_sensor = ColorSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 13 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_color_sensor_rs_12_0() -> Result<(), Box> { [INFO] [stdout] 14 | use ev3dev_rs::pupdevices::ColorSensor; [INFO] [stdout] ... [INFO] [stdout] 26 | println!("blue: {}", b); [INFO] [stdout] 27 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 5 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/robotics/gyro_controller.rs - robotics::gyro_controller::GyroController<'a>::new (line 39) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/robotics/gyro_controller.rs:48:69 [INFO] [stdout] | [INFO] [stdout] 40 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_39_0() { [INFO] [stdout] | ------------------------------------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 48 | let controller = GyroController::new(vec![&left_gyro, &right_gyro]).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/robotics/gyro_controller.rs:45:49 [INFO] [stdout] | [INFO] [stdout] 40 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_39_0() { [INFO] [stdout] | ------------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 45 | let left_gyro = GyroSensor::new(SensorPort::In1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 40 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_39_0() -> Result<(), Box> { [INFO] [stdout] 41 | use ev3dev_rs::pupdevices::GyroSensor; [INFO] [stdout] ... [INFO] [stdout] 48 | let controller = GyroController::new(vec![&left_gyro, &right_gyro]).await?; [INFO] [stdout] 49 + 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/robotics/gyro_controller.rs:46:50 [INFO] [stdout] | [INFO] [stdout] 40 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_39_0() { [INFO] [stdout] | ------------------------------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 46 | let right_gyro = GyroSensor::new(SensorPort::In4)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 40 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_robotics_gyro_controller_rs_39_0() -> Result<(), Box> { [INFO] [stdout] 41 | use ev3dev_rs::pupdevices::GyroSensor; [INFO] [stdout] ... [INFO] [stdout] 48 | let controller = GyroController::new(vec![&left_gyro, &right_gyro]).await?; [INFO] [stdout] 49 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_2 (line 102) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `infrared_sensor` in this scope [INFO] [stdout] --> src/pupdevices/infrared_sensor.rs:103:27 [INFO] [stdout] | [INFO] [stdout] 103 | let (heading, distance) = infrared_sensor.seek_channel_2().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/pupdevices/infrared_sensor.rs:103:60 [INFO] [stdout] | [INFO] [stdout] 102 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_infrared_sensor_rs_102_0() { [INFO] [stdout] | ---------------------------------------------------------- this is not `async` [INFO] [stdout] 103 | let (heading, distance) = infrared_sensor.seek_channel_2().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_3 (line 119) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `infrared_sensor` in this scope [INFO] [stdout] --> src/pupdevices/infrared_sensor.rs:120:27 [INFO] [stdout] | [INFO] [stdout] 120 | let (heading, distance) = infrared_sensor.seek_channel_3().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/pupdevices/infrared_sensor.rs:120:60 [INFO] [stdout] | [INFO] [stdout] 119 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_pupdevices_infrared_sensor_rs_119_0() { [INFO] [stdout] | ---------------------------------------------------------- this is not `async` [INFO] [stdout] 120 | let (heading, distance) = infrared_sensor.seek_channel_3().await?; [INFO] [stdout] | ^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/tools.rs - tools::join (line 12) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `drive` in this scope [INFO] [stdout] --> src/tools.rs:15:7 [INFO] [stdout] | [INFO] [stdout] 15 | join!(drive.straight(100), attachment_motor.run_until_stalled(-45))?; [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `attachment_motor` in this scope [INFO] [stdout] --> src/tools.rs:15:28 [INFO] [stdout] | [INFO] [stdout] 15 | join!(drive.straight(100), attachment_motor.run_until_stalled(-45))?; [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/tools.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 13 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_tools_rs_12_0() { [INFO] [stdout] | ------------------------------------ this is not `async` [INFO] [stdout] 14 | use ev3dev_rs::join; [INFO] [stdout] 15 | join!(drive.straight(100), attachment_motor.run_until_stalled(-45))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::try_join` which comes from the expansion of the macro `join` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] src/pupdevices/color_sensor.rs - pupdevices::color_sensor::ColorSensor (line 12) [INFO] [stdout] src/pupdevices/color_sensor.rs - pupdevices::color_sensor::ColorSensor::raw_rgb (line 69) [INFO] [stdout] src/pupdevices/gyro_sensor.rs - pupdevices::gyro_sensor::GyroSensor (line 11) [INFO] [stdout] src/pupdevices/gyro_sensor.rs - pupdevices::gyro_sensor::GyroSensor::heading_and_velocity (line 65) [INFO] [stdout] src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_1 (line 85) [INFO] [stdout] src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_2 (line 102) [INFO] [stdout] src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_3 (line 119) [INFO] [stdout] src/pupdevices/infrared_sensor.rs - pupdevices::infrared_sensor::InfraredSensor::seek_channel_4 (line 136) [INFO] [stdout] src/pupdevices/motor.rs - pupdevices::motor::Motor::new (line 57) [INFO] [stdout] src/pupdevices/touch_sensor.rs - pupdevices::touch_sensor::TouchSensor (line 11) [INFO] [stdout] src/pupdevices/ultrasonic_sensor.rs - pupdevices::ultrasonic_sensor::UltrasonicSensor (line 11) [INFO] [stdout] src/robotics/drive_base.rs - robotics::drive_base::DriveBase (line 19) [INFO] [stdout] src/robotics/gyro_controller.rs - robotics::gyro_controller::GyroController (line 14) [INFO] [stdout] src/robotics/gyro_controller.rs - robotics::gyro_controller::GyroController<'a>::new (line 39) [INFO] [stdout] src/tools.rs - tools::join (line 12) [INFO] [stdout] src/tools.rs - tools::select (line 26) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 5 passed; 16 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.53s [INFO] [stdout] [INFO] [stdout] all doctests ran in 0.89s; merged doctests compilation took 0.35s [INFO] [stderr] error: doctest failed, to rerun pass `--doc` [INFO] running `Command { std: "docker" "inspect" "361cc66c9a4490d36ebf10974c4698eb835daa7b0e97817a1e2db24d04f6ffa0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "361cc66c9a4490d36ebf10974c4698eb835daa7b0e97817a1e2db24d04f6ffa0", kill_on_drop: false }` [INFO] [stdout] 361cc66c9a4490d36ebf10974c4698eb835daa7b0e97817a1e2db24d04f6ffa0