Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting is thrown off by << #1061

Open
RalfJung opened this issue May 28, 2024 · 1 comment
Open

Syntax highlighting is thrown off by << #1061

RalfJung opened this issue May 28, 2024 · 1 comment
Labels
upstream Caused by a third-party component

Comments

@RalfJung
Copy link
Member

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?

@shepmaster
Copy link
Member

Looks like an upstream issue and someone has already proposed a PR: ajaxorg/ace#5572.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Caused by a third-party component
Projects
None yet
Development

No branches or pull requests

2 participants