Skip to content

error for too many trailing #s in raw string literals could be improved #60762

Closed
@fbstj

Description

@fbstj

for example (play)

let foo = r##"bar"###;

results in

error: expected one of `.`, `;`, `?`, or an operator, found `#`
 --> src/main.rs:2:25
  |
2 |     let foo = r##"bar"###;
  |                         ^ expected one of `.`, `;`, `?`, or an operator here

while too few has a much nicer error:

error: unterminated raw string
 --> src/main.rs:3:15
  |
3 |     let baz = r##"quxx"#;
  |               ^ unterminated raw string
  |
  = note: this raw string should be terminated with `"##`

This issue has been assigned to @rcoh via this comment.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions