]> git.lizzy.rs Git - rust.git/commit
Auto merge of #37356 - cristicbz:wrapsum, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 4 Nov 2016 21:14:48 +0000 (14:14 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2016 21:14:48 +0000 (14:14 -0700)
commit713a360560ab70651d10f09c9949673fa5e42fcd
tree22ab79e011a9a40c74bd0d843f124c69d5a3be81
parent81601cd3a393d1cb8ca82eb1b2270d24c5d7724f
parentdf0e5a97fb326ade900567d80977f40b83aea565
Auto merge of #37356 - cristicbz:wrapsum, r=alexcrichton

Add impls for `&Wrapping`. Also `Sum`, `Product` impls for both `Wrapping` and `&Wrapping`.

There are two changes here (split into two commits):
- Ops for references to `&Wrapping`  (`Add`, `Sub`, `Mul` etc.) similar to the way they are implemented for primitives.
- Impls for `iter::{Sum,Product}` for `Wrapping`.

As far as I know `impl` stability attributes don't really matter so I didn't bother breaking up the macro for two different kinds of stability. Happy to change if it does matter.
src/libcore/iter/traits.rs
src/libcore/ops.rs