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 14 pull requests #81355

Merged
merged 46 commits into from
Jan 25, 2021
Merged

Rollup of 14 pull requests #81355

merged 46 commits into from
Jan 25, 2021

Commits on Aug 5, 2020

  1. Configuration menu
    Copy the full SHA
    39466bc View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2020

  1. Configuration menu
    Copy the full SHA
    573ec31 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2020

  1. Configuration menu
    Copy the full SHA
    517d462 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2020

  1. Replace magic numbers with existing constants

    Split long lines over 100 char line limit
    
    Fix tidy complaints
    Digital-Chaos committed Dec 11, 2020
    Configuration menu
    Copy the full SHA
    c387e29 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2020

  1. bump stabilization to 1.51.0

    KodrAus authored Dec 21, 2020
    Configuration menu
    Copy the full SHA
    bbf5001 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2021

  1. Expand assert!(expr, args..) to include $crate for hygiene on 2021.

    Before 2021, this was a breaking change, as std::panic and core::panic
    are different. In edition 2021 they will be identical, making it
    possible again to apply proper hygiene here.
    m-ou-se committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    a1c41e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8098ac1 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2021

  1. Fix sysroot option not being honored across rustc

    Change link_sanitizer_runtime() to check if the sanitizer library exists
    in the specified/session sysroot, and if it doesn't exist, use the
    default sysroot.
    rcvalle committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    7378676 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2021

  1. Remove unnecessary closure

    bugadani committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    3e9f27d View commit details
    Browse the repository at this point in the history
  2. No peeking

    bugadani committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    58a90de View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9988821 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d63b278 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ee639de View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa4f583 View commit details
    Browse the repository at this point in the history
  7. Fix formatting

    bugadani committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    f29b329 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2021

  1. Do not mark unit variants as used when in path pattern

    Record that we are processing a pattern so that code responsible for
    handling path resolution can correctly decide whether to mark it as
    used or not.
    tmiasko committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    99a1dea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    794880c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d118021 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b217fab View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3cd0b46 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    00e62fa View commit details
    Browse the repository at this point in the history
  7. Do not allow arbitrary mutable references in static mut, just keep …

    …with the existing exceptions
    oli-obk committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    14f39aa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cd09871 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    819b008 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1129e86 View commit details
    Browse the repository at this point in the history
  11. Add option to control doctest run directory

    This option will allow splitting the compile-time from the run-time
    directory of doctest invocations and is one step to solve
    rust-lang/cargo#8993 (comment)
    Swatinem committed Jan 23, 2021
    Configuration menu
    Copy the full SHA
    9b1d27d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    20a460e View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2021

  1. Replace version_check dependency with own version parsing code

    This gives compiler maintainers a better degree of control
    over how the version gets parsed and is a good way to ensure
    that there are no changes of behaviour in the future.
    
    Also, issue a warning if the version is invalid instead of erroring
    so that we stay forwards compatible with possible future changes
    of the versioning scheme.
    
    Last, this improves the present test a little.
    est31 committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    14aa12f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    351b2ac View commit details
    Browse the repository at this point in the history
  3. fmt

    CraftSpider committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    c37c421 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f8416fa View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a730970 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #75180 - KodrAus:feat/error-by-ref, r=m-ou-se

    Implement Error for &(impl Error)
    
    Opening this up just to see what it breaks. It's unfortunate that `&(impl Error)` doesn't actually implement `Error`. If this direct approach doesn't work out then I'll try something different, like an `Error::by_ref` method.
    
    **EDIT:** This is a super low-priority experiment so feel free to cancel it for more important crater runs! 🙂
    
    -----
    
    # Stabilization Report
    
    ## Why?
    
    We've been working for the last few years to try "fix" the `Error` trait, which is probably one of the most fundamental in the whole standard library. One of its issues is that we commonly expect you to work with abstract errors through `dyn Trait`, but references and smart pointers over `dyn Trait` don't actually implement the `Error` trait. If you have a `&dyn Error` or a `Box<dyn Error>` you simply can't pass it to a method that wants a `impl Error`.
    
    ## What does this do?
    
    This stabilizes the following trait impl:
    
    ```rust
    impl<'a, T: Error + ?Sized + 'static> Error for &'a T;
    ```
    
    This means that `&dyn Error` will now satisfy a `impl Error` bound.
    
    It doesn't do anything with `Box<dyn Error>` directly. We discussed how we could do `Box<dyn Error>` in the thread here (and elsewhere in the past), but it seems like we need something like lattice-based specialization or a sprinkling of snowflake compiler magic to make that work. Having said that, with this new impl you _can_ now get a `impl Error` from a `Box<dyn Error>`  by dereferencing it.
    
    ## What breaks?
    
    A crater run revealed a few crates broke with something like the following:
    
    ```rust
    // where e: &'short &'long dyn Error
    err.source()
    ```
    
    previously we'd auto-deref that `&'short &'long dyn Error` to return a `Option<&'long dyn Error>` from `source`, but now will call directly on `&'short impl Error`, so will return a `Option<&'short dyn Error>`. The fix is to manually deref:
    
    ```rust
    // where e: &'short &'long dyn Error
    (*err).source()
    ```
    
    In the recent Libs meeting we considered this acceptable breakage.
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    5a1f2ec View commit details
    Browse the repository at this point in the history
  7. Rollup merge of #78578 - oli-obk:const_mut_refs, r=RalfJung

    Permit mutable references in all const contexts
    
    fixes #71212
    
    cc `@rust-lang/wg-const-eval` `@christianpoveda`
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    d9c177f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #79174 - taiki-e:std-future, r=Mark-Simulacrum

    Make std::future a re-export of core::future
    
    After 1a764a7, there are no `std::future`-specific items (except for `cfg(bootstrap)` items removed in 93eed40). So, instead of defining `std` own module, we can re-export the `core::future` directly.
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    13b88c2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #79884 - Digital-Chaos:replace-magic, r=m-ou-se

    Replace magic numbers with existing constants
    
    Replaced magic numbers in `library/core/src/time.rs` with predefined constants.
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    3ed8a37 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #80855 - m-ou-se:assert-2021, r=petrochenkov

    Expand assert!(expr, args..) to include $crate for hygiene on 2021.
    
    This makes `assert!(expr, args..)` properly hygienic in Rust 2021.
    
    This is part of rust-lang/rfcs#3007, see #80162.
    
    Before edition 2021, this was a breaking change, as `std::panic` and `core::panic` are different. In edition 2021 they will be identical, making it possible to apply proper hygiene here.
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    e8ef15d View commit details
    Browse the repository at this point in the history
  11. Rollup merge of #80933 - rcvalle:fix-sysroot-option, r=nagisa

    Fix sysroot option not being honored across rustc
    
    Change link_sanitizer_runtime() to check if the sanitizer library exists in the specified/session sysroot, and if it doesn't exist, use the default sysroot. (See #79253.)
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    27abbc2 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of #81259 - est31:cfg_version, r=petrochenkov

    Replace version_check dependency with own version parsing code
    
    This gives compiler maintainers a better degree of control
    over how the version gets parsed and is a good way to ensure
    that there are no changes of behaviour in the future.
    
    Also, issue a warning if the version is invalid instead of erroring
    so that we stay forwards compatible with possible future changes
    of the versioning scheme.
    
    Last, this improves the present test a little.
    
    Fixes #79436
    
    r? `@petrochenkov`
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    22dc82f View commit details
    Browse the repository at this point in the history
  13. Rollup merge of #81264 - Swatinem:doctest-run-directory, r=jyn514

    Add unstable option to control doctest run directory
    
    This option will allow splitting the compile-time from the run-time
    directory of doctest invocations and is one step to solve
    rust-lang/cargo#8993 (comment)
    
    r? `@jyn514`
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    504d6de View commit details
    Browse the repository at this point in the history
  14. Rollup merge of #81279 - bugadani:iter, r=davidtwco

    Small refactor in typeck
    
     - `check_impl_items_against_trait` only queries and walks through associated items once
     - extracted function that reports errors
     - don't check specialization validity when trait item does not match
     - small additional cleanups
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    70be327 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of #81297 - bjorn3:no_extern_backend_optimization_level_…

    …query_provider, r=cjgillot
    
    Don't provide backend_optimization_level query for extern crates
    
    Fixes #71291
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    9089dd2 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of #81302 - LeSeulArtichaut:80777-trait-render, r=jyn514

    Fix rendering of stabilization version for trait implementors
    
    Rustdoc compares an item's stabilization version with its parent's to not render it if they are the same. Here, the implementor was compared with itself, resulting in the stabilization version never getting shown.
    
    This probably needs a test.
    
    Fixes #80777.
    r? `@jyn514`
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    ee4461a View commit details
    Browse the repository at this point in the history
  17. Rollup merge of #81310 - tmiasko:in-pattern, r=petrochenkov

    Do not mark unit variants as used when in path pattern
    
    Record that we are processing a pattern so that code responsible for
    handling path resolution can correctly decide whether to mark it as
    used or not.
    
    Closes #76788.
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    04ddf42 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of #81320 - CraftSpider:jsondoc-errors, r=jyn514

    Make bad shlex parsing a pretty error
    
    Closes #81319
    
    Old Output:
    <details><summary>Backtrace</summary>
    <p>
    
    ```
    thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\too
    ls\jsondocck\src\main.rs:152:81
    stack backtrace:
       0:     0x7ff79a011405 - std::backtrace_rs::backtrace::dbghelp::trace
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
       1:     0x7ff79a011405 - std::backtrace_rs::backtrace::trace_unsynchronized
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
       2:     0x7ff79a011405 - std::sys_common::backtrace::_print_fmt
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\sys_common\backtrace.rs:67
       3:     0x7ff79a011405 - std::sys_common::backtrace::_print::{{impl}}::fmt
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\sys_common\backtrace.rs:46
       4:     0x7ff79a026c7b - core::fmt::write
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\core\src\fmt\mod.rs:1078
       5:     0x7ff79a00e74d - std::io::Write::write_fmt<std::sys::windows::stdio::S
    tderr>
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\io\mod.rs:1519
       6:     0x7ff79a01413d - std::sys_common::backtrace::_print
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\sys_common\backtrace.rs:49
       7:     0x7ff79a01413d - std::sys_common::backtrace::print
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\sys_common\backtrace.rs:36
       8:     0x7ff79a01413d - std::panicking::default_hook::{{closure}}
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:208
       9:     0x7ff79a013c4a - std::panicking::default_hook
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:225
      10:     0x7ff79a014a7e - std::panicking::rust_panic_with_hook
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:591
      11:     0x7ff79a014573 - std::panicking::begin_panic_handler::{{closure}}
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:495
      12:     0x7ff79a011ddf - std::sys_common::backtrace::__rust_end_short_backtrac
    e<closure-0,!>
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\sys_common\backtrace.rs:141
      13:     0x7ff79a0144f9 - std::panicking::begin_panic_handler
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:493
      14:     0x7ff79a025230 - core::panicking::panic_fmt
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\core\src\panicking.rs:92
      15:     0x7ff79a02517c - core::panicking::panic
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\core\src\panicking.rs:50
      16:     0x7ff799f5245f - indexmap::map::core::raw::<impl indexmap::map::core::
    IndexMapCore<K,V>>::get_index_of::had34e726f99bd999
      17:     0x7ff799f48fea - std::sys_common::backtrace::__rust_begin_short_backtr
    ace::h1ac92efa44350e74
      18:     0x7ff799f41015 - std::rt::lang_start::{{closure}}::hdfe733a6a1ad9a18
      19:     0x7ff79a014c34 - core::ops::function::impls::{{impl}}::call_once
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\library\core\src\ops\function.rs:280
      20:     0x7ff79a014c34 - std::panicking::try::do_call
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:379
      21:     0x7ff79a014c34 - std::panicking::try
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panicking.rs:343
      22:     0x7ff79a014c34 - std::panic::catch_unwind
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\panic.rs:396
      23:     0x7ff79a014c34 - std::rt::lang_start_internal
                                   at /rustc/05b6023675d77979637b04a350c85903fbf5925
    7\/library\std\src\rt.rs:51
      24:     0x7ff799f536a7 - main
      25:     0x7ff79a02d788 - invoke_main
                                   at d:\A01\_work\6\s\src\vctools\crt\vcstartup\src
    \startup\exe_common.inl:78
      26:     0x7ff79a02d788 - __scrt_common_main_seh
                                   at d:\A01\_work\6\s\src\vctools\crt\vcstartup\src
    \startup\exe_common.inl:288
      27:     0x7ffe6bf47034 - BaseThreadInitThunk
      28:     0x7ffe6c89d241 - RtlUserThreadStart
    ```
    
    </p>
    </details>
    
    New Output:
    ```
    Invalid command: Invalid arguments to shlex::split: ` - "$foo` on line 26
    ```
    
    I've hit this a couple times, makes debugging a little nicer.
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    558b878 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of #81338 - bugadani:dominator-cleanup, r=davidtwco

    Clean up `dominators_given_rpo`
    jonas-schievink authored Jan 24, 2021
    Configuration menu
    Copy the full SHA
    529f15f View commit details
    Browse the repository at this point in the history