Skip to content

Syntax highlighting is thrown off by << #1061

Open
@RalfJung

Description

@RalfJung

Consider this code:

pub fn f() {
    g::<u32>();
}
pub fn g<T>() -> std::mem::MaybeUninit<[T; 1 << 2]> {
    std::mem::MaybeUninit::uninit()
}

fn main() {
    f();
}

On the playground, fn main does not get syntax highlighting:

image

Seems like the << in a type is throwing it off and then it can't parse the rest of the file any more, or so?

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamCaused by a third-party component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions