Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #68101

Merged
merged 20 commits into from
Jan 10, 2020
Merged

Rollup of 8 pull requests #68101

merged 20 commits into from
Jan 10, 2020

Commits on Dec 22, 2019

  1. Add Result::unwrap_infallible

    Implementation of
    rust-lang/rfcs#2799
    mzabaluev committed Dec 22, 2019
    Configuration menu
    Copy the full SHA
    a20013b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a99a21 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6f0672c View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2020

  1. Configuration menu
    Copy the full SHA
    2c5766f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c52718 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    51b7044 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    686d5f8 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2020

  1. Configuration menu
    Copy the full SHA
    8267807 View commit details
    Browse the repository at this point in the history
  2. rustbuild: Cleanup book generation

    The Cargo book can be generated the same way as the other books.
    ollie27 committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    870ca31 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2020

  1. Introduce #![feature(half_open_range_patterns)].

    This feature adds `X..`, `..X`, and `..=X` patterns.
    Centril committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    d5598aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8bd3d24 View commit details
    Browse the repository at this point in the history
  3. Allow specifying LLVM args in target specifications

    Jethro Beekman committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    afced94 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#66045 - mzabaluev:unwrap-infallible, r=dtolnay

    Add method Result::into_ok
    
    Implementation of rust-lang/rfcs#2799
    
    Tracking issue rust-lang#61695
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    2dbcf08 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#67258 - Centril:open-ended-ranges, r=oli-obk

    Introduce `X..`, `..X`, and `..=X` range patterns
    
    Tracking issue: rust-lang#67264
    Feature gate: `#![feature(half_open_range_patterns)]`
    
    ---------------------------
    
    In this PR, we introduce range-from (`X..`), range-to (`..X`), and range-to-inclusive (`..=X`) patterns.
    These correspond to the `RangeFrom`, `RangeTo`, and `RangeToInclusive` expression forms introduced with the same syntaxes. The correspondence is both syntactic and semantic (in the sense that e.g. a `X..` pattern matching on a scrutinee `s` holds exactly when `(X..).contains(&s)` holds).
    
    ---------------------------
    
    Noteworthy:
    
    - The compiler complexity added with this PR is around 10 lines (discounting new tests, which account for the large PR size).
    
    - `...X` is accepted syntactically with the same meaning as `..=X`. This is done primarily to simplify and unify the implementation & spec. If-and-when we decide to make `X...Y` a hard error on a new edition, we can do the same for `...X` patterns as well.
    
    - `X...` and `X..=` is rejected syntactically just like it is for the expression equivalents. We should perhaps make these into semantic restrictions (cc @petrochenkov).
    
    - In HAIR, these half-open ranges are represented by inserting the max/min values for the approprate types. That is, `X..` where `X: u8` would become `X..=u8::MAX` in HAIR (note the `..=` since `RangeFrom` includes the end).
    
    - Exhaustive integer / char matching does not (yet) allow for e.g. exhaustive matching on `0usize..` or `..5usize | 5..` (same idea for `isize`). This would be a substantially more invasive change, and could be added in some other PR.
    
    - The issues with slice pattern syntax has been resolved as we decided to use `..` to mean a "rest-pattern" and `[xs @ ..]` to bind the rest to a name in a slice pattern.
    
    - Like with rust-lang#35712, which provided `X..Y` range patterns, this is not yet backed up by an RFC. I'm providing this experimental implementation now to have something concrete to discuss. I would be happy to provide an RFC for this PR as well as for rust-lang#35712 to finalize and confirm the ideas with the larger community.
    
    Closes rust-lang/rfcs#947.
    
    ---------------------------
    
    r? @varkor cc @matthewjasper @oli-obk
    
    I would recommend reviewing this (in particular HAIR-lowering and pattern parsing changes) with whitespace changes ignored.
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    793b1be View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#68014 - estebank:unify-e0599, r=cramertj

    Unify output of "variant not found" errors
    
    Fix rust-lang#49566.
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    a491100 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#68019 - cuviper:in-tree-compiletest, r=Mark…

    …-Simulacrum
    
    Build compiletest with in-tree libtest
    
    This updates compiletest to build in `Mode::ToolStd`, using the locally-built crates for `std` and especially `test`. This way we're immune to unstable differences in the bootstrap compiler crates, whether that's a prior-release stage0 or a current release local rebuild. Fixes rust-lang#59264.
    
    As a minor cleanup, this also removes the unused `llvm_tools` flag.
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    a74c790 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#68039 - euclio:remove-strip-hidden, r=dtolnay

    remove explicit strip-hidden pass from compiler doc generation
    
    `strip-hidden` is now implied by `--document-private-items` with rust-lang#67875, so there's no need to specify it anymore.
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    93f0ba9 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#68050 - Centril:canon-error, r=Mark-Simulacrum

    Canonicalize rustc_error imports
    
    r? @Mark-Simulacrum
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    7ae0618 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#68059 - jethrogb:jb/target-llvm-args, r=ale…

    …xcrichton
    
    Allow specifying LLVM args in target specifications
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    1af7524 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#68075 - ollie27:rustbuild_books, r=Mark-Sim…

    …ulacrum
    
    rustbuild: Cleanup book generation
    
    The Cargo book can be generated the same way as the other books.
    JohnTitor authored Jan 10, 2020
    Configuration menu
    Copy the full SHA
    bcfb380 View commit details
    Browse the repository at this point in the history