1. 22 10月, 2014 17 次提交
    • D
      Guide: Adapt range values to variable name · 88cf0b92
      Daniel Hofstetter 提交于
      88cf0b92
    • B
      auto merge of #18223 : nikomatsakis/rust/coherence-orphan-18222, r=pcwalton · d44ea720
      bors 提交于
      Adjust orphan rules to consider all input types, not just self type.
      
      Fixes #18222.
      
      r? @pcwalton 
      d44ea720
    • B
      auto merge of #18141 : phildawes/rust/master, r=brson · 7088c45e
      bors 提交于
      Hello! I noticed spans are wrong for the PatIdents of self args. (I use spans a lot in racer)
      7088c45e
    • B
      auto merge of #18213 : pcwalton/rust/pcg-default, r=aturon · c29a7520
      bors 提交于
      Enable parallel codegen (2 units) by default when --opt-level is 0 or 1.  This
      gives a minor speedup on large crates (~10%), with only a tiny slowdown (~2%)
      for small ones (which usually build in under a second regardless).  The current
      default (no parallelization) is used when the user requests optimization
      (--opt-level 2 or 3), and when the user has enabled LTO (which is incompatible
      with parallel codegen).
      
      This commit also changes the rust build system to use parallel codegen
      when appropriate.  This means codegen-units=4 for stage0 always, and
      also for stage1 and stage2 when configured with --disable-optimize.
      (Other settings use codegen-units=1 for stage1 and stage2, to get
      maximum performance for release binaries.)  The build system also sets
      codegen-units=1 for compiletest tests (compiletest does its own
      parallelization) and uses the same setting as stage2 for crate tests.
      
      r? @aturon
      c29a7520
    • N
      Adjust orphan rules to consider all input types, not just self type. · aeba2ccf
      Niko Matsakis 提交于
      Fixes #18222.
      aeba2ccf
    • B
      auto merge of #18121 :... · 3d2cf606
      bors 提交于
      auto merge of #18121 : nikomatsakis/rust/method-call-use-trait-matching-infrastructure-2, r=pcwalton
      
      Convert trait method dispatch to use new trait matching machinery.
      
      This fixes about 90% of #17918. What remains to be done is to make inherent dispatch work with conditional dispatch as well. I plan to do this in a future patch by generalizing the "method match" code slightly to work for inherent impls as well (the basic algorithm is precisely the same).
      
      Fixes #17178.
      
      This is a [breaking-change] for two reasons:
      
      1. The old code was a bit broken. I found various minor cases, particularly around operators, where the old code incorrectly matched, but an extra `*` or other change is now required. (See commit e8cef25 ("Correct case where the old version of method lookup...") for examples.)
      2. The old code didn't type check calls against the method signature from the *trait* but rather the *impl*. The two can be different in subtle ways. This makes the new method dispatch both more liberal and more conservative than the original. (See commit 8308332 ("The new method lookup mechanism typechecks...") for examples.)
      
      r? @pcwalton since he's been reviewing most of this series of changes
      f? @nick29581 for commit 39df55f ("Permit DST types to unify like other types")
      cc @aturon as this relates to library stabilization
      
      
      3d2cf606
    • S
      enable parallel codegen by default · c245c5bb
      Stuart Pernsteiner 提交于
      Enable parallel codegen (2 units) by default when --opt-level is 0 or 1.  This
      gives a minor speedup on large crates (~10%), with only a tiny slowdown (~2%)
      for small ones (which usually build in under a second regardless).  The current
      default (no parallelization) is used when the user requests optimization
      (--opt-level 2 or 3), and when the user has enabled LTO (which is incompatible
      with parallel codegen).
      
      This commit also changes the rust build system to use parallel codegen
      when appropriate.  This means codegen-units=4 for stage0 always, and
      also for stage1 and stage2 when configured with --disable-optimize.
      (Other settings use codegen-units=1 for stage1 and stage2, to get
      maximum performance for release binaries.)  The build system also sets
      codegen-units=1 for compiletest tests (compiletest does its own
      parallelization) and uses the same setting as stage2 for crate tests.
      c245c5bb
    • N
      Patch up broken error messages · b066d09b
      Niko Matsakis 提交于
      b066d09b
    • B
      auto merge of #18203 : mahkoh/rust/cstring, r=thestinger · 2130f222
      bors 提交于
      This is about 20x faster on my machine.
      2130f222
    • N
      Address nits by @pcwalton · 646ec7d9
      Niko Matsakis 提交于
      646ec7d9
    • N
      Coherence tests that seemed to be missing. · 53ede440
      Niko Matsakis 提交于
      53ede440
    • N
      Tests for method resolution in the face of various ambiguities or non-ambiguities. These · 450263de
      Niko Matsakis 提交于
      are mostly new tests though I also revamped (and renamed) some of the existing tests.
      450263de
    • N
    • N
    • N
      The new method lookup mechanism typechecks calls against the method type... · df714cfd
      Niko Matsakis 提交于
      The new method lookup mechanism typechecks calls against the method type declared in the trait, not in the impl. In some cases that results in tighter rules, and in some cases looser. Correct for that.
      df714cfd
    • N
      Correct case where the old version of method lookup was incorrectly matching, · 98e237a6
      Niko Matsakis 提交于
      as far as I can tell.
      98e237a6
    • N
      Change method lookup infrastructure to use the trait methods. Instead · dad2db7c
      Niko Matsakis 提交于
      of tracking individual candidates per impl, we just track one
      candidate for the extension trait itself, and let the trait resolution
      handle walking the individual impls and so forth. Also change the
      interface to report back a richer notion of error.
      dad2db7c
  2. 21 10月, 2014 18 次提交
  3. 20 10月, 2014 5 次提交