Skip to content

Playgrounds rejects valid Rust (due to input processing?) #485

Open
@thedataking

Description

@thedataking

This code is expected to work but generates a compiler error due to a comment:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=45b03c2e33ff3b6c20af40794c505c92

   Compiling playground v0.0.1 (/playground)
error: this file contains an un-closed delimiter
 --> src/main.rs:1:1854
  |
1 | pub fn main() {
    let reserved_names: [&str; 103] = [
        "as",
        "break",
        "const",
(snip)

If rust-playground tries to put all the code on a single line, that's likely the problem. Thanks for building and maintaining such a useful tool; much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe playground isn't doing what it was intended toquestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions