1. 16 5月, 2014 8 次提交
    • D
      use sched_yield on linux and freebsd · e043644c
      Daniel Micay 提交于
      pthread_yield is non-standard, while sched_yield is POSIX
      
      The Linux documentation recommends using the standard function. This is
      the only feature we're currently using that's present in glibc but not
      in musl.
      e043644c
    • A
      Register new snapshots · 82115391
      Alex Crichton 提交于
      82115391
    • A
      Make `from_bits` in `bitflags!` safe; add `from_bits_truncate` · 912a9675
      Aaron Turon 提交于
      Previously, the `from_bits` function in the `std::bitflags::bitflags`
      macro was marked as unsafe, as it did not check that the bits being
      converted actually corresponded to flags.
      
      This patch changes the function to check against the full set of
      possible flags and return an `Option` which is `None` if a non-flag bit
      is set. It also adds a `from_bits_truncate` function which simply zeros
      any bits not corresponding to a flag.
      
      This addresses the concern raised in https://github.com/mozilla/rust/pull/13897
      912a9675
    • K
      Make Vec.truncate() resilient against failure in Drop · d547de99
      Kevin Ballard 提交于
      If a vector element fails in Drop, Vec needs to make sure it doesn't try
      to re-drop any elements it already dropped.
      d547de99
    • C
      rustdoc: functions in ffi blocks are unsafe · 4bcc4d76
      Corey Richardson 提交于
      Fixes #14188
      4bcc4d76
    • B
      std: Modify TempDir to not fail on drop. Closes #12628 · ef788d51
      Brian Anderson 提交于
      After discussion with Alex, we think the proper policy is for dtors
      to not fail. This is consistent with C++. BufferedWriter already
      does this, so this patch modifies TempDir to not fail in the dtor,
      adding a `close` method for handling errors on destruction.
      ef788d51
    • A
      mk: Don't run benchmarks with `make check` · bfbd732d
      Alex Crichton 提交于
      The current suite of benchmarks for the standard distribution take a significant
      amount of time to run, but it's unclear whether we're gaining any benefit from
      running them. Some specific pain points:
      
      * No one is looking at the data generated by the benchmarks. We have no graphs
        or analysis of what's happening, so all the data is largely being cast into
        the void.
      
      * No benchmark has ever uncovered a bug, they have always run successfully.
      
      * Benchmarks not only take a significant amount of time to run, but also take a
        significant amount of time to compile. I don't think we should mitigate this
        for now because it's useful to ensure that they do indeed still compile.
      
      This commit disables --bench test runs by default as part of `make check`,
      flipping the NO_BENCH environment variable to a PLEASE_BENCH variable which will
      manually enable benchmarking. If and when a dedicated bot is set up for
      benchmarking, this flag can be enabled on that bot.
      bfbd732d
    • B
      auto merge of #13948 : huonw/rust/test-regex-filter, r=alexcrichton · ba5f5300
      bors 提交于
      This allows writing a regex to filter tests more precisely, rather than having to list long paths e.g.
      
      ```
      $ ./stdtest-x86_64-unknown-linux-gnu 'vec.*clone'
      
      running 2 tests
      test vec::tests::test_clone ... ok
      test vec::tests::test_clone_from ... ok
      
      test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured
      ```
      
      The regex change is fully backwards compatible, since test names are Rust
      identifiers + `:`, and hence not special regex characters.
      
      (See commits for details.)
      ba5f5300
  2. 15 5月, 2014 32 次提交