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 7 pull requests #96792

Closed
wants to merge 23 commits into from

Commits on May 2, 2022

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

Commits on May 5, 2022

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

Commits on May 6, 2022

  1. typeck: port "unconstrained opaque type" diag

    Port the "unconstrained opaque type" diagnostic to using the diagnostic
    derive.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed May 6, 2022
    Configuration menu
    Copy the full SHA
    3dac70f View commit details
    Browse the repository at this point in the history
  2. macros: allow Vec fields in diagnostic derive

    Diagnostics can have multiple primary spans, or have subdiagnostics
    repeated at multiple locations, so support `Vec<..>` fields in the
    diagnostic derive which become loops in the generated code.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed May 6, 2022
    Configuration menu
    Copy the full SHA
    859079f View commit details
    Browse the repository at this point in the history
  3. sess: add create_{err,warning}

    Currently, the only API for creating errors from a diagnostic derive
    will emit it immediately. This makes it difficult to add subdiagnostics
    to diagnostics from the derive, so add `create_{err,warning}` functions
    that return the diagnostic without emitting it.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed May 6, 2022
    Configuration menu
    Copy the full SHA
    3f413d2 View commit details
    Browse the repository at this point in the history
  4. typeck: port "explicit generic args w/ impl trait"

    Port the "explicit generic arguments with impl trait" diagnostic to
    using the diagnostic derive.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed May 6, 2022
    Configuration menu
    Copy the full SHA
    af47257 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bd31ba0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    22cc6c3 View commit details
    Browse the repository at this point in the history
  7. bless mir-opt

    RalfJung committed May 6, 2022
    Configuration menu
    Copy the full SHA
    d455752 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    35d77c1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7b773e8 View commit details
    Browse the repository at this point in the history
  10. Fix an incorrect link in The Unstable Book

    https://github.com/rust-lang/rust/blob/master/src/librustc_session/lint/builtin.rs
    returns page not found.
    
    The following is the background of the move.
    First rust-lang#74862 moves from src/librustc_session/lint/builtin.rs
    to compiler/rustc_session/src/lint/builtin.rs
    Then rust-lang@23018a5 moves from compiler/rustc_session/src/lint/builtin.rs
    to compiler/rustc_lint_defs/src/builtin.rs
    
    So, the current correct link is https://github.com/rust-lang/rust/blob/master/compiler/rustc_lint_defs/src/builtin.rs
    
    This PR fixes a broken link on the following page:
    https://doc.rust-lang.org/beta/unstable-book/language-features/plugin.html
    koic committed May 6, 2022
    Configuration menu
    Copy the full SHA
    d6c64f4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d7d928e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5c7ce84 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    fd6b01f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3bfa2eb View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#96581 - RalfJung:debug-size-align, r=oli-obk

    make Size and Align debug-printing a bit more compact
    
    In particular in `{:#?}`-mode, these take up a lot of space, so I think this is the better alternative (even though it is a bit longer in `{:?}` mode, I think it is still more readable).
    
    We could make it even smaller by deviating further from what the actual code looks like, e.g. via something like `Size(4 bytes)`. Not sure what people would think about that?
    
    Cc ```@oli-obk```
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    a5eaef5 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#96636 - GuillaumeGomez:fix-jump-to-def-regr…

    …ession, r=notriddle
    
    Fix jump to def regression
    
    rust-lang#93803 introduced a regression in the "jump to def" feature. This fixes it.
    
    Nice side-effect: it adds a new regression test. :)
    
    I also used this opportunity to add documentation about this unstable feature in the rustdoc book.
    
    cc `@cjgillot`
    r? `@notriddle`
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    b841f66 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#96746 - JohnTitor:issue-96738, r=petrochenkov

    Fix an ICE on rust-lang#96738
    
    In the block we don't know if the method actually exists thus `expect_local` panics.
    Fixes rust-lang#96738
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    3da6e0a View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#96760 - davidtwco:diagnostic-translation-ve…

    …c, r=oli-obk
    
    diagnostics: port more diagnostics to derive + add support for `Vec` fields
    
    - Port "unconstrained opaque type" diagnostic to using the derive.
    - Allow `Vec` fields in diagnostic derive - enables support for diagnostics that have multiple primary spans, or have subdiagnostics repeated at multiple locations. `Vec<..>` fields in the diagnostic derive become loops in the generated code.
    - Add `create_{err,warning}` - there wasn't a way to create a diagnostic from a struct and not emit it straight away.
    - Port "explicit generic args w/ impl trait" diagnostic to using the derive.
    
    r? ```@oli-obk```
    cc ```@pvdrz```
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    bb7c8f9 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#96778 - JohnTitor:expect-local-track-caller…

    …-take-2, r=petrochenkov
    
    Remove closures on `expect_local` to apply `#[track_caller]`
    
    Pointed out in rust-lang#96747 (comment)
    Didn't change `expect_non_local` as I'm not sure if it's also the case.
    r? `@petrochenkov`
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    633cd5e View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#96781 - koic:fix_an_incorrect_link_in_the_u…

    …nstable_book, r=ehuss
    
    Fix an incorrect link in The Unstable Book
    
    https://github.com/rust-lang/rust/blob/master/src/librustc_session/lint/builtin.rs returns page not found.
    
    The following is the background of the move.
    First rust-lang#74862 moves from src/librustc_session/lint/builtin.rs to compiler/rustc_session/src/lint/builtin.rs.
    Then rust-lang@23018a5 moves from compiler/rustc_session/src/lint/builtin.rs to compiler/rustc_lint_defs/src/builtin.rs.
    
    So, the current correct link is https://github.com/rust-lang/rust/blob/master/compiler/rustc_lint_defs/src/builtin.rs.
    
    This PR fixes a broken link on the following page:
    https://doc.rust-lang.org/beta/unstable-book/language-features/plugin.html
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    1bab41d View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#96783 - aliemjay:typo-issue-95034, r=compil…

    …er-errors
    
    Link to correct issue in issue-95034 known-bug
    
    fix a typo is issue number: 94034 -> 95034
    GuillaumeGomez authored May 6, 2022
    Configuration menu
    Copy the full SHA
    095bd05 View commit details
    Browse the repository at this point in the history