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 #117627

Closed
wants to merge 12 commits into from

Commits on Nov 4, 2023

  1. Configuration menu
    Copy the full SHA
    bee7b58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    86fca87 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2023

  1. Distinguish crates with the same name in type errors

    Previously, errors for crates with the same name would only distinguish them by the span of the source:
    ```
    note: `HashMap<_, _, _, _>` is defined in crate `hashbrown`
       --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/src/map.rs:188:1
    note: `HashMap<u32, u32>` is defined in crate `hashbrown`
       --> /Users/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/src/map.rs:188:1
    ```
    
    When the same version of the crate is loaded twice, this isn't particularly helpful. Additionally
    show where the .rlib was loaded from (in this case one was loaded from the sysroot and the other
    from a cargo target dir).
    jyn514 committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    c25af3d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e33e89 View commit details
    Browse the repository at this point in the history
  3. Don't steal the parse query when using --pretty

    This is the only place aside from the global_ctxt query where it is
    stolen.
    bjorn3 committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    1a1b10f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ba82056 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ec29a02 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Rollup merge of rust-lang#117578 - compiler-errors:derive-encode-in-r…

    …ustc_type_ir, r=davidtwco
    
    Derive `TyEncodable`/`TyDecodable` in `rustc_type_ir`
    
    when `derive(TyEncodable)` or `derive(TyDecodable)` sees an `I` type parameter on a struct that has no `'tcx`, then parameterize the `TyEncoder`/`TyDecoder`'s interner over that variable rather than `TyCtxt<'tcx>`.
    
    Also, emit where clauses for fields rather than generics.
    matthiaskrgr committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    8aa905e View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#117592 - thomcc:env-span-wrong, r=davidtwco

    Use the correct span when emitting the `env!` result
    
    The span used for the `env!` resut changed in 1.73, due to rust-lang@75df62d (from rust-lang#114014).
    
    This prevents [a lint in `plrustc`](https://github.com/tcdi/plrust/blob/main/plrustc/plrustc/src/lints/builtin_macros.rs#L54-L60)[^1] from working well, because the resulting span is not inside the  region where the lint is `#[deny()]`ed.
    
    [^1]: Perhaps worth noting that the `env_macro` diagnostic item comes from [the std fork used with PL/Rust](https://github.com/tcdi/postgrestd/blob/rust-1.73.0/library/core/src/macros/mod.rs#L944).
    
    Unfortunately, I have no idea how to write a test for this since I don't think we can have a custom lint in a test. A suggestion was made to use a custom proc macro for it, but that seems pretty involved (frankly, I might not have time to do it).
    
    r? `@davidtwco` (since they're the author of the PR with the regression)
    
    P.S. We generally try to avoid bothering upstream about PL/Rust-specific stuff (we don't want to nag), but this seems like an actual bug, since the other similar macros, such as `option_env` use the other span (and are lintable as a result).
    matthiaskrgr committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    6f45723 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#117609 - jyn514:sysroot-errors, r=davidtwco

    Distinguish crates with the same name in type errors
    
    Previously, errors for crates with the same name would only distinguish them by the span of the source:
    ```
    note: `HashMap<_, _, _, _>` is defined in crate `hashbrown`
       --> /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/src/map.rs:188:1
    note: `HashMap<u32, u32>` is defined in crate `hashbrown`
       --> /Users/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/src/map.rs:188:1
    ```
    
    When the same version of the crate is loaded twice, this isn't particularly helpful. Additionally show where the .rlib was loaded from (in this case one was loaded from the sysroot and the other from a cargo target dir).
    
    Fixes rust-lang#110055.
    matthiaskrgr committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    f9dd9ba View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#117613 - jackh726:vacation, r=compiler-errors

    Remove from vacation and compiler review group
    
    Staying on the types review rotation, but staying off the general review queue is good for me right now.
    
    Also move `@compiler-errors` since he's a full member now.
    matthiaskrgr committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    e967ec4 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#117615 - bjorn3:misc_changes, r=davidtwco

    Couple of small changes
    
    These are unrelated to each other, but they are each small enough that opening separate PR's doesn't make sense to me either.
    
    * Remove a place where the parse driver query is stolen.
    * Update an outdated doc comment
    * Use correct crate name in `-Zprint-vtable-sizes` when using `#![crate_name = "..."]`.
    matthiaskrgr committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    e63ec25 View commit details
    Browse the repository at this point in the history