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 10 pull requests #120620

Merged
merged 38 commits into from
Feb 4, 2024
Merged

Rollup of 10 pull requests #120620

merged 38 commits into from
Feb 4, 2024

Commits on Jan 13, 2024

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

Commits on Feb 1, 2024

  1. Tweak emit_stashed_diagnostics.

    `take` + `into_iter` + pattern matching is nicer than `drain` + `map` +
    `collect`.
    nnethercote committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    3434466 View commit details
    Browse the repository at this point in the history
  2. A small fix in enforce_slug_naming.rs.

    In rust-lang#119972 the code should have become `E0123` rather than `0123`. This
    fix doesn't affect the outcome because the proc macro errors out before
    the type of the code is checked, but the fix makes the test's code
    consistent with other similar code elsewhere.
    nnethercote committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    3db37fb View commit details
    Browse the repository at this point in the history
  3. Fit more values into DiagnosticArgValue::Number.

    It contains an `i128`, but when creating them we convert any number
    outside the range -100..100 to a string, because Fluent uses an `f64`.
    It's all a bit strange.
    
    This commit changes the `i128` to an `i32`, which fits safely in
    Fluent's `f64`, and removes the -100..100 range check. This means that
    only integers outside the range of `i32` will be converted to strings.
    nnethercote committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    26eb6da View commit details
    Browse the repository at this point in the history
  4. Rework StringPart.

    When there are two possibilities, both of which use a `String`, it's
    nicer to use a struct than an enum. Especially when mapping the contents
    into a tuple.
    nnethercote committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    2621f7f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6ac035d View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. coverage: Use normal edition: headers in coverage tests

    Some of these tests were originally written as part of a custom `run-make`
    test, so at that time they weren't able to use the normal compiletest header
    directive parser.
    
    Now that they're properly integrated, there's no need for them to use
    `compile-flags` to specify the edition, since they can use `edition` instead.
    Zalathar committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    c9c049b View commit details
    Browse the repository at this point in the history
  2. Clean up some things in the name resolver

    * Get rid of a typo in a function name
    * Rename `currently_processing_generics`: The old name confused me at first since
      I assumed it referred to generic *parameters* when it was in fact referring to
      generic *arguments*. Generics are typically short for generic params.
    * Get rid of a few unwraps by properly leveraging slice patterns
    fmease committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    3f7b1a5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5906237 View commit details
    Browse the repository at this point in the history
  4. Rename buffer_non_error_diag as buffer_non_error.

    To match `buffer_error`.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    f066be5 View commit details
    Browse the repository at this point in the history
  5. Remove BorrowckErrors::set_tainted_by_errors.

    It has no effect. Note that `infcx.set_tainted_by_errors()` is still
    called, so taintedness is still being propagated.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    3a02ebc View commit details
    Browse the repository at this point in the history
  6. Remove BorrowckErrors::tainted_by_errors.

    `BorrowckErrors` stores a mix of error and non-error diags in
    `buffered`. As a result, it downgrades `DiagnosticBuilder`s to
    `Diagnostic`s, losing the emission guarantees, and so has to use a
    `tainted_by_errors` field to record whether an error has occurred.
    
    This commit splits `buffered` into `buffered_errors` and
    `buffered_non_errors`, keeping them as `DiagnosticBuilder`s and
    preserving the emission guarantees.
    
    This also requires fixing a bunch of incorrect lifetimes on
    `DiagnosticBuilder` use points.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    5fd824d View commit details
    Browse the repository at this point in the history
  7. Inline and remove DiagnosticBuilder::into_diagnostic.

    It now has a single call site.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    2e6bea5 View commit details
    Browse the repository at this point in the history
  8. Rename BorrowckErrors as BorrowckDiags.

    And some related things. Because it can hold non-error diagnostics.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    b6a4f03 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    54c4f94 View commit details
    Browse the repository at this point in the history
  10. Remove an out-of-date comment.

    `DiagnosticBuilderInner` was removed some time ago.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    585367f View commit details
    Browse the repository at this point in the history
  11. Diagnostic cleanups

    - `emitted_at` isn't used outside the crate.
    - `code` and `messages` are public fields, so there's no point have
      trivial getters/setters for them.
    - `suggestions` is public, so the comment about "functionality on
      `Diagnostic`" isn't needed.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    a9a2e15 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8ba25d0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    df322fc View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6fdaf3e View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    cd4c5cd View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b506cce View commit details
    Browse the repository at this point in the history
  17. Simplify future breakage control flow.

    `emit_future_breakage` calls
    `self.dcx().take_future_breakage_diagnostics()` and then passes the
    result to `self.dcx().emit_future_breakage_report(diags)`. This commit
    removes the first of these and lets `emit_future_breakage_report` do the
    taking.
    
    It also inlines and removes what is left of `emit_future_breakage`,
    which has a single call site.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    0621cd4 View commit details
    Browse the repository at this point in the history
  18. Use StringPart more.

    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    be64802 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ef37dcb View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2024

  1. hir: Remove the generic type parameter from MaybeOwned

    It's only ever used with a reference to `OwnerInfo` as an argument.
    petrochenkov committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    c5eca33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f1573a View commit details
    Browse the repository at this point in the history
  3. Check for presence of field in typeck results before visiting it

    Co-authored-by: Michael Goulet <michael@errs.io>
    fmease and compiler-errors committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    4f773af View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#119543 - usamoi:avx512fp16, r=oli-obk

    add avx512fp16 to x86 target features
    
    std_detect avx512fp16: rust-lang/stdarch#1508
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    17670ca View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#120004 - Mark-Simulacrum:relnotes-1.76, r=M…

    …ark-Simulacrum
    
    Release notes for 1.76
    
    Cargo, library stabilizations and some cleanups, particularly to future compat, still pending.
    
    cc `@cuviper` `@rust-lang/release`
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    98d0d45 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#120562 - oli-obk:revert_stuff, r=cuviper

    Revert unsound libcore changes
    
    fixes rust-lang#120537
    
    these were introduced in rust-lang#119911
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    977945d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#120566 - Zalathar:edition, r=compiler-errors

    coverage: Use normal `edition:` headers in coverage tests
    
    Some of these tests were originally written as part of a custom `run-make` test, so at that time they weren't able to use the normal compiletest header directive parser.
    
    Now that they're properly integrated, there's no need for them to use `compile-flags` to specify the edition, since they can use `edition` instead.
    
    In most cases the `.cov-map` snapshot isn't affected at all, but in a few cases we add or remove a line, which slightly disturbs the first line number in each instrumented function.
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    892b0fd View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#120570 - fmease:change-ty-to-ct-param-sugg,…

    … r=compiler-errors
    
    Suggest changing type to const parameters if we encounter a type in the trait bound position
    
    The first commit is just drive-by cleanup.
    
    Provide a structured suggestion if the user forgot to prefix a “const parameter” with `const`, e.g., in `struct Tagged<TAG: u64>;`. This happens to me from time to time. Maybe C++ devs are also prone to this mistake given template syntax looks like `template<typename T, uint32_t N>`.
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    7c932d9 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#120571 - nnethercote:misc-diagnostics, r=ol…

    …i-obk
    
    Miscellaneous diagnostics cleanups
    
    All found while working on some speculative, invasive changes, but worth doing in their own right.
    
    r? `@oli-obk`
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    b9c87b4 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#120573 - nnethercote:rm-BorrowckErrors-tain…

    …ted_by_errors, r=oli-obk
    
    Remove `BorrowckErrors::tainted_by_errors`
    
    This PR removes one of the `tainted_by_errors` occurrences, replacing it with direct use of `ErrorGuaranteed`.
    
    r? `@oli-obk`
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    019d281 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#120592 - trevyn:cleanup-to-string, r=Nilstrieb

    Remove unnecessary `.to_string()`/`.as_str()`s
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    968cff7 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#120610 - petrochenkov:maybeownogen, r=cjgillot

    hir: Remove the generic type parameter from `MaybeOwned`
    
    It's only ever used with a reference to `OwnerInfo` as an argument.
    
    Follow up to rust-lang#120346.
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    2a8fc94 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#120616 - fmease:fix-ice-const-eval-fail-und…

    …ef-field-access, r=compiler-errors
    
    Fix ICE on field access on a tainted type after const-eval failure
    
    Fixes rust-lang#120615.
    
    r? oli-obk or compiler
    matthiaskrgr committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    326839b View commit details
    Browse the repository at this point in the history