Skip to content

feature(gen_blocks): cannot use the ? operator in a gen block that returns () #117486

Open
@kanashimia

Description

@kanashimia

As per gen_blocks RFC:

Even when ? is used within a gen block, the block must return a value of type unit or !. That is, it does not return a value of Some(..), Ok(..), or Continue(..) as other such blocks might.

But currently upon using ? an error occurs: cannot use the ? operator in a gen block that returns ()

To reproduce: https://godbolt.org/z/4fGT9EM8q

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-gen_blocks`gen {}` expressions that produce `Iterator`sT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions