1. 14 11月, 2015 5 次提交
  2. 13 11月, 2015 9 次提交
    • B
      Auto merge of #29811 - bluss:binary-heap-sift-less, r=gankro · ec8ae4b0
      bors 提交于
      BinaryHeap: Simplify sift down
      
      Sift down was doing all too much work: it can stop directly when the
      current element obeys the heap property in relation to its children.
      
      In the old code, sift down didn't compare the element to sift down at
      all, so it was maximally sifted down and relied on the sift up call to
      put it in the correct location.
      
      This should speed up heapify and .pop().
      
      Also rename Hole::removed() to Hole::element()
      ec8ae4b0
    • U
      BinaryHeap: Simplify sift down · 81fcdd4a
      Ulrik Sverdrup 提交于
      Sift down was doing all too much work: it can stop directly when the
      current element obeys the heap property in relation to its children.
      
      In the old code, sift down didn't compare the element to sift down at
      all, so it was maximally sifted down and relied on the sift up call to
      put it in the correct location.
      
      This should speed up heapify and .pop().
      
      Also rename Hole::removed() to Hole::element()
      81fcdd4a
    • B
      Auto merge of #29761 - eefriedman:rename-nopanic, r=sanxiyn · b12a3582
      bors 提交于
      Just `sed s/_nopanic//g`.  Hopefully makes libsyntax a bit more
      readable.
      b12a3582
    • B
      Auto merge of #29800 - Detegr:master, r=nikomatsakis · 82251354
      bors 提交于
      Fundamental attribute was missing a feature gate test.
      82251354
    • B
      Auto merge of #29675 - bluss:merge-sort-fastpath, r=huonw · 8a813e08
      bors 提交于
      sort: Fast path for already sorted data
      
      When merging two sorted blocks `left` and `right` if the last element in
      `left` is <= the first in `right`, the blocks are already in sorted order.
      
      Add this as an additional fast path by simply copying the whole left
      block into the output and advancing the left pointer. The right block is
      then treated the same way by the already present logic in the merge
      loop.
      
      Can reduce runtime of .sort() to less than 50% of the previous, if the data
      was already perfectly sorted. Sorted data with a few swaps are also
      sorted quicker than before. The overhead of one comparison per merge
      seems to be negligible.
      8a813e08
    • B
      Auto merge of #29807 - nrc:op_span, r=brson · d5fde83a
      bors 提交于
      cc @nagisa
      d5fde83a
    • N
      Fix a bad span for binops · 224c789e
      Nick Cameron 提交于
      224c789e
    • B
      Auto merge of #29780 - KyleMayes:quote-ext, r=nrc · 5a872880
      bors 提交于
      This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made.
      
      I've added the `quote_arg!`, `quote_block!`, `quote_path!`, and `quote_meta_item!` quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., `quote_struct_field!` or `quote_variant!`) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit.
      
      I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.
      5a872880
    • B
      Auto merge of #29712 - Toby-S:patch-1, r=steveklabnik · 15e7824f
      bors 提交于
      Adds `Example` sections to the rest of the integer methods.
      
      cc @steveklabnik
      15e7824f
  3. 12 11月, 2015 26 次提交