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 12 pull requests #78334

Merged
merged 57 commits into from
Oct 25, 2020
Merged

Rollup of 12 pull requests #78334

merged 57 commits into from
Oct 25, 2020

Commits on Oct 11, 2020

  1. revise Hermit's mutex interface to support the behaviour of StaticMutex

    #77147 simplifies things by splitting this Mutex type
    into two types matching the two use cases: StaticMutex and MovableMutex.
    To support the behavior of StaticMutex, we move part of the mutex
    implementation into libstd.
    stlankes committed Oct 11, 2020
    Configuration menu
    Copy the full SHA
    16d65d0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    98fcc3f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d560b50 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    986c1fc View commit details
    Browse the repository at this point in the history
  5. fix typos in new method

    stlankes committed Oct 11, 2020
    Configuration menu
    Copy the full SHA
    d6e955f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    530f575 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8d8a290 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2020

  1. Configuration menu
    Copy the full SHA
    33fd08b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    30c3dad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1741e5b View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2020

  1. Configuration menu
    Copy the full SHA
    bc6b2ac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77d9831 View commit details
    Browse the repository at this point in the history
  3. box mutex to get a movable mutex

    the commit avoid an alignement issue in Mutex implementation
    stlankes committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    bf268fe View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2020

  1. #[deny(unsafe_op_in_unsafe_fn)] in sys/cloudabi

    chansuke committed Oct 18, 2020
    Configuration menu
    Copy the full SHA
    d3467fe View commit details
    Browse the repository at this point in the history
  2. Add some tests

    Nadrieril committed Oct 18, 2020
    Configuration menu
    Copy the full SHA
    3b37d94 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb81110 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c3d0445 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    99852e0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3708c86 View commit details
    Browse the repository at this point in the history
  7. Fix comment

    Nadrieril committed Oct 18, 2020
    Configuration menu
    Copy the full SHA
    f504e9a View commit details
    Browse the repository at this point in the history
  8. Handle ranges of float consistently

    This deconfuses the comparison of floats, that currently mixed ranges
    and non-ranges.
    Nadrieril committed Oct 18, 2020
    Configuration menu
    Copy the full SHA
    aa41720 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d1a784e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    da0ba2f View commit details
    Browse the repository at this point in the history
  11. Add comment

    Nadrieril committed Oct 18, 2020
    Configuration menu
    Copy the full SHA
    c4ae6c2 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2020

  1. Throw core::panic!("message") as &str instead of String.

    This makes it consistent with std::panic!("message"), which also throws
    a &str, not a String.
    m-ou-se committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    2780e35 View commit details
    Browse the repository at this point in the history
  2. Fix ui test for updated core::panic behaviour.

    It now throws a &str instead of a String.
    m-ou-se committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    9890217 View commit details
    Browse the repository at this point in the history
  3. Accidentally fixed #78071

    Nadrieril committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    5bfd3e7 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2020

  1. Introduce a temporary for discriminant value in MatchBranchSimplifica…

    …tion
    
    The optimization introduces additional uses of the discriminant operand, but
    does not ensure that it is still valid to evaluate it or that it still
    evaluates to the same value.
    
    Evaluate it once at original position, and store the result in a new temporary.
    tmiasko committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    a4dc92b View commit details
    Browse the repository at this point in the history
  2. Add a test for #53708

    This issue was accidentally fixed recently, probably by #70743
    Nadrieril committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    3519411 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    faf8710 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2020

  1. Configuration menu
    Copy the full SHA
    4f7ffbf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7130127 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0a4d948 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    de76370 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de7da7f View commit details
    Browse the repository at this point in the history
  6. Retire rustc_dep_node_force.

    cjgillot committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    e853cc0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    57ba8ed View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2020

  1. change the order of type arguments on ControlFlow

    This allows ControlFlow<BreakType> which is much more ergonomic for
    common iterator combinator use cases.
    NoraCodes authored and scottmcm committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    84daccc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc23179 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ad140c View commit details
    Browse the repository at this point in the history
  4. review

    lcnr committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    47cb871 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b334eef View commit details
    Browse the repository at this point in the history
  6. review comments

    estebank committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    f71e9ed View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2020

  1. Configuration menu
    Copy the full SHA
    6533d01 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef09ed2 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of #75115 - chansuke:sys-cloudabi-unsafe, r=KodrAus

    `#[deny(unsafe_op_in_unsafe_fn)]` in sys/cloudabi
    
    Partial fix of #73904.
    
    This encloses unsafe operations in unsafe fn in sys/cloudabi.
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    01a38f0 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of #76614 - NoraCodes:nora/control_flow_enum, r=scottmcm

    change the order of type arguments on ControlFlow
    
    This allows ControlFlow<BreakType> which is much more ergonomic for common iterator combinator use cases.
    
    Addresses one component of #75744
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    a547055 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se

    revise Hermit's mutex interface to support the behaviour of StaticMutex
    
    #77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd.
    
    The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed.
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    e34263d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #77830 - cjgillot:remacro, r=oli-obk

    Simplify query proc-macros
    
    The query code generation is split between proc-macros and regular macros in `rustc_middle::ty::query`.
    
    This PR removes unused capabilities of the proc-macros, and tend to use regular macros for the logic.
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    4d72939 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of #77930 - estebank:ice-77919, r=eddyb

    Do not ICE with TraitPredicates containing [type error]
    
    Fix #77919.
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    7428de1 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #78069 - fusion-engineering-forks:core-const-panic-st…

    …r, r=RalfJung
    
    Fix const core::panic!(non_literal_str).
    
    Invocations of `core::panic!(x)` where `x` is not a string literal expand to `panic!("{}", x)`, which is not understood by the const panic logic right now. This adds `panic_str` as a lang item, and modifies the const eval implementation to hook into this item as well.
    
    This fixes the issue mentioned here: #51999 (comment)
    
    r? `@RalfJung`
    
    `@rustbot` modify labels: +A-const-eval
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    0a06d73 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #78072 - Nadrieril:cleanup-constant-matching, r=varkor

    Cleanup constant matching in exhaustiveness checking
    
    This supercedes #77390. I made the `Opaque` constructor work.
    I have opened two issues #78071 and #78057 from the discussion we had on the previous PR. They are not regressions nor directly related to the current PR so I thought we'd deal with them separately.
    
    I left a FIXME somewhere because I didn't know how to compare string constants for equality. There might even be some unicode things that need to happen there. In the meantime I preserved previous behavior.
    
    EDIT: I accidentally fixed #78071
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    e12e972 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #78119 - fusion-engineering-forks:panic-use-as-str, r…

    …=Amanieu
    
    Throw core::panic!("message") as &str instead of String.
    
    This makes `core::panic!("message")` consistent with `std::panic!("message")`, which throws a `&str` and not a `String`.
    
    This also makes any other panics from `core::panicking::panic` result in a `&str` rather than a `String`, which includes compiler-generated panics such as the panics generated for `mem::zeroed()`.
    
    ---
    
    Demonstration:
    
    ```rust
    use std::panic;
    use std::any::Any;
    
    fn main() {
        panic::set_hook(Box::new(|panic_info| check(panic_info.payload())));
    
        check(&*panic::catch_unwind(|| core::panic!("core")).unwrap_err());
        check(&*panic::catch_unwind(|| std::panic!("std")).unwrap_err());
    }
    
    fn check(msg: &(dyn Any + Send)) {
        if let Some(s) = msg.downcast_ref::<String>() {
            println!("Got a String: {:?}", s);
        } else if let Some(s) = msg.downcast_ref::<&str>() {
            println!("Got a &str: {:?}", s);
        }
    }
    ```
    
    Before:
    ```
    Got a String: "core"
    Got a String: "core"
    Got a &str: "std"
    Got a &str: "std"
    ```
    
    After:
    ```
    Got a &str: "core"
    Got a &str: "core"
    Got a &str: "std"
    Got a &str: "std"
    ```
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    e3808ed View commit details
    Browse the repository at this point in the history
  11. Rollup merge of #78191 - tmiasko:temp-match-branch-simplification, r=…

    …oli-obk
    
    Introduce a temporary for discriminant value in MatchBranchSimplification
    
    The optimization introduces additional uses of the discriminant operand, but
    does not ensure that it is still valid to evaluate it or that it still
    evaluates to the same value.
    
    Evaluate it once at original position, and store the result in a new temporary.
    
    Follow up on #78151. The optimization remains disabled by default.
    
    Closes #78239.
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    597b4c5 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of #78272 - lcnr:abstract-const-unused-node, r=oli-obk

    const_evaluatable_checked: deal with unused nodes + div
    
    r? @oli-obk
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    5ed8ac4 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of #78318 - bugadani:tyctx-impl, r=petrochenkov

    TyCtxt: generate single impl block with `slice_interners` macro
    
    Reduces the work needed to check overlapping impls a bit.
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    a8ff5a4 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of #78327 - petrochenkov:inconsist, r=Aaron1011

    resolve: Relax macro resolution consistency check to account for any errors
    
    The check was previously omitted only when ambiguity errors or `Res::Err` were encountered, but the "macro-expanded `extern crate` items cannot shadow..." error (at least) can cause same inconsistencies as well.
    
    Fixes #78325
    jonas-schievink authored Oct 24, 2020
    Configuration menu
    Copy the full SHA
    58ae889 View commit details
    Browse the repository at this point in the history