1. 01 10月, 2016 5 次提交
  2. 30 9月, 2016 7 次提交
    • B
      Auto merge of #36823 - durka:discriminant_value, r=nagisa · 95487305
      bors 提交于
      add wrapper for discriminant_value, take 2
      
      [This is #34785 reopened, since @bors apparently gave up on that thread.]
      
      add wrapper for discriminant_value intrinsic
      
      Implementation of [RFC 1696](https://github.com/rust-lang/rfcs/blob/master/text/1696-discriminant.md).
      
      Wraps the `discriminant_value` intrinsic under the name `std::mem::discriminant`. In order to avoid prematurely leaking information about the implementation of enums, the return value is an opaque type, generic over the enum type, which implements Copy, Clone, PartialEq, Eq, Hash, and Debug (notably not PartialOrd). There is currently no way to get the value out excepting printing the debug representation.
      
      The wrapper is safe and can be stabilized soon as per discussion in #24263.
      
      cc @aturon
      r? @nagisa
      95487305
    • B
      Auto merge of #36822 - Aatch:resolve-callee-expr, r=luqmana · 1d64acdc
      bors 提交于
      Resolve the callee type in check_call before autoderef
      
      If the callee type is an associated type, then it needs to be normalized
      before trying to deref it. This matches the behaviour of
      `check_method_call` for autoderef behaviour in calls.
      
      Fixes #36786
      1d64acdc
    • B
      Auto merge of #36819 - jseyfried:fix_ast_const_integer_ice, r=nrc · c88ed2a1
      bors 提交于
      Fix ICE on some macros in const integer positions (e.g. `[u8; m!()]`)
      
      Fixes #36816.
      r? @nrc
      c88ed2a1
    • B
      Auto merge of #36557 - sfackler:fix-hashdos-docs, r=alexcrichton · 7660bdf7
      bors 提交于
      Clean up hasher discussion on HashMap
      
      * We never want to make guarantees about protecting against attacks.
      * "True randomness" is not the right terminology to be using in this
          context.
      * There is significantly more nuance to the performance of SipHash than
          "somewhat slow".
      
      r? @steveklabnik
      
      Follow up to discussion on #35371
      7660bdf7
    • B
      Auto merge of #36430 - llogiq:cow_add, r=alexcrichton · c717cfa7
      bors 提交于
      impl Add<{str, Cow<str>}> for Cow<str>
      
      cc #35837
      c717cfa7
    • S
      Mention FNV · aaf32aa4
      Steven Fackler 提交于
      aaf32aa4
    • B
      Auto merge of #36377 - tormol:encode_utf, r=alexcrichton · 289f3a4c
      bors 提交于
      Change encode_utf{8,16}() to write to a buffer and panic if it's too small
      
      cc #27784
      
      Should the "A buffer that's too small" examples be removed and replaced by tests?
      289f3a4c
  3. 29 9月, 2016 28 次提交