rust-lang / rust-lang/rust-playground
Playgrounds rejects valid Rust (due to input processing?)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 267
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 6
Description
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!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Rust Playground gist and compare the source sent to the compiler with the original formatting, especially around the comment that triggers the un-closed-delimiter error. Trace the playground's input-processing path to identify where valid Rust is altered; done means the linked example compiles successfully without the delimiter error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100