Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit da1283e

Browse files
committed
ices/99914.rs: fixed with errors
=== stdout === === stderr === error[E0728]: `await` is only allowed inside `async` functions and blocks --> /home/runner/work/glacier/glacier/ices/99914.rs:7:6 | 3 | fn foo() { | --- this is not `async` ... 7 | ).await; | ^^^^^^ only allowed inside `async` functions and blocks error[E0601]: `main` function not found in crate `99914` --> /home/runner/work/glacier/glacier/ices/99914.rs:10:31 | 10 | async fn serve_udp_tunnel() {} | ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/99914.rs` warning: unreachable statement --> /home/runner/work/glacier/glacier/ices/99914.rs:5:5 | 4 | let initial_exchange: Result<usize, Error> = todo!(); | ------- any code following this expression is unreachable 5 | / initial_exchange.and_then(|_| 6 | | serve_udp_tunnel() 7 | | ).await; | |____________^ unreachable statement | = note: `#[warn(unreachable_code)]` on by default error[E0308]: mismatched types --> /home/runner/work/glacier/glacier/ices/99914.rs:6:9 | 6 | serve_udp_tunnel() | ^^^^^^^^^^^^^^^^^^ expected enum `Result`, found opaque type | note: while checking the return type of the `async fn` --> /home/runner/work/glacier/glacier/ices/99914.rs:10:29 | 10 | async fn serve_udp_tunnel() {} | ^ checked the `Output` of this `async fn`, found opaque type = note: expected enum `Result<_, Error>` found opaque type `impl Future<Output = ()>` help: try wrapping the expression in `Ok` | 6 | Ok(serve_udp_tunnel()) | +++ + error[E0277]: `Result<_, Error>` is not a future --> /home/runner/work/glacier/glacier/ices/99914.rs:7:6 | 7 | ).await; | ^^^^^^ `Result<_, Error>` is not a future | = help: the trait `Future` is not implemented for `Result<_, Error>` = note: Result<_, Error> must be a future or must implement `IntoFuture` to be awaited = note: required for `Result<_, Error>` to implement `IntoFuture` help: remove the `.await` | 7 - ).await; 7 + ); | error: aborting due to 4 previous errors; 1 warning emitted Some errors have detailed explanations: E0277, E0308, E0601, E0728. For more information about an error, try `rustc --explain E0277`. ==============
1 parent 09a6dc5 commit da1283e

File tree

1 file changed

+0
-0
lines changed

1 file changed

+0
-0
lines changed
File renamed without changes.

0 commit comments

Comments
 (0)