-
Notifications
You must be signed in to change notification settings - Fork 537
Moved grouped expressions to its own page #261
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
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.
Thanks for this. Just a couple of style things.
src/expressions/grouped-expr.md
Outdated
expression. Parentheses can be used to explicitly specify evaluation order | ||
within an expression. | ||
|
||
This operator cannot be overloaded. |
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.
Yes, please remove this.
src/expressions.md
Outdated
@@ -247,6 +247,7 @@ Many of the following operators and expressions can also be overloaded for | |||
other types using traits in `std::ops` or `std::cmp`. These traits also | |||
exist in `core::ops` and `core::cmp` with the same names. | |||
|
|||
[grouped]: expressions/grouped-expr.html |
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.
Can this be put between field and literals so this list stays in alphabetical order?
src/expressions/grouped-expr.md
Outdated
# let a = A{f: || "The field f"}; | ||
# | ||
assert_eq!( a.f (), "The method f"); | ||
assert_eq!( (a.f)(), "The field f"); |
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.
Can you remove the first space inside the macro here?
assert_eq!( a.f (), "The method f");
assert_eq!((a.f)(), "The field f");
22d3b57
to
fd0c4c4
Compare
fd0c4c4
to
9ae7b6f
Compare
LGTM. I'm hesitant to merge because I'm not sure why @matthewjasper didn't earlier. |
@Havvy I didn't merge to give you a chance to give feedback if you wanted. |
and added another example of its use.
Should I remove this bit
This operator cannot be overloaded.
? It is not really an operator.