1. 18 1月, 2017 6 次提交
    • B
      Auto merge of #38168 - estebank:help-E0034, r=nrc · c8af93f0
      bors 提交于
      E0034: provide disambiguated syntax for candidates
      
      For a given file
      
      ```rust
      trait A { fn foo(&self) {} }
      trait B : A { fn foo(&self) {} }
      
      fn bar<T: B>(a: &T) {
        a.foo()
      }
      ```
      
      provide the following output
      
      ```
      error[E0034]: multiple applicable items in scope
       --> file.rs:6:5
        |
      6 |   a.foo(1)
        |     ^^^ multiple `foo` found
        |
      note: candidate #1 is defined in the trait `A`
       --> file.rs:2:11
        |
      2 | trait A { fn foo(&self, a: usize) {} }
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
      help: to use it here write `A::foo(&a, 1)` instead
       --> file.rs:6:5
        |
      6 |   a.foo(1)
        |     ^^^
      note: candidate #2 is defined in the trait `B`
       --> file.rs:3:15
        |
      3 | trait B : A { fn foo(&self, a: usize) {} }
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      help: to use it here write `B::foo(&a, 1)` instead
       --> file.rs:6:5
        |
      6 |   a.foo(1)
        |     ^^^
      ```
      
      Fix #37767.
      c8af93f0
    • B
      Auto merge of #39019 - nikomatsakis:issue-38919, r=eddyb · be1daa4a
      bors 提交于
      only consider value items when searching for methods, not types
      
      Fixes #38919
      
      r? @EddyB
      be1daa4a
    • N
      tolerate `None` return from `get_line` · d82d4b66
      Niko Matsakis 提交于
      d82d4b66
    • N
      more complete error message · 2bade813
      Niko Matsakis 提交于
      2bade813
    • B
      Auto merge of #37972 - bluss:iter-find-is-on-a-roll, r=sfackler · c07a6ae7
      bors 提交于
      Improve the slice iterator's searching methods
      
      Improve all, any, find, position, rposition by explicitly unrolling the loop for the slice iterators.
      
      - Introduce a few extension methods and functions for raw pointers make the new code easy to express
      - Introduce helper methods `search_while, rsearch_while` that generalize all the searching methods
      
      LLVM doesn't unroll the loop in `.find()` by default (clang is the same), so performance benefits a lot from explicit unrolling here. An iterator method without conditional exits (like `.fold()`) does not need this on the other hand.
      
      One of the raw pointer extension methods is `fn post_inc(&mut self) -> Self` which is the rustic equivalent of “`ptr++`”, and it is a nice way to express the raw pointer loop (see commit 3).
      
      Specific development notes about `search_while`: I tried both computing an end pointer "rounded" to 4, as well as the `ptrdistance >= 4` loop condition, ptrdistance was better. I tried handling the last 0-3 elements unrolled or with a while loop, the loop was better.
      c07a6ae7
    • B
      Auto merge of #39109 - michaelwoerister:incr-comp-cache-cleanup, r=nikomatsakis · bd8e9b0c
      bors 提交于
      incr.comp.: Delete orphaned work-products.
      
      The new partitioning scheme uncovered a hole in our incr. comp. cache directory garbage collection. So far, we relied on unneeded work products being deleted during the initial cache invalidation phase. However, we the new scheme, we get object files/work products that only contain code from upstream crates. Sometimes this code is not needed anymore (because all callers have been removed from the source) but because nothing that actually influences the contents of these work products had changed, we never deleted them from disk.
      
      r? @nikomatsakis
      bd8e9b0c
  2. 17 1月, 2017 27 次提交
  3. 16 1月, 2017 7 次提交