Content-Length: 24162 | pFad | https://doc.rust-lang.org/std/string/../error/../string/../vec/../../../error_codes/./E0628.html

E0628 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0628

More than one parameter was used for a coroutine.

Erroneous code example:

#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

fn main() {
    let coroutine = #[coroutine] |a: i32, b: i32| {
        // error: too many parameters for a coroutine
        // Allowed only 0 or 1 parameter
        yield a;
    };
}

At present, it is not permitted to pass more than one explicit parameter for a coroutine.This can be fixed by using at most 1 parameter for the coroutine. For example, we might resolve the previous example by passing only one parameter.

#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

fn main() {
    let coroutine = #[coroutine] |a: i32| {
        yield a;
    };
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/string/../error/../string/../vec/../../../error_codes/./E0628.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy