We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d5984e commit e47c971Copy full SHA for e47c971
src/test/run-pass/num-wrapping.rs
@@ -173,6 +173,15 @@ fn test_op_assigns() {
173
tmp.$op(Wrapping($rhs));
174
assert_eq!(black_box(tmp), Wrapping($ans));
175
}
176
+
177
+ // also test that a &Wrapping<T> right-hand side is possible
178
+ {
179
+ let mut tmp = Wrapping($initial);
180
+ tmp = black_box(tmp);
181
+ tmp.$op(&Wrapping($rhs));
182
+ assert_eq!(black_box(tmp), Wrapping($ans));
183
+ }
184
185
// FIXME(30524): Uncomment this test
186
/*
187
{
0 commit comments