Skip to content

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

Merged
merged 2 commits into from
Mar 11, 2018

Conversation

brauliobz
Copy link
Contributor

and added another example of its use.

Should I remove this bit This operator cannot be overloaded.? It is not really an operator.

Copy link
Contributor

@matthewjasper matthewjasper left a 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.

expression. Parentheses can be used to explicitly specify evaluation order
within an expression.

This operator cannot be overloaded.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please remove this.

@@ -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
Copy link
Contributor

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?

# let a = A{f: || "The field f"};
#
assert_eq!( a.f (), "The method f");
assert_eq!( (a.f)(), "The field f");
Copy link
Contributor

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");

@brauliobz brauliobz force-pushed the grouped_expression branch from 22d3b57 to fd0c4c4 Compare March 10, 2018 14:09
@brauliobz brauliobz force-pushed the grouped_expression branch from fd0c4c4 to 9ae7b6f Compare March 10, 2018 14:09
@Havvy
Copy link
Contributor

Havvy commented Mar 11, 2018

LGTM. I'm hesitant to merge because I'm not sure why @matthewjasper didn't earlier.

@matthewjasper matthewjasper merged commit 63b80bc into rust-lang:master Mar 11, 2018
@matthewjasper
Copy link
Contributor

@Havvy I didn't merge to give you a chance to give feedback if you wanted.

@brauliobz brauliobz deleted the grouped_expression branch March 11, 2018 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants