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 10 pull requests #81068

Closed
wants to merge 38 commits into from
Closed

Commits on Jan 10, 2021

  1. Configuration menu
    Copy the full SHA
    5ccef56 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    12f1795 View commit details
    Browse the repository at this point in the history
  3. Update issue-78938-async-block.rs

    Fix whitespace
    sledgehammervampire committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    2b9c8ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9e345a5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    757bd23 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2021

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

Commits on Jan 12, 2021

  1. Update src/test/ui/async-await/issues/issue-78938-async-block.stderr

    Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
    sledgehammervampire and estebank committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    3ee3071 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2021

  1. Configuration menu
    Copy the full SHA
    b2f5048 View commit details
    Browse the repository at this point in the history
  2. Put all feature gate tests under feature-gates/

    There was one directory that had only a single test and there was also a
    test in the top-level directory. This moves both of them to
    `feature-gates/`.
    camelid committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    c200036 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7f41465 View commit details
    Browse the repository at this point in the history
  4. Bless test output

    sledgehammervampire committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    f5c4287 View commit details
    Browse the repository at this point in the history
  5. Fix whitespace

    sledgehammervampire committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    a9ead34 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Configuration menu
    Copy the full SHA
    174135f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    63deae5 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2021

  1. Configuration menu
    Copy the full SHA
    5468d98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0660b8b View commit details
    Browse the repository at this point in the history
  3. Update compiler/rustc_mir/src/borrow_check/diagnostics/conflict_error…

    …s.rs
    
    Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
    sledgehammervampire and estebank committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    3e9c95b View commit details
    Browse the repository at this point in the history
  4. Use Result and rename to filter_map

    The use of Result allows for making use of a reconstructed original value on failed
    projections.
    udoprog committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    e8757af View commit details
    Browse the repository at this point in the history
  5. Remove doctree::Import

    CraftSpider committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    e3274fd View commit details
    Browse the repository at this point in the history
  6. Address nit

    CraftSpider committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    2a0c9e2 View commit details
    Browse the repository at this point in the history
  7. Fix JSON test

    CraftSpider committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    e42c1b9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    31b17f5 View commit details
    Browse the repository at this point in the history
  9. Change rebuild heuristic in BinaryHeap::append

    See rust-lang#77433 for why the new heuristic was chosen.
    
    Fixes rust-lang#77433
    hanmertens committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    32a20f4 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2021

  1. Configuration menu
    Copy the full SHA
    c625b97 View commit details
    Browse the repository at this point in the history
  2. doctest: Reset errors before dropping the parse session

    The first parse is to collect whether the code contains macros, has
    `main`, and uses other crates. In that pass we ignore errors as those
    will be reported when the test file is actually built.
    
    For that we need to reset errors in the `Diagnostic` otherwise when
    dropping it unhandled errors will be reported as compiler bugs.
    
    Fixes rust-lang#80992
    osa1 committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    eef383f View commit details
    Browse the repository at this point in the history
  3. Add a test

    osa1 committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    0ef5557 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b681631 View commit details
    Browse the repository at this point in the history
  5. Add a regression test for rust-lang#76281

    This has been fixed between 1.47.0-nightly (663d2f5 2020-08-22) and 1.47.0-nightly (5180f3d 2020-08-23).
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    8797986 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#77435 - hanmertens:binary_heap_append, r=sc…

    …ottmcm
    
    Always use extend in BinaryHeap::append
    
    This is faster, see rust-lang#77433.
    
    Fixes rust-lang#77433
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    d0f8553 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#78455 - udoprog:refcell-opt-map, r=KodrAus

    Introduce {Ref, RefMut}::try_map for optional projections in RefCell
    
    This fills a usability gap of `RefCell` I've personally encountered to perform optional projections, mostly into collections such as `RefCell<Vec<T>>` or `RefCell<HashMap<U, T>>`:
    
    > This kind of API was briefly featured under Open questions in rust-lang#10514 back in 2013 (!)
    
    ```rust
    let values = RefCell::new(vec![1, 2, 3, 4]);
    let b = Ref::opt_map(values.borrow(), |vec| vec.get(2));
    ```
    
    It primarily avoids this alternative approach to accomplish the same kind of projection which is both rather noisy and panicky:
    ```rust
    let values = RefCell::new(vec![1, 2, 3, 4]);
    
    let b = if values.get(2).is_some() {
        Some(Ref::map(values.borrow(), |vec| vec.get(2).unwrap()))
    } else {
        None
    };
    ```
    
    ### Open questions
    
    The naming `opt_map` is preliminary. I'm not aware of prior art in std to lean on here, but this name should probably be improved if this functionality is desirable.
    
    Since `opt_map` consumes the guard, and alternative syntax might be more appropriate which instead *tries* to perform the projection, allowing the original borrow to be recovered in case it fails:
    
    ```rust
    pub fn try_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Result<Ref<'b, U>, Self>
    where
        F: FnOnce(&T) -> Option<&U>;
    ```
    
    This would be more in line with the `try_map` method [provided by parking lot](https://docs.rs/lock_api/0/lock_api/struct.RwLockWriteGuard.html#method.try_map).
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    0e5dcaf View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#80614 - 1000teslas:issue-78938-fix, r=tmandry

    Explain why borrows can't be held across yield point in async blocks
    
    For rust-lang#78938.
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    0d901f2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#80901 - jyn514:better-colors, r=Mark-Simula…

    …crum
    
    Make `x.py --color always` apply to logging too
    
    Follow-up to rust-lang#78548, rust-lang#79004.
    
    r? `@Mark-Simulacrum`
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    046da7a View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#80902 - JohnTitor:issue-76281, r=Mark-Simul…

    …acrum
    
    Add a regression test for rust-lang#76281
    
    This has been fixed between 1.47.0-nightly (663d2f5 2020-08-22) and 1.47.0-nightly (5180f3d 2020-08-23). Maybe fixed by rust-lang#73526?
    
    Created `wasm` dir, it currently has only one test but I'll move some wasm-related tests there as a follow-up.
    
    Closes rust-lang#76281
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    e9a6063 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#80968 - KodrAus:stabilize/poll_map, r=Mark-…

    …Simulacrum
    
    Stabilize the poll_map feature
    
    Stabilizes the `poll_map` feature as tracked by rust-lang#63514 (with a completed FCP).
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    605557f View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#80971 - camelid:feature-gate-testsuite-orga…

    …nization, r=Mark-Simulacrum
    
    Put all feature gate tests under `feature-gates/`
    
    There was one directory that had only a single test and there was also a
    test in the top-level directory. This moves both of them to
    `feature-gates/`.
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    32e9c33 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#81021 - CraftSpider:rustdoc-remove-import, …

    …r=jyn514
    
    Remove doctree::Import
    
    Per the title. Part of cleaning up doctree
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    58c1b90 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#81040 - osa1:fix_80992, r=jyn514

    doctest: Reset errors before dropping the parse session
    
    The first parse is to collect whether the code contains macros, has
    `main`, and uses other crates. In that pass we ignore errors as those
    will be reported when the test file is actually built.
    
    For that we need to reset errors in the `Diagnostic` otherwise when
    dropping it unhandled errors will be reported as compiler bugs.
    
    Fixes rust-lang#80992
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    6a131cb View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#81065 - osa1:cranelift_semicolon_warning, r…

    …=jyn514
    
    codegen_cranelift: Fix redundant semicolon warn
    JohnTitor committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    c8bca90 View commit details
    Browse the repository at this point in the history