1. 30 4月, 2013 5 次提交
    • P
      b6277f81
    • P
      librustc: Remove `ptr::addr_of`. · b0522a49
      Patrick Walton 提交于
      b0522a49
    • T
      Revert "libcore: remove unnecessary deref" · 58791c2f
      Tim Chevalier 提交于
      This reverts commit 9860fe10.
      58791c2f
    • B
      auto merge of #6110 : bjz/rust/numeric-traits, r=pcwalton · dbcc3fe6
      bors 提交于
      As discussed on issue #4819, I have created four new traits: `Algebraic`, `Trigonometric`, `Exponential` and `Hyperbolic`, and moved the appropriate methods into them from `Real`.
      
      ~~~rust
      pub trait Algebraic {
          fn pow(&self, n: Self) -> Self;
          fn sqrt(&self) -> Self;
          fn rsqrt(&self) -> Self;
          fn cbrt(&self) -> Self;
          fn hypot(&self, other: Self) -> Self;
      }
      
      pub trait Trigonometric {
          fn sin(&self) -> Self;
          fn cos(&self) -> Self;
          fn tan(&self) -> Self;
          fn asin(&self) -> Self;
          fn acos(&self) -> Self;
          fn atan(&self) -> Self;
          fn atan2(&self, other: Self) -> Self;
      }
      
      pub trait Exponential {
          fn exp(&self) -> Self;
          fn exp2(&self) -> Self;
          fn expm1(&self) -> Self;
          fn log(&self) -> Self;
          fn log2(&self) -> Self;
          fn log10(&self) -> Self;
      }
      
      pub trait Hyperbolic: Exponential {
          fn sinh(&self) -> Self;
          fn cosh(&self) -> Self;
          fn tanh(&self) -> Self;
      }
      ~~~
      
      There was some discussion over whether we should shorten the names, for example `Trig` and `Exp`. No abbreviations have been agreed on yet, but this could be considered in the future.
      
      Additionally, `Integer::divisible_by` has been renamed to `Integer::is_multiple_of`.
      dbcc3fe6
    • B
      auto merge of #6099 : danluu/rust/xfail_clone, r=catamorphism · 76ec35ae
      bors 提交于
      One of the tests seems to have no current equivalent that's similar. Please let me know if that's incorrect, and I'll try fixing it instead of deleting it. I suppose a struct could be used instead of `any` and `match type`, but it seems like the original intent of the test was to exercise `match type`
      76ec35ae
  2. 29 4月, 2013 35 次提交