-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
This is not entirely serious, because I can't imagine this plausibly happening in real-world code (generated or otherwise), but in Nightly (Stable has a higher threshold):
fn main() {
r#[... repeat 2^16 times ...]#""#[... repeat 2^16 times ...]#;
}
fails to parse with:
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `#`
--> src/main.rs:3:65544
|
3 | r######...
|
This limit is not mentioned in the reference.
I think we should document the maximum number of #
s. We could also reduce the number permitted: 255 should be enough for anyone (#49993 (comment)).
Alternatively, we could ignore it as being a non-problem. Feel free just to close the issue 😄
oli-obk, scottmcm, solson, hanna-kruppe, Object905 and 2 moreiago-lito
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.