Skip to content

Commit f6c2add

Browse files
authored
Rollup merge of #105522 - est31:remove_or_and_note, r=scottmcm
Remove wrong note for short circuiting operators They *are* representable by traits, even if the short-circuiting behaviour requires a different approach than the non-short-circuiting operators. For an example proposal, see the postponed [RFC 2722](rust-lang/rfcs#2722). As it is not accurate, remove most of the note.
2 parents 6d7e3df + f069e71 commit f6c2add

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/ops/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
//! should have some resemblance to multiplication (and share expected
1818
//! properties like associativity).
1919
//!
20-
//! Note that the `&&` and `||` operators short-circuit, i.e., they only
21-
//! evaluate their second operand if it contributes to the result. Since this
22-
//! behavior is not enforceable by traits, `&&` and `||` are not supported as
23-
//! overloadable operators.
20+
//! Note that the `&&` and `||` operators are currently not supported for
21+
//! overloading. Due to their short circuiting nature, they require a different
22+
//! design from traits for other operators like [`BitAnd`]. Designs for them are
23+
//! under discussion.
2424
//!
2525
//! Many of the operators take their operands by value. In non-generic
2626
//! contexts involving built-in types, this is usually not a problem.

0 commit comments

Comments
 (0)