1. 13 2月, 2017 9 次提交
  2. 12 2月, 2017 12 次提交
  3. 11 2月, 2017 19 次提交
    • G
      Add tested item in the rustdoc --test output · c951ed7f
      Guillaume Gomez 提交于
      c951ed7f
    • J
      Remove extra closing span element. · bd14c7f3
      Jimmy Cuadra 提交于
      bd14c7f3
    • J
      rustdoc: Only include a stability span if needed. · c603839d
      Jimmy Cuadra 提交于
      c603839d
    • B
      Auto merge of #39736 - frewsxcv:rollup, r=frewsxcv · bae454ed
      bors 提交于
      Rollup of 9 pull requests
      
      - Successful merges: #39174, #39660, #39676, #39692, #39701, #39710, #39721, #39724, #39725
      - Failed merges:
      bae454ed
    • C
      Rollup merge of #39725 - Aaronepower:master, r=steveklabnik · 56275f82
      Corey Farwell 提交于
      Updated nightly book with installing nightly instructions
      56275f82
    • C
      Rollup merge of #39724 - malbarbo:android, r=alexcrichton · 0e6b3709
      Corey Farwell 提交于
      Allow rustc data structures compile to android
      
      flock structure is defined in asm*/fcntl.h. This file on android is
      generated from the linux kernel source, so they are the same.
      0e6b3709
    • C
      Rollup merge of #39721 - whataloadofwhat:catch-unwind-bang, r=alexcrichton · 6866df66
      Corey Farwell 提交于
      Change std::panicking::try::Data into a union
      
      No longer potentially call `mem::uninitialized::<!>()`
      
      Fixes #39432
      6866df66
    • C
      Rollup merge of #39710 - brson:151notes, r=alexcrichton · 0fd89adc
      Corey Farwell 提交于
      Update 1.15.1 relnotes
      
      Matching what is on stable.
      0fd89adc
    • C
      Rollup merge of #39701 - sgrif:sg-vec-reserve-docs, r=alexcrichton · 15bec3dd
      Corey Farwell 提交于
      Explicitly mention that `Vec::reserve` is based on len not capacity
      
      I spent a good chunk of time tracking down a buffer overrun bug that
      resulted from me mistakenly thinking that `reserve` was based on the
      current capacity not the current length. It would be helpful if this
      were called out explicitly in the docs.
      15bec3dd
    • C
      Rollup merge of #39692 - oli-obk:patch-2, r=aturon · 92cf7aec
      Corey Farwell 提交于
      remove wrong packed struct test
      
      This UB was found by running the test under [Miri](https://github.com/solson/miri) which rejects these unsafe unaligned loads. 😄
      92cf7aec
    • C
      Rollup merge of #39676 - alexcrichton:fix-again, r=brson · 4269e520
      Corey Farwell 提交于
      Actually fix manifest generation
      
      The previous fix contained an error where `toml::encode` returned a runtime
      error, so this version just constructs a literal `toml::Value`.
      4269e520
    • C
      Rollup merge of #39660 - alexcrichton:shasum-dirs, r=brson · bf750890
      Corey Farwell 提交于
      Don't include directory names in shasums
      
      Right now we just run `shasum` on an absolute path but right now the shasum
      files only include filenames, so let's use `current_dir` and just the file name
      to only have the file name emitted.
      bf750890
    • C
      Rollup merge of #39174 - rspeer:iter-nth-doc-fix, r=alexcrichton · 17dcc514
      Corey Farwell 提交于
      Fix a misleading statement in `Iterator.nth()`
      
      The `Iterator.nth()` documentation says "Note that all preceding elements will be consumed". I assumed from that that the preceding elements would be the *only* ones that were consumed, but in fact the returned element is consumed as well.
      
      The way I read the documentation, I assumed that `nth(0)` would not discard anything (there are 0 preceding elements, and maybe it just peeks at the start of the iterator somehow), so I added a sentence clarifying that it does. I also rephrased it to avoid the stunted "i.e." phrasing.
      17dcc514
    • B
      Auto merge of #39642 - stjepang:specialize-slice-partialord, r=alexcrichton · f140a6c6
      bors 提交于
      Specialize `PartialOrd<A> for [A] where A: Ord`
      
      This way we can call `cmp` instead of `partial_cmp` in the loop, removing some burden of optimizing `Option`s away from the compiler.
      
      PR #39538 introduced a regression where sorting slices suddenly became slower, since `slice1.lt(slice2)` was much slower than `slice1.cmp(slice2) == Less`. This problem is now fixed.
      
      To verify, I benchmarked this simple program:
      ```rust
      fn main() {
          let mut v = (0..2_000_000).map(|x| x * x * x * 18913515181).map(|x| vec![x, x ^ 3137831591]).collect::<Vec<_>>();
          v.sort();
      }
      ```
      
      Before this PR, it would take 0.95 sec, and now it takes 0.58 sec.
      I also tried changing the `is_less` lambda to use `cmp` and `partial_cmp`. Now all three versions (`lt`, `cmp`, `partial_cmp`) are equally performant for sorting slices - all of them take 0.58 sec on the
      benchmark.
      
      Tangentially, as soon as we get `default impl`, it might be a good idea to implement a blanket default impl for `lt`, `gt`, `le`, `ge` in terms of `cmp` whenever possible. Today, those four functions by default are only implemented in terms of `partial_cmp`.
      
      r? @alexcrichton
      f140a6c6
    • B
      Auto merge of #39490 - RReverser:em-linker, r=alexcrichton · 064a0ee1
      bors 提交于
      Add Emscripten-specific linker
      
      Emscripten claims to accept most GNU linker options, but in fact most of `-Wl,...` are useless for it and instead it requires some additional special options which are easier to handle in a separate trait.
      
      Currently added:
       - `export_symbols`: works on executables as special Emscripten case since staticlibs/dylibs aren't compiled to JS, while exports are required to be accessible from JS.
      Fixes #39171.
       - `optimize` - translates Rust's optimization level to Emscripten optimization level (whether passed via `-C opt-level=...` or `-O...`).
      Fixes #36899.
       - `debuginfo` - translates debug info; Emscripten has 5 debug levels while Rust has 3, so chose to translate `-C debuginfo=1` to `-g3` (preserves whitespace, variable and function names for easy debugging).
      Fixes #36901.
       - `no_default_libraries` - tells Emscripten to exclude `memcpy` and co.
      
      TODO (in future PR): dynamic linking via `SIDE_MODULE` / `MAIN_MODULE` mechanism.
      064a0ee1
    • B
      Auto merge of #39438 - clarcharr:box_from, r=alexcrichton · 2425b227
      bors 提交于
      Conversions between slices and boxes
      
      This allows conversion for `Copy` slices, `str`, and `CStr` into their boxed counterparts.
      
      This also adds the method `CString::into_boxed_c_str`.
      
      I would like to add similar implementations for `OsStr` as well, but I have not figured out how.
      2425b227
    • W
      Change std::panicking::try::Data into a union · ca92c516
      whataloadofwhat 提交于
      No longer potentially call `mem::uninitialized::<!>()`
      
      Fixes #39432
      ca92c516
    • A
      Updated installing nightly instructions · 5c295110
      Aaron Power 提交于
      5c295110
    • M
      Allow rustc data structures compile to android · a8364aca
      Marco A L Barbosa 提交于
      flock structure is defined in asm*/fcntl.h. This file on android is
      generated from the linux kernel source, so they are the same.
      a8364aca