1. 04 7月, 2017 12 次提交
  2. 03 7月, 2017 4 次提交
  3. 02 7月, 2017 14 次提交
    • B
      Auto merge of #42938 - est31:col_number, r=eddyb · 06797113
      bors 提交于
      Output column number info when panicking
      
      Outputs the column number when panicking. Useful when you e.g. have code like `foo[i] = bar[k] + bar[l]` and you get a panic with index out of bounds, or when you have an expression like `a = b + c + d + e` and the addition overflows. Now you know which operation to blame!
      
      The format is `file:line:column`, just like for compiler errors. Example output with the patch:
      
      ```
      thread 'main' panicked at 'index out of bounds: the len is 5 but the index is 8', src/main.rs:3:8
      ```
      
      As some of the API between the compiler and the library landscape gets broken, this is a bit hackier than I'd originally wanted it to be.
      
      * `panic` and `panic_bounds_check` lang items got an additional column param, on stage0 I still have to use the previous version. After a SNAP this should be resolved.
      * For `#[derive(RustcDeserialze)]`, stage0 requires a fixed signature for `std::rt::begin_panic`, so we can't change it right away. What we need to do instead is to keep the signature, and add a `begin_panic_new` function that we use in later stages instead. After a SNAP we can change the `begin_panic` function and rely on it instead of `begin_panic_new`, and one SNAP later we can remove `begin_panic_new`.
      * Fortunately I didn't have to break anything about the panic hook API, I could easily extend it.
      
      Note that debuginfo remains unchanged, so RUST_BACKTRACE output won't contain any column info. See issue #42921 for discussion on including the column in debuginfo.
      06797113
    • E
    • B
      Auto merge of #43015 - arielb1:every-error-counts, r=eddyb · 2a992167
      bors 提交于
      report the total number of errors on compilation failure
      
      Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed.
      
      This changes the compiler driver API to handle errors more smoothly, therefore is a compiler-api-[breaking-change].
      
      Fixes #42793.
      
      r? @EddyB
      2a992167
    • A
      report the total number of errors on compilation failure · fb7ab9e4
      Ariel Ben-Yehuda 提交于
      Prior to this PR, when we aborted because a "critical pass" failed, we
      displayed the number of errors from that critical pass. While that's the
      number of errors that caused compilation to abort in *that place*,
      that's not what people really want to know. Instead, always report the
      total number of errors, and don't bother to track the number of errors
      from the last pass that failed.
      
      This changes the compiler driver API to handle errors more smoothly,
      and therefore is a compiler-api-[breaking-change].
      
      Fixes #42793.
      fb7ab9e4
    • E
      Style fix · 57f0514f
      est31 提交于
      57f0514f
    • E
      Documentation · 1561954e
      est31 提交于
      1561954e
    • E
      eb5fb21b
    • E
      Output line column info when panicking · da887074
      est31 提交于
      da887074
    • A
      Revert "Change error count messages" · 77f40223
      Ariel Ben-Yehuda 提交于
      This reverts commit 5558c64f.
      77f40223
    • S
      Fix tidy errors · bfbe4039
      Stjepan Glavina 提交于
      bfbe4039
    • S
      Delete deprecated & unstable range-specific `step_by` · dcd332ed
      Scott McMurray 提交于
      Replacement: 41439
      Deprecation: 42310 for 1.19
      Fixes 41477
      dcd332ed
    • B
      Auto merge of #43003 - milmazz:bootstrap-pep8, r=alexcrichton · c3a130cf
      bors 提交于
      bootstrap: Fix all the pep-8 issues reported by flake8
      
      This commit also adds a few missing docstrings.
      
      Today, after reading this [article](https://blog.rust-lang.org/2017/06/27/Increasing-Rusts-Reach.html), I downloaded this project and started building from source. In the meantime, I began to read the `bootstrap.py`, to know more about the building process, and I made a few changes, this is my first contribution to the project, hope you like it.
      
      BTW, I have a few doubts about the `bootstrap.py`, any guidance is more than welcome:
      
      * Where can I find the unit tests for this script? In case it doesn't exist yet, do you like to include some unit tests with pytest?
      * Some methods like `fix_executable`, `get_string`, and `exe_suffix` in the `RustBuild` class should be converted to a function because it doesn't use `self` anywhere. What do you think?
      c3a130cf
    • S
      Stabilize feature sort_unstable · 5350e223
      Stjepan Glavina 提交于
      5350e223
    • B
      Auto merge of #43002 - SergioBenitez:more-io-inner-stable, r=BurntSushi · a19693a5
      bors 提交于
      Stabilize 'more_io_inner_methods' feature.
      
      As in the title. Closes #41519.
      a19693a5
  4. 01 7月, 2017 10 次提交
    • B
      Auto merge of #42882 - stjepang:improve-sort-tests-and-benches, r=alexcrichton · 05b57976
      bors 提交于
      Improve tests and benchmarks for slice::sort and slice::sort_unstable
      
      This PR just hardens the tests and improves benchmarks.
      More specifically:
      
      1. Benchmarks don't generate vectors in `Bencher::iter` loops, but simply clone pregenerated vectors.
      2. Benchmark `*_strings` doesn't allocate Strings in `Bencher::iter` loops, but merely clones a `Vec<&str>`.
      3. Benchmarks use seeded `XorShiftRng` to be more consistent.
      4. Additional tests for `slice::sort` are added, which test sorting on slices with several ascending/descending runs. The implementation identifies such runs so it's a good idea to test that scenario a bit.
      5. More checks are added to `run-pass/vector-sort-panic-safe.rs`. Sort algorithms copy elements around a lot (merge sort uses an auxilliary buffer and pdqsort copies the pivot onto the stack before partitioning, then writes it back into the slice). If elements that are being sorted are internally mutable and comparison function mutates them, it is important to make sure that sort algorithms always use the latest "versions" of elements. New checks verify that this is true for both `slice::sort` and `slice::sort_unstable`.
      
      As a side note, all of those improvements were made as part of the parallel sorts PR in Rayon (nikomatsakis/rayon#379) and now I'm backporting them into libcore/libstd.
      
      r? @alexcrichton
      05b57976
    • M
      Simplify print arguments · 44c6781c
      Milton Mazzarri 提交于
      44c6781c
    • B
      Auto merge of #42991 - sfackler:unstable-rangeargument, r=alexcrichton · a5d34e1d
      bors 提交于
      Revert "Stabilize RangeArgument"
      
      This reverts commit 143206d5.
      
      From the discussion in #30877 it seems like this is premature.
      a5d34e1d
    • B
      Auto merge of #42977 - Keruspe:master, r=alexcrichton · 7a2c09b6
      bors 提交于
       rustbuild: set __CARGO_DEFAULT_LIB_METADATA to channel
      
      Also, update the cargo submodule to handle the new value.
      7a2c09b6
    • B
      Auto merge of #42971 - stepancheg:ir-demangle, r=nagisa · d41b791c
      bors 提交于
      When writing LLVM IR output demangled fn name in comments
      
      `--emit=llvm-ir` looks like this now:
      
      ```
      ; <alloc::vec::Vec<T> as core::ops::index::IndexMut<core::ops::range::RangeFull>>::index_mut
      ; Function Attrs: inlinehint uwtable
      define internal { i8*, i64 } @"_ZN106_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$core..ops..index..IndexMut$LT$core..ops..range..RangeFull$GT$$GT$9index_mut17h7f7b576609f30262E"(%"alloc::vec::Vec<u8>"* dereferenceable(24)) unnamed_addr #0 {
      start:
        ...
      ```
      
      cc https://github.com/integer32llc/rust-playground/issues/15
      d41b791c
    • M
      bootstrap: Fix some PEP8 issues · ebf24ad3
      Milton Mazzarri 提交于
      This commit also adds a few missing docstrings
      ebf24ad3
    • B
      Auto merge of #42896 - llogiq:clippy_compiletest, r=alexcrichton · 4a92ae25
      bors 提交于
      fixed some clippy warnings in compiletest
      
      This is mainly readability stuff. Whenever the `clone_ref` lint asked me to clone the dereferenced object, I removed the `.clone()` instead, relying on the fact that it has worked so far and the immutable borrow ensures that the value won't change.
      4a92ae25
    • S
      Stabilize 'more_io_inner_methods' feature. · d280b40b
      Sergio Benitez 提交于
      d280b40b
    • S
      When writing LLVM IR output demangled fn name in comments · b62bdaaf
      Stepan Koltsov 提交于
      `--emit=llvm-ir` looks like this now:
      
      ```
      ; <alloc::vec::Vec<T> as core::ops::index::IndexMut<core::ops::range::RangeFull>>::index_mut
      ; Function Attrs: inlinehint uwtable
      define internal { i8*, i64 } @"_ZN106_$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$core..ops..index..IndexMut$LT$core..ops..range..RangeFull$GT$$GT$9index_mut17h7f7b576609f30262E"(%"alloc::vec::Vec<u8>"* dereferenceable(24)) unnamed_addr #0 {
      start:
        ...
      ```
      
      cc https://github.com/integer32llc/rust-playground/issues/15
      b62bdaaf
    • B
      [libstd_unicode] Upgrade to Unicode 10.0.0 · a6994d7f
      Behnam Esfahbod 提交于
      a6994d7f