about summary refs log tree commit diff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2022-12-10 04:36:23 +0100
committerest31 <MTest31@outlook.com>2022-12-10 08:11:19 +0100
commitf069e7159f1c6532a4c011cc192ff45cc96e5cdc (patch)
tree2cdfb570a315702bfe591c886aabc5f6e99e8745
parent0d5573e6daf99a5b98ace3dfcc4be2eb64867169 (diff)
downloadrust-f069e7159f1c6532a4c011cc192ff45cc96e5cdc.tar.gz
rust-f069e7159f1c6532a4c011cc192ff45cc96e5cdc.zip
Correct 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.
As it is not accurate, reword the note.
-rw-r--r--library/core/src/ops/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/ops/mod.rs b/library/core/src/ops/mod.rs
index a5e5b13b336..eb2a92f4644 100644
--- a/library/core/src/ops/mod.rs
+++ b/library/core/src/ops/mod.rs
@@ -17,10 +17,10 @@
 //! should have some resemblance to multiplication (and share expected
 //! properties like associativity).
 //!
-//! Note that the `&&` and `||` operators short-circuit, i.e., they only
-//! evaluate their second operand if it contributes to the result. Since this
-//! behavior is not enforceable by traits, `&&` and `||` are not supported as
-//! overloadable operators.
+//! Note that the `&&` and `||` operators are currently not supported for
+//! overloading. Due to their short circuiting nature, they require a different
+//! design from traits for other operators like [`BitAnd`]. Designs for them are
+//! under discussion.
 //!
 //! Many of the operators take their operands by value. In non-generic
 //! contexts involving built-in types, this is usually not a problem.