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 14 pull requests #109439

Closed
wants to merge 55 commits into from
Closed

Commits on Dec 2, 2022

  1. Windows: make Command prefer non-verbatim paths

    When spawning Commands, the path we use can end up being queried using `env::current_exe` (or the equivalent in other languages). Not all applications handle these paths properly therefore we should have a stronger preference for non-verbatim paths when spawning processes.
    ChrisDenton committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    920435f View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2023

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

Commits on Mar 2, 2023

  1. Configuration menu
    Copy the full SHA
    d7049ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2f3806 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f96774b View commit details
    Browse the repository at this point in the history
  4. add a splash of color

    pietroalbini committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    f816d3a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9388c8e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b14b355 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    50b3583 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ad9a444 View commit details
    Browse the repository at this point in the history
  9. do not use render_tests for clippy

    Behind the scenes Clippy uses compiletest-rs, which doesn't support the
    --json flag we added to Rust's compiletest.
    pietroalbini committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    f23e205 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. Configuration menu
    Copy the full SHA
    9a1ff1b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4958272 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

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

Commits on Mar 7, 2023

  1. switch to termcolor

    pietroalbini committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    c015d0d View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    0a1b983 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4556037 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

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

Commits on Mar 17, 2023

  1. review nits

    BoxyUwU committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    ee31e5f View commit details
    Browse the repository at this point in the history
  2. add assert

    BoxyUwU committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    ea08d3a View commit details
    Browse the repository at this point in the history
  3. add comments

    Co-authored-by: lcnr <rust@lcnr.de>
    BoxyUwU and lcnr committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    ce14a1e View commit details
    Browse the repository at this point in the history
  4. UNACEPTABLE

    BoxyUwU committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    e06c62c View commit details
    Browse the repository at this point in the history
  5. fix let else unformatting

    BoxyUwU committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    aa8de17 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e624ef4 View commit details
    Browse the repository at this point in the history
  7. fix bad assertion

    BoxyUwU committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    9df35a5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b85bc19 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. rustdoc: Cleanup parent module tracking for doc links

    Keep ids of the documented items themselves, not their parent modules.
    Parent modules can be retreived from those ids when necessary.
    petrochenkov committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    f7a9702 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae47810 View commit details
    Browse the repository at this point in the history
  3. add myself to mailmap

    aDotInTheVoid committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    69a82f7 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Configuration menu
    Copy the full SHA
    9f80c75 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    239ec6c View commit details
    Browse the repository at this point in the history
  3. fix typo

    lcnr committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    5b4fa5b View commit details
    Browse the repository at this point in the history
  4. Support aggregate expressions

    cbeuw committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    8e4e55e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e24f5ac View commit details
    Browse the repository at this point in the history
  6. Use builtin_index instead of match

    Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
    cbeuw and oli-obk committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    f404f33 View commit details
    Browse the repository at this point in the history
  7. adapt tests/codegen/vec-shrink-panik for LLVM 17

    After llvm/llvm-project@0d4a709
    LLVM now doesn't generate references to panic_cannot_unwind:
    
    @nikic:
    https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/a.20couple.20codegen.20test.20failures.20after.20llvm.200d4a709bb876824a/near/342664944
    >Okay, so LLVM now realizes that double panic is not possible, so that's fine.
    krasimirgg committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    e4a4064 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f321144 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5058cc8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    93eeb12 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    720cc40 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Configuration menu
    Copy the full SHA
    0177176 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#96391 - ChrisDenton:command-non-verbatim, r…

    …=joshtriplett
    
    Windows: make `Command` prefer non-verbatim paths
    
    When spawning Commands, the path we use can end up being queried using `env::current_exe` (or the equivalent in other languages). Not all applications handle these paths properly therefore we should have a stronger preference for non-verbatim paths when spawning processes.
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    4f0c7ba View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#106434 - clubby789:document-sum-result, r=t…

    …he8472
    
    Document `Iterator::sum/product` for Option/Result
    
    Closes rust-lang#105266
    
    We already document the similar behavior for `collect()` so I believe it makes sense to add this too. The Option/Result implementations *are* documented on their respective pages and the page for `Sum`, but buried amongst many other trait impls which doesn't make it very discoverable.
    
    ````@rustbot```` label +A-docs
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    07af691 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#108659 - ferrocene:pa-test-metrics, r=Mark-…

    …Simulacrum
    
    Include executed tests in the build metrics (and use a custom test display impl)
    
    The main goal of this PR is to include all tests executed in CI inside the build metrics JSON files. I need this for Ferrocene, and ``@Mark-Simulacrum`` expressed desire to have this as well to ensure all tests are executed at least once somewhere in CI.
    
    Unfortunately implementing this required rewriting inside of bootstrap all of the code to render the test output to console. libtest supports outputting JSON instead of raw text, which we can indeed use to populate the build metrics. Doing that suppresses the console output though, and compared to rustc and Cargo the console output is not included as a JSON field.
    
    Because of that, this PR had to reimplement both the "pretty" format (one test per line, with `rust.verbose-tests = true`), and the "terse" format (the wall of dots, with `rust.verbose-tests = false`). The current implementation should have the exact same output as libtest, except for the benchmark output. libtest's benchmark output is broken in the "terse" format, so since that's our default I slightly improved how it's rendered.
    
    Also, to bring parity with libtest I had to introduce support for coloring output from bootstrap, using the same dependencies `annotate-snippets` uses. It's now possible to use `builder.color_for_stdout(Color::Red, "text")` and `builder.color_for_stderr(Color::Green, "text")` across all of bootstrap, automatically respecting the `--color` flag and whether the stream is a terminal or not.
    
    I recommend reviewing the PR commit-by-commit.
    r? ``@Mark-Simulacrum``
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    748959d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#108842 - compiler-errors:non_lifetime_binde…

    …rs-object-safe, r=b-naber
    
    Enforce non-lifetime-binders in supertrait preds are not object safe
    
    We can't construct vtables for these supertraits.
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    d6318b7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#108896 - BoxyUwU:new_solver_add_goal_fn, r=…

    …lcnr
    
    new solver: make all goal evaluation able to be automatically rerun
    
    It is generally wrong to call `evaluate_goal` multiple times or `evaluate_goal` and `evaluate_all` for the same `QueryResult` without correctly handling rerunning the goals when inference makes progress. Not doing so will result in the assertion in `evaluate_goal` firing because rerunning the goal will lead to a more accurate `QueryResult`.
    
    Currently there are lots of places that get this wrong and generally it is complex and error prone to handle correctly everywhere. This PR introduces a way to add goals to the `EvalCtxt` and then run all the added goals in a loop so that `evaluate_goal`/`evaluate_all` is not necessary to call manually.
    
    There are a few complications for making everything work "right":
    1. the `normalizes-to` hack that replaces the rhs with an unconstrained infer var requires special casing in the new `try_evaluate_added_goals` function similar to how `evaluate_goal`'s assertion special cases that hack.
    
    2. `assemble_candidates_after_normalizing_self_ty`'s normalization step needs to be reran for each candidate otherwise the found candidates will potentially get a more accurate `QueryResult` when rerunning the projection/trait goal which can effect the `QueryResult` of the projection/trait goal.
    This is implemented via `EvalCtxt::probe`'s closure's `EvalCtxt` inheriting the added goals of the `EvalCtxt` that `probe` is called on, allowing us to add goals in a probe, and then enter a nested probe for each candidate and evaluate added goals which include the normalization step's goals.
    
    I made `make_canonical_response` evaluate added goals so that it will be hard to mess up the impl of the solver by forgetting to evaluate added goals. Right now the only way to mess this up would be to call `response_no_constraints` (which from the name is obviously weird).
    
    The visibility of `evaluate_goal` means that it can be called from various `compute_x_goal` or candidate assembly functions, this is generally wrong and we should never call `evaluate_goal` manually, instead we should be calling `add_goal`/`add_goals`. This is solved by moving `evaluate_goal` `evaluate_canonical_goal` and `compute_goal` into `eval_ctxt`'s module and making them private so they cannot be called from elsewhere, forcing people to call `add_goal/s` and `evaluate_added_goals_and_make_canonical_resposne`/`try_evaluate_added_goals`
    
    ---
    
    Other changes:
    - removed the `&& false` that was introduced to the assertion in `evaluate_goal` in rust-lang#108839
    - remove a `!self.did_overflow()` requirement in `search_graph.is_empty()` which causes goals that overflow to ICE
    - made `EvalCtxt::eq` take `&mut self` and add all the nested goals via `add_goals` instead of returning them as 99% of call sites just immediately called `EvalCtxt::add_goals` manually.
    
    r? ````@lcnr````
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    ffe8203 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#109124 - ferrocene:pa-compression-mode, r=M…

    …ark-Simulacrum
    
    Add `dist.compression-profile` option to control compression speed
    
    PR rust-lang#108534 reduced the size of compressed archives, but (as expected) it also resulted in way longer compression times and memory usage during compression.
    
    It's desirable to keep status quo (smaller archives but more CI usage), but it should also be configurable so that downstream users don't have to waste that much time on CI. As a data point, this resulted in doubling the time of Ferrocene's dist jobs, and required us to increase the RAM allocation for one of such jobs.
    
    This PR adds a new `config.toml` setting, `dist.compression-profile`. The values can be:
    
    * `fast`: equivalent to the gzip and xz preset of "1"
    * `balanced`: equivalent to the gzip and xz preset of "6" (the CLI defaults as far as I'm aware)
    * `best`: equivalent to the gzip present of "9", and our custom xz profile
    
    The default has also been moved back to `balanced`, to try and avoid the compression time regression for downstream users. I don't feel too strongly on the default, and I'm open to changing it.
    
    Also, for the `best` profile the XZ settings do not match the "9" preset used by the CLI, and it might be confusing. Should we create a `custom-rustc-ci`/`ultra` profile for that?
    
    r? `@Mark-Simulacrum`
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    ee2bb70 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#109240 - compiler-errors:dont-binder-twice,…

    … r=oli-obk
    
    Walk un-shifted nested `impl Trait` in trait when setting up default trait method assumptions
    
    Fixes a double subtraction in some binder math in return-position `impl Trait` in trait handling code.
    
    Fixes rust-lang#109239
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    dd395eb View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#109312 - petrochenkov:docice5, r=GuillaumeG…

    …omez
    
    rustdoc: Cleanup parent module tracking for doc links
    
    Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
    
    Fixes rust-lang#108501.
    That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    c0648d6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9408e1c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5e93647 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#109390 - cbeuw:aggregate-lit, r=oli-obk

    Custom MIR: Support aggregate expressions
    
    Add support for tuple, array and ADT expressions in custom mir
    
    r? ````@oli-obk```` or ````@tmiasko```` or ````@JakobDegen````
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    d891385 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#109394 - krasimirgg:llvm-17-vec-panic, r=nikic

    adapt tests/codegen/vec-shrink-panik for LLVM 17
    
    After llvm/llvm-project@0d4a709 LLVM now doesn't generate references to panic_cannot_unwind:
    https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/17978#0186ff55-ca6f-4bc5-b1ec-2622c77d0ed5/744-746
    
    Adapted as suggested by ``@nikic`` on Zulip:
    https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/a.20couple.20codegen.20test.20failures.20after.20llvm.200d4a709bb876824a/near/342664944
    >Okay, so LLVM now realizes that double panic is not possible, so that's fine.
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    4b21fe2 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#109408 - RalfJung:retags, r=compiler-errors

    not *all* retags might be explicit in Runtime MIR
    
    In rust-lang#105317 I made Miri treat `Rvalue::Ref/AddrOf` as implicit retagging sites. This updates the MIR docs accordingly.
    
    For `Rvalue::Ref` I think this makes a lot more sense: creating a new reference is their entire point, so we can avoid bloating the MIR with retags. Also this seems to be the best way to handle cases like `*ptr = &[mut] ...`, where doing a retag is somewhat questionable since maybe `*ptr` points to another place now?
    
    For `Rvalue::AddrOf`, Stacked Borrows needs this because even raw ptrs need some retagging, but Tree Borrows doesn't do ant retagging here and I hope we'll end up with a model where raw pointers don't get retagged.
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    fa98cb2 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#109415 - nnethercote:refactor-handle_missin…

    …g_lit, r=petrochenkov
    
    Refactor `handle_missing_lit`.
    
    A small code readability improvement.
    
    r? ``@petrochenkov``
    Noratrieb committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    a0cb748 View commit details
    Browse the repository at this point in the history