File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2768,22 +2768,24 @@ meaning of the operators on standard types is given here.
27682768Like the [ arithmetic operators] ( #arithmetic-operators ) , bitwise operators are
27692769syntactic sugar for calls to methods of built-in traits. This means that
27702770bitwise operators can be overridden for user-defined types. The default
2771- meaning of the operators on standard types is given here.
2771+ meaning of the operators on standard types is given here. Bitwise ` & ` , ` | ` and
2772+ ` ^ ` applied to boolean arguments are equivalent to logical ` && ` , ` || ` and ` != `
2773+ evaluated in non-lazy fashion.
27722774
27732775* ` & `
2774- : And .
2776+ : Bitwise AND .
27752777 Calls the ` bitand ` method of the ` std::ops::BitAnd ` trait.
27762778* ` | `
2777- : Inclusive or .
2779+ : Bitwise inclusive OR .
27782780 Calls the ` bitor ` method of the ` std::ops::BitOr ` trait.
27792781* ` ^ `
2780- : Exclusive or .
2782+ : Bitwise exclusive OR .
27812783 Calls the ` bitxor ` method of the ` std::ops::BitXor ` trait.
27822784* ` << `
27832785 : Left shift.
27842786 Calls the ` shl ` method of the ` std::ops::Shl ` trait.
27852787* ` >> `
2786- : Right shift.
2788+ : Right shift (arithmetic) .
27872789 Calls the ` shr ` method of the ` std::ops::Shr ` trait.
27882790
27892791#### Lazy boolean operators
You can’t perform that action at this time.
0 commit comments