improve BitAnd trait documentation#35993
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 30, 2016
Merged
Conversation
Contributor
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
src/libcore/ops.rs
Outdated
Member
There was a problem hiding this comment.
Could you some comments here (at least to explain a bit about lhs and rhs, I think some people don't know what this is).
9769a7f to
a9e9928
Compare
This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground. simplified bitand expression add a comment explaining what "rhs" means
8a5f483 to
e2d9974
Compare
Member
|
@bors: r+ rollup |
Collaborator
|
📌 Commit e2d9974 has been approved by |
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this pull request
Aug 26, 2016
…=GuillaumeGomez improve `BitAnd` trait documentation This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground.
Collaborator
|
⌛ Testing commit e2d9974 with merge 01a010a... |
Collaborator
|
💔 Test failed - auto-mac-64-opt-rustbuild |
Contributor
|
@bors retry |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 29, 2016
…=GuillaumeGomez improve `BitAnd` trait documentation This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground.
bors
added a commit
that referenced
this pull request
Aug 29, 2016
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 30, 2016
…=GuillaumeGomez improve `BitAnd` trait documentation This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground.
bors
added a commit
that referenced
this pull request
Aug 30, 2016
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 30, 2016
…=GuillaumeGomez improve `BitAnd` trait documentation This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground.
bors
added a commit
that referenced
this pull request
Aug 30, 2016
matthew-piziak
added a commit
to matthew-piziak/rust
that referenced
this pull request
Aug 30, 2016
These are exactly equivalent to PR rust-lang#35809, with one caveat: I do not believe there is a non-bitwise binary "xor" operator in Rust, so here it's expressed as (a || b) && !(a && b). r? @GuillaumeGomez improved documentation a la PR rust-lang#35993
matthew-piziak
added a commit
to matthew-piziak/rust
that referenced
this pull request
Aug 30, 2016
This is the augmented-assignment version of PR rust-lang#35809. r? @GuillaumeGomez improved documentation a la PR rust-lang#35993
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is based on the discussion in PR #35927.
Add a module-level note that
&&and||are short-circuiting operators and not overloadable.Add a simple
Scalarexample that lifts the&operator to a trivial struct tuple.Make
BooleanVectora struct tuple.Derive
PartialEqforBooleanVectorinstead of implementing it.Adds a
fn mainwrapper so that the example can integrate with Rust Playground.