-
Notifications
You must be signed in to change notification settings - Fork 195
Fix SEGV in transcribe_type when compiling libcore 1.29 #1514
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
Conversation
gcc/rust/ast/rust-ast.h
Outdated
| */ | ||
|
|
||
| bool is_single_fragment () const { return nodes.size () == 1; } | ||
| bool is_single_fragment (SingleASTNode::NodeType expected) const |
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.
Not sure about the name of this method. Its a pet nit of mine that I prefer to use overloading only on methods where they already take arguments. It feels like a new method to check if is_single_fragment and that single fragment is of a particular type.
How about is_single_fragment_of_kind (...)
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.
Ah, I see what you mean. I'll rename it. assert_single_fragment kinda serves the same purpose but it also crashes if the assertion fails, so it's a bit different from is_single_fragment
| } | ||
|
|
||
| bool is_single_fragment_kind (SingleASTNode::NodeType kind) const | ||
| void assert_single_fragment (SingleASTNode::NodeType expected) const |
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.
ah ok so it gets renamed here anyway :)
philberty
left a comment
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.
LGTM
3564cef to
4423754
Compare
4423754 to
21cfed5
Compare
|
bors r+ |
|
Merge conflict. |
21cfed5 to
fcf6fea
Compare
|
bors retry |
|
Build succeeded: |
Needs #1513, Skip reviewing the first commit