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

Merged
merged 14 commits into from
Aug 8, 2024
Merged

Rollup of 7 pull requests #128805

merged 14 commits into from
Aug 8, 2024

Commits on Aug 1, 2024

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

Commits on Aug 5, 2024

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

Commits on Aug 7, 2024

  1. Update compiler-builtins to 0.1.117

    This includes [1] which means we can remove the (nonworking)
    configuration of `no-f16-f128`.
    
    Fixes rust-lang#128401.
    
    [1]: rust-lang/compiler-builtins#652
    tgross35 committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    51e68c3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5212c75 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a70c9e1 View commit details
    Browse the repository at this point in the history
  4. Fuchsia Test Runner: enable ffx repository server

    The default repository server setting has changed on Fuchsia (default is
    newly "false"). Now, in order to start the repository server, the config
    `repository.server.enabled` must be set to true.
    Jeff-A-Martin committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    5db9d43 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    0257f42 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#128520 - compiler-errors:more-precisely-for…

    …ce-move, r=BoxyUwU
    
    Skip over args when determining if async-closure's inner coroutine consumes its upvars
    
    rust-lang#125306 implements a strategy for when we have an `async move ||` async-closure that is inferred to be `async FnOnce`, it will force the inner coroutine to also be `move`, since we cannot borrow any upvars from the parent async-closure (since `FnOnce` is not lending):
    
    https://github.com/rust-lang/rust/blob/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/compiler/rustc_hir_typeck/src/upvar.rs#L211-L229
    
    However, when this strategy was implemented, it reused the `ExprUseVisitor` data from visiting the whole coroutine, which includes additional statements due to `async`-specific argument desugaring:
    
    https://github.com/rust-lang/rust/blob/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/compiler/rustc_ast_lowering/src/item.rs#L1197-L1228
    
    Well, it turns out that we don't care about these argument desugaring parameters, because arguments to the async-closure are not the *async-closure*'s captures -- they exist for only one invocation of the closure, and they're always consumed by construction (see the argument desugaring above), so they will force the coroutine's inferred kind to `FnOnce`. (Unless they're `Copy`, because we never consider `Copy` types to be consumed):
    
    https://github.com/rust-lang/rust/blob/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/compiler/rustc_hir_typeck/src/expr_use_visitor.rs#L60-L66
    
    However, since we *were* visiting these arg exprs, this resulted in us too-aggressively applying `move` to the inner coroutine, resulting in regressions. For example, this PR fixes rust-lang#128516. Fascinatingly, the note above about how we never consume `Copy` types is why this only regressed when the argument types weren't all `Copy`.
    
    I tried to leave some comments inline to make this more clear :)
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    2a177c2 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#128552 - s7tya:check-no-sanitize-attribute-…

    …pos, r=BoxyUwU
    
    Emit an error for invalid use of the `#[no_sanitize]` attribute
    
    fixes rust-lang#128487.
    
    Currently, the use of the `#[no_sanitize]` attribute for Mod, Impl,... is incorrectly permitted. This PR will correct this issue by generating errors, and I've also added some UI test cases for it.
    
    Referenced rust-lang#128458. As far as I know, the `#[no_sanitize]` attribute can only be used with functions, so I changed that part to `Fn` and `Method` using `check_applied_to_fn_or_method`. However, I couldn't find explicit documentation on this, so I could be mistaken...
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    6c2e067 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#128691 - tgross35:update-builtins, r=Amanieu

    Update `compiler-builtins` to 0.1.117
    
    This includes [1] which means we can remove the (nonworking) configuration of `no-f16-f128`.
    
    Fixes rust-lang#128401.
    
    [1]: rust-lang/compiler-builtins#652
    
    try-job: dist-various-1
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    1d820dc View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#128702 - yaahc:metrics-flag, r=estebank

    Add -Zmetrics-dir=PATH to save diagnostic metadata to disk
    
    r? ``@estebank``
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    ca5e8a7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#128797 - Jeff-A-Martin:fuchsia-test-runner,…

    … r=tmandry
    
    Fuchsia Test Runner: enable ffx repository server
    
    The default repository server setting has changed on Fuchsia (default is newly "false"). Now, in order to start the repository server, the config `repository.server.enabled` must be set to true.
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    f4fe5c8 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#128798 - futile:refactor/mbe-diagnostics, r…

    …=petrochenkov
    
    refactor(rustc_expand::mbe): Don't require full ExtCtxt when not necessary
    
    Refactor `mbe::diagnostics::failed_to_match_macro()` to not require a full `ExtCtxt`, but only a `&ParseSess`. It hard-required the `ExtCtxt` only for a call to `cx.trace_macros_diag()`, which we move instead to the only call-site of the function.
    
    Note: This could be a potential change in observed behavior, because a call to `cx.trace_macros_diag()` now always happens after `failed_to_match_macro()` was called, where before it was only called at the end of the main return path of the function. But since `trace_macros_diag()` "flushes" out any not-yet-reported errors, it should be ok to call it for all paths, since there shouldn't be any on the non-main paths I think. However, I don't know the rest of the codebase well enough to say that with 100% confidence, but `tests/ui` still pass, which gives at least some confidence in the change.
    
    Also concretize the return type from `Box<dyn MacResult>` to `(Span, ErrorGuaranteed)`, because this function will _always_ return an error, and never any other kind of result.
    
    Was part of rust-lang#128605 and rust-lang#128747, but is a standalone refactoring.
    
    r? ``@petrochenkov``
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    fbbabb9 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#128800 - clarfonthey:core-pattern-type, r=c…

    …ompiler-errors
    
    Add tracking issue to core-pattern-type
    
    While the actual `pattern_types` feature flag has an issue assigned, the exported macro and its module do not.
    
    cc rust-lang#123646
    tgross35 authored Aug 8, 2024
    Configuration menu
    Copy the full SHA
    36b9aee View commit details
    Browse the repository at this point in the history