1. 02 11月, 2014 6 次提交
    • M
      Update error messages from "vector" to "array" · 2c2c4553
      Mike Robinson 提交于
      2c2c4553
    • B
      auto merge of #17595 : danburkert/rust/tuple-index-deserialization, r=alexcrichton · 3327ecca
      bors 提交于
      Currently `Decoder` implementations are not provided the tuple arity as
      a parameter to `read_tuple`. This forces all encoder/decoder combos to
      serialize the arity along with the elements. Tuple-arity is always known
      statically at the decode site, because it is part of the type of the
      tuple, so it could instead be provided as an argument to `read_tuple`,
      as it is to `read_struct`.
      
      The upside to this is that serialized tuples could become smaller in
      encoder/decoder implementations which choose not to serialize type
      (arity) information. For example, @TyOverby's
      [binary-encode](https://github.com/TyOverby/binary-encode) format is
      currently forced to serialize the tuple-arity along with every tuple,
      despite the information being statically known at the decode site.
      
      A downside to this change is that the tuple-arity of serialized tuples
      can no longer be automatically checked during deserialization. However,
      for formats which do serialize the tuple-arity, either explicitly (rbml)
      or implicitly (json), this check can be added to the `read_tuple` method.
      
      The signature of `Deserialize::read_tuple` and
      `Deserialize::read_tuple_struct` are changed, and thus binary
      backwards-compatibility is broken. This change does *not* force
      serialization formats to change, and thus does not break decoding values
      serialized prior to this change.
      
      [breaking-change]
      3327ecca
    • B
      auto merge of #18474 : alexcrichton/rust/no-more-traits, r=aturon · 39f90aea
      bors 提交于
      As part of the collections reform RFC, this commit removes all collections
      traits in favor of inherent methods on collections themselves. All methods
      should continue to be available on all collections.
      
      This is a breaking change with all of the collections traits being removed and
      no longer being in the prelude. In order to update old code you should move the
      trait implementations to inherent implementations directly on the type itself.
      
      Note that some traits had default methods which will also need to be implemented
      to maintain backwards compatibility.
      
      [breaking-change]
      cc #18424
      39f90aea
    • A
      collections: Remove all collections traits · 21ac985a
      Alex Crichton 提交于
      As part of the collections reform RFC, this commit removes all collections
      traits in favor of inherent methods on collections themselves. All methods
      should continue to be available on all collections.
      
      This is a breaking change with all of the collections traits being removed and
      no longer being in the prelude. In order to update old code you should move the
      trait implementations to inherent implementations directly on the type itself.
      
      Note that some traits had default methods which will also need to be implemented
      to maintain backwards compatibility.
      
      [breaking-change]
      cc #18424
      21ac985a
    • D
      Tuple deserialization should not fail · 05f6bdae
      Dan Burkert 提交于
      05f6bdae
    • D
      libserialize: tuple-arity should be provided to `Decoder::read_tuple` · ca6b082c
      Dan Burkert 提交于
      Currently `Decoder` implementations are not provided the tuple arity as
      a parameter to `read_tuple`. This forces all encoder/decoder combos to
      serialize the arity along with the elements. Tuple-arity is always known
      statically at the decode site, because it is part of the type of the
      tuple, so it could instead be provided as an argument to `read_tuple`,
      as it is to `read_struct`.
      
      The upside to this is that serialized tuples could become smaller in
      encoder/decoder implementations which choose not to serialize type
      (arity) information. For example, @TyOverby's
      [binary-encode](https://github.com/TyOverby/binary-encode) format is
      currently forced to serialize the tuple-arity along with every tuple,
      despite the information being statically known at the decode site.
      
      A downside to this change is that the tuple-arity of serialized tuples
      can no longer be automatically checked during deserialization. However,
      for formats which do serialize the tuple-arity, either explicitly (rbml)
      or implicitly (json), this check can be added to the `read_tuple` method.
      
      The signature of `Deserialize::read_tuple` and
      `Deserialize::read_tuple_struct` are changed, and thus binary
      backwards-compatibility is broken. This change does *not* force
      serialization formats to change, and thus does not break decoding values
      serialized prior to this change.
      
      [breaking-change]
      ca6b082c
  2. 01 11月, 2014 14 次提交
    • B
      auto merge of #18457 : japaric/rust/tocstr, r=alexcrichton · 0547a407
      bors 提交于
      Methods that used to take `ToCStr` implementors by value, now take them by reference. In particular, this breaks some uses of `Command`:
      
      ``` rust
      Command::new("foo");  // Still works
      Command::new(path) -> Command::new(&path)
      cmd.arg(string) -> cmd.arg(&string) or cmd.arg(string.as_slice())
      ```
      
      [breaking-change]
      
      ---
      
      It may be sensible to remove `impl ToCstr for String` since:
      - We're getting `impl Deref<str> for String`, so `string.to_cstr()` would still work
      - `Command` methods would still be able to use `cmd.arg(string[..])` instead of `cmd.arg(&string)`.
      
      But, I'm leaving that up to the library stabilization process.
      
      r? @aturon 
      cc #16918 
      0547a407
    • B
      auto merge of #18422 : michaelwoerister/rust/windows-freeze-fix, r=alexcrichton · 51a25c7f
      bors 提交于
      On some Windows versions of GDB this is more stable than setting breakpoints via function names. This is also something I wanted to do for some time now because it makes the tests more consistent.
      
      @brson:
      These changes are in response to issue #17540. It works on my machine with the toolchain mentioned in the issue. In order to find out if the problem is really worked around, we also need to make the build bots use the newer GDB version again.
      51a25c7f
    • B
      auto merge of #18371 : nikomatsakis/rust/issue-18262, r=pcwalton · 1442235d
      bors 提交于
      Teach variance checker about the lifetime bounds that appear in trait object types.
      
      [breaking-change] This patch fixes a hole in the type system which resulted in lifetime parameters that were only used in trait objects not being checked. It's hard to characterize precisely the changes that might be needed to fix target code.
      
      cc #18262 (this fixes the test case by @jakub- but I am not sure if this is the same issue that @alexcrichton was reporting)
      
      r? @pnkfelix 
      
      Fixes #18205 
      1442235d
    • B
      auto merge of #18177 : nick29581/rust/ufcs2, r=nikomatsakis · 88b6e93d
      bors 提交于
      r?
      
      closes #18061
      88b6e93d
    • N
      Fix RustDoc bug · 060566f0
      Nick Cameron 提交于
      060566f0
    • N
      Rebasing and review changes · 2474d7d2
      Nick Cameron 提交于
      2474d7d2
    • N
      test · 318472be
      Nick Cameron 提交于
      318472be
    • N
      Cross crait inherant impls · 1397f990
      Nick Cameron 提交于
      1397f990
    • N
      Remove FnStyle from DefFn and DefStaticMethod · d416d16c
      Nick Cameron 提交于
      d416d16c
    • N
      Resolve methods called as functions and... · 4e7d86c0
      Nick Cameron 提交于
      ...defined in another crate.
      
      Fixes #18061
      4e7d86c0
    • N
    • M
      debuginfo: Enable some GDB tests on Windows. · e06c3382
      Michael Woerister 提交于
      e06c3382
    • M
      debuginfo: Make GDB tests use line breakpoints like done in LLDB tests. · 54a5a2b3
      Michael Woerister 提交于
      On some Windows versions of GDB this is more stable than setting breakpoints via function names.
      54a5a2b3
    • B
      auto merge of #18440 : japaric/rust/hash, r=alexcrichton · 5e834243
      bors 提交于
      - The signature of the `*_equiv` methods of `HashMap` and similar structures have changed, and now require one less level of indirection. Change your code from:
      
      ``` rust
      hashmap.find_equiv(&"Hello");
      hashmap.find_equiv(&&[0u8, 1, 2]);
      ```
      
      to:
      
      ``` rust
      hashmap.find_equiv("Hello");
      hashmap.find_equiv(&[0u8, 1, 2]);
      ```
      
      - The generic parameter `T` of the `Hasher::hash<T>` method have become `Sized?`. Downstream code must add `Sized?` to that method in their implementations. For example:
      
      ``` rust
      impl Hasher<FnvState> for FnvHasher {
          fn hash<T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ }
      }
      ```
      
      must be changed to:
      
      ``` rust
      impl Hasher<FnvState> for FnvHasher {
          fn hash<Sized? T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ }
          //      ^^^^^^
      }
      ```
      
      [breaking-change]
      
      ---
      
      After review I'll squash the commits and update the commit message with the above paragraph.
      
      r? @aturon 
      cc #16918
      5e834243
  3. 31 10月, 2014 20 次提交