1. 24 2月, 2014 1 次提交
  2. 23 2月, 2014 18 次提交
    • H
      Register snapshots. · 5444da54
      Huon Wilson 提交于
      5444da54
    • B
      auto merge of #12311 : brson/rust/unstable, r=alexcrichton · 551da061
      bors 提交于
      With the stability attributes we can put public-but unstable modules next to others, so this moves `intrinsics` and `raw` out of the `unstable` module (and marks both as `#[experimental]`).
      551da061
    • B
      std: Move unstable::stack to rt::stack · db111846
      Brian Anderson 提交于
      db111846
    • B
      std: Remove unstable::lang · 96b299e1
      Brian Anderson 提交于
      Put the lonely lang items here closer to the code they are calling.
      96b299e1
    • B
      std: Move raw to std::raw · 3e57808a
      Brian Anderson 提交于
      Issue #1457
      3e57808a
    • B
      std: Move intrinsics to std::intrinsics. · 4d10bdc5
      Brian Anderson 提交于
      Issue #1457
      4d10bdc5
    • B
      auto merge of #12428 : alexcrichton/rust/move-hashmap, r=brson · c250c16f
      bors 提交于
      These two containers are indeed collections, so there place is in
      libcollections, not in libstd. There will always be a hash map as part of the
      standard distribution of Rust, but by moving it out of the standard library it
      makes libstd that much more portable to more platforms and environments.
      
      This conveniently also removes the stuttering of 'std::hashmap::HashMap',
      although 'collections::HashMap' is only one character shorter.
      c250c16f
    • A
      Move std::{trie, hashmap} to libcollections · 2a14e084
      Alex Crichton 提交于
      These two containers are indeed collections, so their place is in
      libcollections, not in libstd. There will always be a hash map as part of the
      standard distribution of Rust, but by moving it out of the standard library it
      makes libstd that much more portable to more platforms and environments.
      
      This conveniently also removes the stuttering of 'std::hashmap::HashMap',
      although 'collections::HashMap' is only one character shorter.
      2a14e084
    • B
      auto merge of #12451 : edwardw/rust/ident-2-name, r=cmr · edf351e9
      bors 提交于
      Closes #7743.
      edf351e9
    • B
      auto merge of #12450 : FlaPer87/rust/issue-10682, r=alexcrichton · 9b9e2f80
      bors 提交于
      Fixes #10682
      9b9e2f80
    • B
      auto merge of #12444 : thestinger/rust/arena, r=huonw · a0f0699d
      bors 提交于
      This prevents generating visit glue when using a TypedArena. The problem
      still exists for the untyped Arena.
      a0f0699d
    • B
      auto merge of #12448 : alexcrichton/rust/smaller-rust, r=brson · 4995a85f
      bors 提交于
      Two optimizations:
      
      1. Compress `foo.bc` in each rlib with `flate`. These are just taking up space and are only used with LTO, no need for LTO to be speedy.
      2. Stop install `librustc.rlib` and friends, this is a *huge* source of bloat. There's no need for us to install static libraries for these components.
      
      cc #12440
      4995a85f
    • B
      auto merge of #11863 : erickt/rust/hash, r=acrichto · 22d3669b
      bors 提交于
      This PR merges `IterBytes` and `Hash` into a trait that allows for generic non-stream-based hashing. It makes use of @EddyB's default type parameter support in order to have a similar usage to the old `Hash` framework.
      
      Fixes #8038.
      
      Todo:
      
      - [x] Better documentation
      - [ ] Benchmark
      - [ ] Parameterize `HashMap` on a `Hasher`.
      22d3669b
    • E
      std: fix the hash doctest · ca6d512e
      Erick Tryzelaar 提交于
      ca6d512e
    • B
      auto merge of #11603 : alexcrichton/rust/issue-11591, r=brson · 2ba0a8a0
      bors 提交于
      This prevents linker errors as found in #11591
      
      Closes #11591
      2ba0a8a0
    • A
      Force all lang items to be reachable · 351d0ffa
      Alex Crichton 提交于
      This prevents linker errors as found in #11591
      
      Closes #11591
      351d0ffa
    • B
      auto merge of #12366 :... · eb5ba4d2
      bors 提交于
      auto merge of #12366 : aepsil0n/rust/feature/unnecessary_parens_around_assigned_values, r=alexcrichton
      
      Fixes #12350.
      
      Parentheses around assignment statements such as
      
      ```rust
      let mut a = (0);
      a = (1);
      a += (2);
      ```
      
      are not necessary and therefore an unnecessary_parens warning is raised when
      statements like this occur.
      
      NOTE: In `let` declarations this does not work as intended. Is it possible that they do not count as assignment expressions (`ExprAssign`)? (edit: this is fixed by now)
      
      Furthermore, there are some cases that I fixed in the rest of the code, where parentheses could potentially enhance readability. Compare these lines:
      
      ```rust
      a = b == c;
      a = (b == c);
      ```
      
      Thus, after having worked on this I'm not entirely sure, whether we should go through with this patch or not. Probably a matter of debate. ;)
      eb5ba4d2
    • B
      auto merge of #12441 : kud1ing/rust/backticks, r=brson · 87e3b5fe
      bors 提交于
      Not all of those messages are covered by tests. I am not sure how to trigger them and where to put those tests.
      
      Also some message patterns in the existing tests are not complete.
      For example, i find `error: mismatched types: expected "i32" but found "char" (expected i32 but found char)` a bit repetitive, but as i can see there is no test covering that.
      87e3b5fe
  3. 22 2月, 2014 21 次提交
    • B
      auto merge of #12439 : cmr/rust/rustdoc-reset, r=thestinger · 52755b71
      bors 提交于
      rustdoc: web: don't reset the search bar
      52755b71
    • E
      Warn about unnecessary parentheses upon assignment · 9982de63
      Eduard Bopp 提交于
      Closes #12366.
      
      Parentheses around assignment statements such as
      
          let mut a = (0);
          a = (1);
          a += (2);
      
      are not necessary and therefore an unnecessary_parens warning is raised when
      statements like this occur.
      
      The warning mechanism was refactored along the way to allow for code reuse
      between the routines for checking expressions and statements.
      
      Code had to be adopted throughout the compiler and standard libraries to comply
      with this modification of the lint.
      9982de63
    • B
      auto merge of #12437 : alexcrichton/rust/travis-yml, r=brson · 51676b21
      bors 提交于
      Travis CI provides an easy-to-use continuous integration infrastructure for
      github repos to use. Travis will automatically test all PRs which are opened
      against the rust repository, informing PR owners of the test results.
      
      I believe that this will be a very convenient piece of infrastructure as we'll
      be able to reduce the load on bors quite a bit. In theory all PRs opened have
      had the full test suite run against them, but unfortunately this is rarely the
      case (I'm a prime suspect). Travis will be able to provide easy and relatively
      quick (~30min) feedback for PRs. By ensuring fewer failures on bors, we can
      hopefully feed more successful jobs to bors.
      
      Overall, I expect this to be very helpful for new contributors as well as
      regular contributors as it's another layer of tests being run which will
      hopefully catch things sooner. One of the most convenient parts about using
      Travis is that there's very little burden in terms of maintenance, and if things
      go wrong we can easily turn travis completely off.
      
      Note that this is *not* the metric by which a PR will be merged with. Using
      travis will purely be another source for running tests, we will continue to gate
      all PRs on bors.
      51676b21
    • B
      auto merge of #12433 : alexcrichton/rust/fix-some-config-things, r=brson · f764d477
      bors 提交于
      These are mostly centered around using an external LLVM (notably 3.5)
      f764d477
    • B
      auto merge of #12427 : alexcrichton/rust/snapshots, r=brson · c48babe5
      bors 提交于
      This contains the fix for #4252 so we can start using methods in destructors.
      c48babe5
    • B
      auto merge of #12462 : kballard/rust/restore-llvm-from-12407, r=brson · d22099ca
      bors 提交于
      PR #12407 was accidentally reverted by PR #12411. Restore the correct
      version of LLVM that PR #12407 introduced.
      d22099ca
    • K
      Restore LLVM to the correct revision · e61c7fd3
      Kevin Ballard 提交于
      PR #12407 was accidentally reverted by PR #12411. Restore the correct
      version of LLVM that PR #12407 introduced.
      e61c7fd3
    • B
      auto merge of #12422 : alexcrichton/rust/buffered-default, r=brson · 068781e5
      bors 提交于
      One of the most common ways to use the stdin stream is to read it line by line
      for a small program. In order to facilitate this common usage pattern, this
      commit changes the stdin() function to return a BufferedReader by default. A new
      `stdin_raw()` method was added to get access to the raw unbuffered stream.
      
      I have not changed the stdout or stderr methods because they are currently
      unable to flush in their destructor, but #12403 should have just fixed that.
      068781e5
    • D
      remove the TyDesc from TypedArena · 4687e1d6
      Daniel Micay 提交于
      This prevents generating visit glue when using a TypedArena. The problem
      still exists for the untyped Arena.
      4687e1d6
    • E
      std: rewrite Hash to make it more generic · d223dd1e
      Erick Tryzelaar 提交于
      This patch merges IterBytes and Hash traits, which clears up the
      confusion of using `#[deriving(IterBytes)]` to support hashing.
      Instead, it now is much easier to use the new `#[deriving(Hash)]`
      for making a type hashable with a stream hash.
      
      Furthermore, it supports custom non-stream-based hashers, such as
      if a value's hash was cached in a database.
      
      This does not yet replace the old IterBytes-hash with this new
      version.
      d223dd1e
    • B
      auto merge of #12421 : Hywan/rust/api_doc, r=alexcrichton · 698042de
      bors 提交于
      I was reading the code and saw this. Not the best contribution of my life ;-).
      698042de
    • E
      0135b521
    • E
      bb8721da
    • E
      std: minor whitespace cleanup · 87f936f1
      Erick Tryzelaar 提交于
      87f936f1
    • E
      extra: rename Uuid::to_bytes() to as_bytes() · 8b815104
      Erick Tryzelaar 提交于
      8b815104
    • B
      auto merge of #12411 : Arcterus/rust/time, r=alexcrichton · 56cf237e
      bors 提交于
      More work towards finishing #8784.
      56cf237e
    • B
      auto merge of #12382 : bjz/rust/fmt-int, r=alexcrichton · d2f73abf
      bors 提交于
      This is PR is the beginning of a complete rewrite and ultimate removal of the `std::num::strconv` module (see #6220), and the removal of the `ToStrRadix` trait in favour of using the `std::fmt` functionality directly. This should make for a cleaner API, encourage less allocation, and make the implementation more comprehensible .
      
      The `Formatter::{pad_integral, with_padding}` methods have also been refactored make things easier to understand.
      
      The formatting tests for integers have been moved out of `run-pass/ifmt.rs` in order to provide more immediate feedback when building using `make check-stage2-std NO_REBUILD=1`.
      
      Arbitrary radixes are now easier to use in format strings. For example:
      
      ~~~rust
      assert_eq!(format!("{:04}", radix(3, 2)), ~"0011");
      ~~~
      
      The benchmarks have been standardised between `std::num::strconv` and `std::num::fmt` to make it easier to compare the performance of the different implementations.
      
      ~~~
       type | radix | std::num::strconv      | std::num::fmt
      ======|=======|========================|======================
       int  | bin   | 1748 ns/iter (+/- 150) | 321 ns/iter (+/- 25)
       int  | oct   |  706 ns/iter (+/- 53)  | 179 ns/iter (+/- 22)
       int  | dec   |  640 ns/iter (+/- 59)  | 207 ns/iter (+/- 10)
       int  | hex   |  637 ns/iter (+/- 77)  | 205 ns/iter (+/- 19)
       int  | 36    |  446 ns/iter (+/- 30)  | 309 ns/iter (+/- 20)
      ------|-------|------------------------|----------------------
       uint | bin   | 1724 ns/iter (+/- 159) | 322 ns/iter (+/- 13)
       uint | oct   |  663 ns/iter (+/- 25)  | 175 ns/iter (+/- 7)
       uint | dec   |  613 ns/iter (+/- 30)  | 186 ns/iter (+/- 6)
       uint | hex   |  519 ns/iter (+/- 44)  | 207 ns/iter (+/- 20)
       uint | 36    |  418 ns/iter (+/- 16)  | 308 ns/iter (+/- 32)
      ~~~
      d2f73abf
    • B
      auto merge of #12362 : liigo/rust/update-rust-manual, r=alexcrichton · 87c7e154
      bors 提交于
      change `extern mod` to `extern crate`, `package id` to `crate id`, and some lines wrapping fix, etc.
      87c7e154
    • E
      Represent lifetimes as Names instead of Idents · 76073328
      Edward Wang 提交于
      Closes #7743.
      76073328
    • B
      auto merge of #12253 : pcwalton/rust/more-vec-ng, r=alexcrichton · 78d4bf85
      bors 提交于
      r? @brson
      78d4bf85
    • F
      Test nested `proc` can access outer owned data · 7d94de2b
      Flavio Percoco 提交于
      Fixes #10682
      7d94de2b