Auto merge of #25159 - inrustwetrust:wrapping_inline, r=alexcrichton

This was causing function calls to be emitted for bitwise complements, even with optimizations on.
Steps to reproduce:
```
$ cat wrapping.rs
fn main() {
    let a = std::num::Wrapping(std::env::args().len() as u32);
    let b = !a;
    println!("{}", b.0);
}
$ rustc -O wrapping.rs --emit=asm,link
$ grep Not wrapping.s
        callq   _ZN3num8wrapping23Wrapping$LT$u32$GT$.Not3not20hba4b266232e02b1dHkbE
```
This commit is contained in:
bors 2015-05-09 03:55:27 +00:00
commit 50aada70f4

View File

@ -123,6 +123,7 @@ fn mul(self, other: Wrapping<$t>) -> Wrapping<$t> {
impl Not for Wrapping<$t> {
type Output = Wrapping<$t>;
#[inline(always)]
fn not(self) -> Wrapping<$t> {
Wrapping(!self.0)
}