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

Rustup #7644

Merged
merged 9 commits into from
Sep 8, 2021
Merged

Rustup #7644

merged 9 commits into from
Sep 8, 2021

Commits on Aug 27, 2021

  1. Path remapping: Make behavior of diagnostics output dependent on pres…

    …ence of --remap-path-prefix.
    michaelwoerister committed Aug 27, 2021
    Configuration menu
    Copy the full SHA
    c6c1f32 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2021

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

Commits on Sep 3, 2021

  1. Auto merge of #88363 - michaelwoerister:remapped-diagnostics, r=estebank

    Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
    
    This PR fixes a regression (#87745) with `--remap-path-prefix` where the flag stopped causing diagnostic messages to be remapped as well. The regression was introduced in rust-lang/rust#83813 where we erroneously assumed that remapping of diagnostic messages was not desired anymore (because #70642 partially undid that functionality with nobody objecting).
    
    The issue is fixed by making `--remap-path-prefix` remap diagnostic messages again, including for paths that have been remapped in upstream crates (e.g. the standard library). This means that "sysroot-localization" (implemented in #70642) is also disabled if `rustc` is invoked with `--remap-path-prefix`. The assumption is that once someone starts explicitly remapping paths they also don't want paths to their local Rust installation in their build output.
    
    In the future we might want to give more fine-grained control over this behavior via compiler flags (see rust-lang/rfcs#3127 for a related RFC). For now this PR is intended as a regression fix.
    
    This PR is an alternative to rust-lang/rust#88191, which makes diagnostic messages be remapped unconditionally. That approach, however, would effectively revert #70642.
    
    Fixes rust-lang/rust#87745.
    
    cc `@cbeuw`
    r? `@ghost`
    bors committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    a0152da View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2021

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

Commits on Sep 5, 2021

  1. Auto merge of #88499 - eddyb:layout-off, r=nagisa

    Provide `layout_of` automatically (given tcx + param_env + error handling).
    
    After #88337, there's no longer any uses of `LayoutOf` within `rustc_target` itself, so I realized I could move the trait to `rustc_middle::ty::layout` and redesign it a bit.
    
    This is similar to #88338 (and supersedes it), but at no ergonomic loss, since there's no funky `C: LayoutOf<Ty = Ty>` -> `Ty: TyAbiInterface<C>` generic `impl` chain, and each `LayoutOf` still corresponds to one `impl` (of `LayoutOfHelpers`) for the specific context.
    
    After this PR, this is what's needed to get `trait LayoutOf` (with the `layout_of` method) implemented on some context type:
    * `TyCtxt`, via `HasTyCtxt`
    * `ParamEnv`, via `HasParamEnv`
    * a way to transform `LayoutError`s into the desired error type
      * an error type of `!` can be paired with having `cx.layout_of(...)` return `TyAndLayout` *without* `Result<...>` around it, such as used by codegen
      * this is done through a new `LayoutOfHelpers` trait (and so is specifying the type of `cx.layout_of(...)`)
    
    When going through this path (and not bypassing it with a manual `impl` of `LayoutOf`), the end result is that only the error case can be customized, the query itself and the success paths are guaranteed to be uniform.
    
    (**EDIT**: just noticed that because of the supertrait relationship, you cannot actually implement `LayoutOf` yourself, the blanket `impl` fully covers all possible context types that could ever implement it)
    
    Part of the motivation for this shape of API is that I've been working on querifying `FnAbi::of_*`, and what I want/need to introduce for that looks a lot like the setup in this PR - in particular, it's harder to express the `FnAbi` methods in `rustc_target`, since they're much more tied to `rustc` concepts.
    
    r? `@nagisa` cc `@oli-obk` `@bjorn3`
    bors committed Sep 5, 2021
    Configuration menu
    Copy the full SHA
    ad8610d View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2021

  1. Auto merge of #88493 - chenyukang:fix-duplicated-diagnostic, r=estebank

    Fix #88256 remove duplicated diagnostics
    
    Fix #88256
    bors committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    f7aaa2a View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2021

  1. Configuration menu
    Copy the full SHA
    4962608 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3cb1d28 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    563a00b View commit details
    Browse the repository at this point in the history