1. 16 11月, 2014 23 次提交
  2. 15 11月, 2014 11 次提交
  3. 14 11月, 2014 6 次提交
    • B
      auto merge of #18893 : bkoropoff/rust/issue-18883, r=alexcrichton · 1bf06495
      bors 提交于
      This was a simple case of substitutions being applied inconsistently.  I haven't investigated why type parameters are actually showing up in the closure type here, but trans needs to handle them correctly in any case.
      1bf06495
    • B
      Improve examples for syntax::ext::deriving::encodable · 94169353
      Barosl Lee 提交于
      The examples in the documentation for syntax::ext::deriving::encodable
      are outdated, and do not work. To fix this, the following changes are
      applied:
      
      - emit_field() -> emit_struct_field()
      - read_field() -> read_struct_field()
      - Use Result to report errors
      - Add the mut keyword to Encoder/Decoder
      - Prefer Encodable::encode() to emit_uint
      94169353
    • B
      auto merge of #18891 : erickt/rust/deprecate-as-ref, r=alexcrichton · 4963afdc
      bors 提交于
      It seems odd that the `AsRefReader`/`AsRefWriter` have the single method `by_ref()`. This creates the new traits `ByRefReader`/`ByRefWriter` and deprecates the old traits.
      4963afdc
    • T
      serialize: Add ToJson impl for str · 0053fbb8
      Tom Jakubowski 提交于
      0053fbb8
    • B
      auto merge of #18840 : huonw/rust/tweaks, r=alexcrichton · bb2168c5
      bors 提交于
      Fix some old papercuts with diagnostics, e.g. tweaking spans, rewording messages. See individual commits.
      bb2168c5
    • J
      Rewrite std::sync::TaskPool to be load balancing and panic-resistant · 93c49426
      Jonathan Reem 提交于
      The previous implementation was very likely to cause panics during
      unwinding through this process:
      
      - child panics, drops its receiver
      - taskpool comes back around and sends another job over to that child
      - the child receiver has hung up, so the taskpool panics on send
      - during unwinding, the taskpool attempts to send a quit message to
        the child, causing a panic during unwinding
      - panic during unwinding causes a process abort
      
      This meant that TaskPool upgraded any child panic to a full process
      abort. This came up in Iron when it caused crashes in long-running
      servers.
      
      This implementation uses a single channel to communicate between
      spawned tasks and the TaskPool, which significantly reduces the complexity
      of the implementation and cuts down on allocation. The TaskPool uses
      the channel as a single-producer-multiple-consumer queue.
      
      Additionally, through the use of send_opt and recv_opt instead of
      send and recv, this TaskPool is robust on the face of child panics,
      both before, during, and after the TaskPool itself is dropped.
      
      Due to the TaskPool no longer using an `init_fn_factory`, this is a
      
      [breaking-change]
      
      otherwise, the API has not changed.
      
      If you used `init_fn_factory` in your code, and this change breaks for
      you, you can instead use an `AtomicUint` counter and a channel to
      move information into child tasks.
      93c49426