-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix handling of parse errors when using include!()
.
#22054
Conversation
ded0ad0
to
2daf7ad
Compare
// include file for issue-21146.rs | ||
// not supposed to be tested alone | ||
|
||
parse_error |
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.
We have auxiliary directories (or something along those lines) for stuff like this.
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.
Didn't know that. Fixed, thanks.
Makes the compilation abort when a parse error is encountered while trying to parse an item in an included file. The previous behaviour was to stop processing the file when a token that can't start an item was encountered, without producing any error. Fixes rust-lang#21146.
2daf7ad
to
8f2ab66
Compare
Makes the compilation abort when a parse error is encountered while trying to parse an item in an included file. The previous behaviour was to stop processing the file when a token that can't start an item was encountered, without producing any error. Fixes #21146.
Perhaps the test should be placed in the newly created Or we can move it later as a rollup. Either works. |
Thank you so much <3 |
Makes the compilation abort when a parse error is encountered while
trying to parse an item in an included file. The previous behaviour was
to stop processing the file when a token that can't start an item was
encountered, without producing any error. Fixes #21146.