1. 12 7月, 2015 1 次提交
  2. 11 7月, 2015 1 次提交
  3. 03 7月, 2015 1 次提交
    • A
      windows: Don't link rust_builtin · 83ee47b0
      Alex Crichton 提交于
      This library has no shims which are actually needed on Windows now, so translate
      that last easy one into Rust and then don't link it at all on Windows.
      83ee47b0
  4. 18 6月, 2015 4 次提交
  5. 16 6月, 2015 1 次提交
    • U
      test: Fix a bug in bench result formatting · 04315949
      Ulrik Sverdrup 提交于
      It would skip the middle part if it was 0, displaying a number a 1000
      times too small. The MB/s number next to it gave it away.
      
      Fixed it looks like this:
      
      ```
      test h ... bench:   1,000,129 ns/iter (+/- 4,730)
      ```
      04315949
  6. 11 6月, 2015 1 次提交
  7. 09 6月, 2015 1 次提交
    • U
      test: Display benchmark results with thousands separators · 2b50c157
      Ulrik Sverdrup 提交于
      Example display:
      
      ```
      running 9 tests
      test a ... bench:           0 ns/iter (+/- 0)
      test b ... bench:          52 ns/iter (+/- 0)
      test c ... bench:          88 ns/iter (+/- 0)
      test d ... bench:         618 ns/iter (+/- 111)
      test e ... bench:       5,933 ns/iter (+/- 87)
      test f ... bench:      59,280 ns/iter (+/- 1,052)
      test g ... bench:     588,672 ns/iter (+/- 3,381)
      test h ... bench:   5,894,227 ns/iter (+/- 303,489)
      test i ... bench:  59,112,382 ns/iter (+/- 1,500,110)
      ```
      
      Fixes #10953
      Fixes #26109
      2b50c157
  8. 08 6月, 2015 1 次提交
  9. 27 5月, 2015 1 次提交
  10. 16 5月, 2015 1 次提交
  11. 14 5月, 2015 1 次提交
    • A
      std: Redesign Duration, implementing RFC 1040 · 556e76bb
      Alex Crichton 提交于
      This commit is an implementation of [RFC 1040][rfc] which is a redesign of the
      currently-unstable `Duration` type. The API of the type has been scaled back to
      be more conservative and it also no longer supports negative durations.
      
      [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md
      
      The inner `duration` module of the `time` module has now been hidden (as
      `Duration` is reexported) and the feature name for this type has changed from
      `std_misc` to `duration`. All APIs accepting durations have also been audited to
      take a more flavorful feature name instead of `std_misc`.
      
      Closes #24874
      556e76bb
  12. 09 5月, 2015 1 次提交
  13. 04 5月, 2015 1 次提交
  14. 02 5月, 2015 1 次提交
    • H
      Run benchmarks once, as a test by default. · d73545ce
      Huon Wilson 提交于
      E.g. if `foo.rs` looks like
      
          #![feature(test)]
          extern crate test;
      
          #[bench]
          fn bar(b: &mut test::Bencher) {
              b.iter(|| {
                  1
              })
          }
      
          #[test]
          fn baz() {}
      
          #[bench]
          fn qux(b: &mut test::Bencher) {
              b.iter(|| {
                  panic!()
              })
          }
      
      Then
      
          $ rustc --test foo.rs
          $ ./foo
      
          running 3 tests
          test baz ... ok
          test qux ... FAILED
          test bar ... ok
      
          failures:
      
          ---- qux stdout ----
          	thread 'qux' panicked at 'explicit panic', bench.rs:17
      
          failures:
              qux
      
          test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured
      
          $ ./foo --bench ba
      
          running 2 tests
          test baz ... ignored
          test bar ... bench:        97 ns/iter (+/- 74)
      
          test result: ok. 0 passed; 0 failed; 1 ignored; 1 measured
      
      In particular, the two benchmark are being run as tests in the default
      mode.
      
      This helps for the main distribution, since benchmarks are only run with
      `PLEASE_BENCH=1`, which is rarely set (and never set on the test bots),
      and helps for code-coverage tools: benchmarks are run and so don't count
      as dead code.
      
      Fixes #15842.
      d73545ce
  15. 22 4月, 2015 1 次提交
    • A
      std: Remove deprecated/unstable num functionality · eeb94886
      Alex Crichton 提交于
      This commit removes all the old casting/generic traits from `std::num` that are
      no longer in use by the standard library. This additionally removes the old
      `strconv` module which has not seen much use in quite a long time. All generic
      functionality has been supplanted with traits in the `num` crate and the
      `strconv` module is supplanted with the [rust-strconv crate][rust-strconv].
      
      [rust-strconv]: https://github.com/lifthrasiir/rust-strconv
      
      This is a breaking change due to the removal of these deprecated crates, and the
      alternative crates are listed above.
      
      [breaking-change]
      eeb94886
  16. 21 4月, 2015 1 次提交
  17. 16 4月, 2015 1 次提交
  18. 15 4月, 2015 1 次提交
  19. 02 4月, 2015 3 次提交
  20. 01 4月, 2015 3 次提交
    • N
      c35c4682
    • A
      std: Clean out #[deprecated] APIs · d4a2c941
      Alex Crichton 提交于
      This commit cleans out a large amount of deprecated APIs from the standard
      library and some of the facade crates as well, updating all users in the
      compiler and in tests as it goes along.
      d4a2c941
    • A
      Stabilize `std::convert` and related code · 9fc51efe
      Aaron Turon 提交于
      * Marks `#[stable]` the contents of the `std::convert` module.
      
      * Added methods `PathBuf::as_path`, `OsString::as_os_str`,
        `String::as_str`, `Vec::{as_slice, as_mut_slice}`.
      
      * Deprecates `OsStr::from_str` in favor of a new, stable, and more
        general `OsStr::new`.
      
      * Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
        to_cstring}` for ergonomic FFI usage.
      
      [breaking-change]
      9fc51efe
  21. 30 3月, 2015 1 次提交
  22. 28 3月, 2015 2 次提交
  23. 27 3月, 2015 2 次提交
  24. 25 3月, 2015 1 次提交
    • N
      Add trivial cast lints. · 95602a75
      Nick Cameron 提交于
      This permits all coercions to be performed in casts, but adds lints to warn in those cases.
      
      Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference.
      
      [breaking change]
      
      * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed.
      * The unused casts lint has gone.
      * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are:
      - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_`
      - Casts do not influence inference of integer types. E.g., the following used to type check:
      
      ```
      let x = 42;
      let y = &x as *const u32;
      ```
      
      Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information:
      
      ```
      let x: u32 = 42;
      let y = &x as *const u32;
      ```
      95602a75
  25. 24 3月, 2015 2 次提交
    • A
      Add generic conversion traits · 8389253d
      Aaron Turon 提交于
      This commit:
      
      * Introduces `std::convert`, providing an implementation of
      RFC 529.
      
      * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all
      in favor of the corresponding generic conversion traits.
      
        Consequently, various IO APIs now take `AsRef<Path>` rather than
      `AsPath`, and so on. Since the types provided by `std` implement both
      traits, this should cause relatively little breakage.
      
      * Deprecates many `from_foo` constructors in favor of `from`.
      
      * Changes `PathBuf::new` to take no argument (creating an empty buffer,
        as per convention). The previous behavior is now available as
        `PathBuf::from`.
      
      * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait.
      
      Closes #22751
      Closes #14433
      
      [breaking-change]
      8389253d
    • B
      df290f12
  26. 20 3月, 2015 2 次提交
  27. 17 3月, 2015 1 次提交
  28. 15 3月, 2015 1 次提交
  29. 14 3月, 2015 1 次提交