Skip to content

Parse error when typing lifetime bounds before trait bounds in a trait object #18242

@arielb1

Description

@arielb1

rustc does not parse lifetime bounds that aren't the last bound of a trait object:

fn f() -> Box<'static+std::fmt::Show> { unreachable!() }

Gives: error: expected type, found token BINOP(PLUS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions