Skip to content

Parsing error on box keyword #1859

Open
@CohenArthur

Description

@CohenArthur

I tried this code:

fn foo(x: i32) -> Box<i32> {
    box x
}

I expected to see this happen: no parsing error, but an error about that syntax being experimental

Instead, this happened: unexpected token box

This is not an issue for the libcore 1.49 project, but we will need to eventually handle that syntax for liballoc and libstd 1.49. This requires parsing as well as proper handling later in the pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions