Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Errors in https://docs.rs/async-std/latest/async_std/#examples ? #1071

Open
@alexpdp7

Description

@alexpdp7

I might be doing PEBCAK, but the second example in:

https://docs.rs/async-std/latest/async_std/#examples

, namely:

use async_std::prelude::*;#[async_std::main]async fn main() {    let a = async { 1u8 };    let b = async { 2u8 };    assert_eq!(a.join(b).await, (1u8, 2u8))}

results for me in:

warning: unused import: `async_std::prelude::*` --> src/main.rs:1:5  |1 | use async_std::prelude::*;  |     ^^^^^^^^^^^^^^^^^^^^^  |  = note: `#[warn(unused_imports)]` on by defaulterror[E0599]: no method named `join` found for `async` block `{async block@src/main.rs:5:13: 5:26}` in the current scope --> src/main.rs:7:18  |7 |     assert_eq!(a.join(b).await, (1u8, 2u8))  |                  ^^^^ method not found in `{async block@src/main.rs:5:13: 5:26}`For more information about this error, try `rustc --explain E0599`.warning: `foo` (bin "foo") generated 1 warningerror: could not compile `foo` (bin "foo") due to previous error; 1 warning emitted

, whereas the other two examples work OOB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp