-
Notifications
You must be signed in to change notification settings - Fork 925
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
[naga wgsl-in] Fill out error message for deep nesting. #5486
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -775,10 +775,10 @@ impl<'a> Error<'a> { | |
] | ||
}, | ||
Error::ExceededLimitForNestedBraces { span, limit } => ParseError { | ||
message: "brace nesting limit reached".into(), | ||
labels: vec![(span, "limit reached at this brace".into())], | ||
message: "Statements nested too deeply".into(), | ||
labels: vec![(span, "nesting limit reached at this brace".into())], | ||
notes: vec![ | ||
format!("nesting limit is currently set to {limit}"), | ||
format!("The maximum nesting depth of brace-enclosed statements in a function is {limit}."), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: This new diagnostic takes pains to note that it is related to statements, but that's not true, AFAIK. The limit current works based on opening braces in any parsing rule (i.e., incl. |
||
], | ||
}, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: The capitalized casing, for better or worse, is not consistent with other diagnostics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feedback also applies to the
notes
field.