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 5 pull requests #99231

Merged
merged 24 commits into from
Jul 14, 2022
Merged

Rollup of 5 pull requests #99231

merged 24 commits into from
Jul 14, 2022

Commits on Jul 11, 2022

  1. Give a better error when x dist fails for an optional tool

    Before:
    ```
    thread 'main' panicked at 'Unable to build RLS', dist.rs:42:9
    ```
    
    After:
    ```
    thread 'main' panicked at 'Unable to build submodule tool RLS (use `missing-tools = true` to ignore this failure)
    note: not all tools are available on all nightlies
    help: see https://forge.rust-lang.org/infra/toolstate.html for more information', dist.rs:43:9
    ```
    jyn514 committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    9395103 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2022

  1. Parse closure binders

    This is first step in implementing RFC 3216.
    - Parse `for<'a>` before closures in ast
      - Error in lowering
    - Add `closure_lifetime_binder` feature
    WaffleLapkin committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    40ae7b5 View commit details
    Browse the repository at this point in the history
  2. --bless tests

    WaffleLapkin committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    97fcead View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f89ef3c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c2dbd62 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0c28484 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    577f3c6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3ebb852 View commit details
    Browse the repository at this point in the history
  8. Add an indirection for closures in hir::ExprKind

    This helps bring `hir::Expr` size down, `Closure` was the biggest
    variant, especially after `for<>` additions.
    WaffleLapkin committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    df4fee9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d2923b4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b504a18 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    30a3673 View commit details
    Browse the repository at this point in the history
  12. Fix clippy build

    WaffleLapkin committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    9aa142b View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Configuration menu
    Copy the full SHA
    031b2c5 View commit details
    Browse the repository at this point in the history
  2. Clippy fallout.

    cjgillot committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    c7ac816 View commit details
    Browse the repository at this point in the history
  3. Bless ui-fulldeps tests.

    cjgillot committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    3b1b38d View commit details
    Browse the repository at this point in the history
  4. Add feature gate.

    cjgillot committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    5a20834 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f94484f View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

  1. Stabilize core::ffi:c_* and rexport in std::ffi

    This only stabilizes the base types, not the non-zero variants, since
    those have their own separate tracking issue and have not gone through
    FCP to stabilize.
    joshtriplett committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    d431338 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#97720 - cjgillot:all-fresh, r=petrochenkov

    Always create elided lifetime parameters for functions
    
    Anonymous and elided lifetimes in functions are sometimes (async fns) --and sometimes not (regular fns)-- desugared to implicit generic parameters.
    
    This difference of treatment makes it some downstream analyses more complicated to handle.  This step is a pre-requisite to perform lifetime elision resolution on AST.
    
    There is currently an inconsistency in the treatment of argument-position impl-trait for functions and async fns:
    ```rust
    trait Foo<'a> {}
    fn foo(t: impl Foo<'_>) {} //~ ERROR missing lifetime specifier
    async fn async_foo(t: impl Foo<'_>) {} //~ OK
    fn bar(t: impl Iterator<Item = &'_ u8>) {} //~ ERROR missing lifetime specifier
    async fn async_bar(t: impl Iterator<Item = &'_ u8>) {} //~ OK
    ```
    
    The current implementation reports "missing lifetime specifier" on `foo`, but **accepts it** in `async_foo`.
    This PR **proposes to accept** the anonymous lifetime in both cases as an extra generic lifetime parameter.
    This change would be insta-stable, so let's ping t-lang.
    Anonymous lifetimes in GAT bindings keep being forbidden:
    ```rust
    fn foo(t: impl Foo<Assoc<'_> = Bar<'_>>) {}
                             ^^        ^^
                           forbidden   ok
    ```
    I started a discussion here: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Anonymous.20lifetimes.20in.20universal.20impl-trait/near/284968606
    
    r? ``@petrochenkov``
    Dylan-DPC authored Jul 14, 2022
    Configuration menu
    Copy the full SHA
    f5e9cb5 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#98315 - joshtriplett:stabilize-core-ffi-c, …

    …r=Mark-Simulacrum
    
    Stabilize `core::ffi:c_*` and rexport in `std::ffi`
    
    This only stabilizes the base types, not the non-zero variants, since
    those have their own separate tracking issue and have not gone through
    FCP to stabilize.
    Dylan-DPC authored Jul 14, 2022
    Configuration menu
    Copy the full SHA
    103b860 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#98705 - WaffleLapkin:closure_binder, r=cjgi…

    …llot
    
    Implement `for<>` lifetime binder for closures
    
    This PR implements RFC 3216 ([TI](rust-lang#97362)) and allows code like the following:
    
    ```rust
    let _f = for<'a, 'b> |a: &'a A, b: &'b B| -> &'b C { b.c(a) };
    //       ^^^^^^^^^^^--- new!
    ```
    
    cc ``@Aaron1011`` ``@cjgillot``
    Dylan-DPC authored Jul 14, 2022
    Configuration menu
    Copy the full SHA
    e5a86d7 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#99126 - NiklasJonsson:84447/rustc_span, r=p…

    …etrochenkov
    
    remove allow(rustc::potential_query_instability) in rustc_span
    
    Also, avoid sorting before debug output as iteration order can now be
    relied upon.
    
    Related rust-lang#84447
    Dylan-DPC authored Jul 14, 2022
    Configuration menu
    Copy the full SHA
    85159a4 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#99139 - jyn514:dist-tool-help, r=Mark-Simul…

    …acrum
    
    Give a better error when `x dist` fails for an optional tool
    
    Before:
    ```
    thread 'main' panicked at 'Unable to build RLS', dist.rs:42:9
    ```
    
    After:
    ```
    thread 'main' panicked at 'Unable to build submodule tool RLS (use `missing-tools = true` to ignore this failure)
    note: not all tools are available on all nightlies
    help: see https://forge.rust-lang.org/infra/toolstate.html for more information', dist.rs:43:9
    ```
    
    Closes rust-lang#85683 by explaining better why the error is expected.
    Dylan-DPC authored Jul 14, 2022
    Configuration menu
    Copy the full SHA
    c1b43ef View commit details
    Browse the repository at this point in the history