1. 12 11月, 2015 2 次提交
    • S
      Clean up the prelude docs · a1b24768
      Steve Klabnik 提交于
      This mostly brings them in line with existing linking convention, but
      also has some minor re-wording.
      
      The text at the top has been re-focused, by starting out with what the
      prelude does, rather than starting from injecting std.
      
      Also, it now mentions that other preludes exist.
      
      Part of https://github.com/rust-lang/rust/issues/29369
      a1b24768
    • B
      Auto merge of #29763 - nikomatsakis:mir-29227, r=nikomatsakis · f1f5c04c
      bors 提交于
      The older algorithm was pretty inefficient for big matches. Fixes #29227. (On my computer, MIR construction on this test case goes from 9.9s to 0.025s.) Whereas before we had a loop like:
      
      - for all outcomes of the test we are performing
          - for all candidates
              - check whether candidate is relevant to outcome
      
      We now do:
      
      - for all candidates
          - determine which outcomes the candidate is relevant to
      
      Since the number of outcomes in this case is proportional to the number of candidates, the original algorithm turned out to be O(n^2), and the newer one is just O(n).
      
      This PR also does some minor speedups by eagerly mirroring all patterns, so that we can just pass around `&Pattern<'tcx>`, which makes cloning cheaper. We could probably go a bit further in this direction.
      
      r? @Aatch
      f1f5c04c
  2. 11 11月, 2015 22 次提交
  3. 10 11月, 2015 16 次提交