Skip to content

replace Neg example with something more evocative of negation - #35830

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthew-piziak:not-example
Aug 20, 2016
Merged

replace Neg example with something more evocative of negation#35830
bors merged 1 commit into
rust-lang:masterfrom
matthew-piziak:not-example

Conversation

@matthew-piziak

Copy link
Copy Markdown
Contributor

No description provided.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@matthew-piziak

Copy link
Copy Markdown
ContributorAuthor

r? @steveklabnik

Comment threadsrc/libcore/ops.rs
///
/// A trivial implementation of `Neg`. When `-Foo` happens, it ends up calling
/// `neg`, and therefore, `main` prints `Negating!`.
/// An implementation of `Neg` for `Sign`, which allows the use of `-` to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

comma might be incorrect here

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I don't believe so. It's a non-restrictive which clause.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Correction: the comma might be unnecessary, not strictly incorrect.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I like how relevant your avatar is for this PR, given that it's a cyclic set of invertible elements. :P

@matthew-piziakmatthew-piziakAug 19, 2016

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I stand by the necessity of this comma (Strunk & White II.3), but I certainly won't fight to the death over it. I'm happy to remove it if it truly feels awkward to read.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would put the comma here, but I also tend to use commas a lot more than most people.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no no, you have convinced me. not that you needed to 😄

@mrhota

Copy link
Copy Markdown
Contributor

These examples are far clearer. Thanks

@steveklabnik

Copy link
Copy Markdown
Contributor

@bors: r+ rollup

thanks!

@bors

bors commented Aug 19, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit c0eccb1 has been approved by steveklabnik

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 19, 2016
…klabnik
replace `Neg` example with something more evocative of negation
@sophiajtsophiajt mentioned this pull request Aug 19, 2016
@sophiajtsophiajt mentioned this pull request Aug 20, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 20, 2016
…klabnik
replace `Neg` example with something more evocative of negation
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 20, 2016
…klabnik
replace `Neg` example with something more evocative of negation
@sophiajtsophiajt mentioned this pull request Aug 20, 2016
bors added a commit that referenced this pull request Aug 20, 2016
@bors
bors merged commit c0eccb1 into rust-lang:masterAug 20, 2016
@matthew-piziak
matthew-piziak deleted the not-example branch August 23, 2016 15:13
Sign up for freeto 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.

6 participants

@matthew-piziak@rust-highfive@mrhota@steveklabnik@bors@alexcrichton