Skip to content

Commit 65f51d0

Browse files
committed
Document feature flag assign_ops
1 parent f85629b commit 65f51d0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,16 +1203,19 @@ mod assign_ops {
12031203

12041204
macro_rules! impl_assign_op {
12051205
($trt:ident, $method:ident) => {
1206+
1207+
/// Perform an elementwise in place arithmetic operation between **self** and **other**,
1208+
///
1209+
/// If their shapes disagree, **other** is broadcast to the shape of **self**.
1210+
///
1211+
/// **Panics** if broadcasting isn't possible.
1212+
///
1213+
/// **Requires `feature = "assign_ops"`**
12061214
impl<'a, A, D, E> $trt<&'a Array<A, E>> for Array<A, D>
12071215
where A: Clone + $trt<A>,
12081216
D: Dimension,
12091217
E: Dimension,
12101218
{
1211-
/// Perform an elementwise in place arithmetic operation between **self** and **other**,
1212-
///
1213-
/// If their shapes disagree, **other** is broadcast to the shape of **self**.
1214-
///
1215-
/// **Panics** if broadcasting isn't possible.
12161219
fn $method(&mut self, other: &Array<A, E>) {
12171220
if self.shape() == other.shape() {
12181221
for (x, y) in self.iter_mut().zip(other.iter()) {

0 commit comments

Comments
 (0)