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 8 pull requests #121491

Merged
merged 18 commits into from
Feb 23, 2024
Merged

Rollup of 8 pull requests #121491

merged 18 commits into from
Feb 23, 2024

Commits on Feb 22, 2024

  1. Configuration menu
    Copy the full SHA
    6017de4 View commit details
    Browse the repository at this point in the history
  2. set llvm.assertions to false in compiler profile

    Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true`
    because we don't provide ci-llvm on the `rustc-alt-builds` server. Therefore, it is kept off by default.
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    52227ed View commit details
    Browse the repository at this point in the history
  3. woops, soundly generalizing is hard

    I ended up getting confused while trying to flip the
    variances when flipping the order. Should be
    all right now
    lcnr committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    fa2921b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f83e50 View commit details
    Browse the repository at this point in the history
  5. fix CI

    lcnr committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    dabacb7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    109321a View commit details
    Browse the repository at this point in the history
  7. Allow for a missing adt_def in NamePrivacyVisitor.

    This was caused by 72b172b in rust-lang#121206. That commit removed an early
    return from `analysis` when there are stashed errors. As a result, it's
    possible to reach privacy analysis when there are stashed errors, which
    means more code paths can be reached. One such code path was handled in
    that commit, where a `span_bug` was changed to a `span_delayed_bug`.
    
    This commit handles another such code path uncovered by fuzzing, in much
    the same way.
    
    Fixes rust-lang#121455.
    nnethercote committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    21bb1a4 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. Configuration menu
    Copy the full SHA
    938e594 View commit details
    Browse the repository at this point in the history
  2. coverage: Use variable name this in CoverageGraph::from_mir

    This makes it easier to see that we're manipulating the instance that is being
    constructed, and is a lot less verbose than `basic_coverage_blocks`.
    Zalathar committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    9137c1e View commit details
    Browse the repository at this point in the history
  3. Explicitly call emit_stashed_diagnostics.

    Commit 72b172b in rust-lang#121206 changed things so that
    `emit_stashed_diagnostics` is only called from `run_compiler`. But
    rustfmt doesn't use `run_compiler`, so it needs to call
    `emit_stashed_diagnostics` itself to avoid an abort in
    `DiagCtxtInner::drop` when stashed diagnostics occur.
    
    Fixes rust-lang#121450.
    nnethercote committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    41da3d6 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#121434 - nnethercote:fix-121208-fallout, r=…

    …lcnr
    
    Fix rust-lang#121208 fallout
    
    rust-lang#121208 converted lots of delayed bugs to bugs. Unsurprisingly, there were a few invalid conversion found via fuzzing.
    
    r? `@lcnr`
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    6e00f0d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#121471 - estebank:lint-clone, r=TaKO8Ki

    When encountering `<&T as Clone>::clone(x)` because `T: Clone`, suggest `#[derive(Clone)]`
    
    CC rust-lang#40699.
    
    ```
    warning: call to `.clone()` on a reference in this situation does nothing
      --> $DIR/noop-method-call.rs:23:71
       |
    LL |     let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone();
       |                                                                       ^^^^^^^^
       |
       = note: the type `PlainType<u32>` does not implement `Clone`, so calling `clone` on `&PlainType<u32>` copies the reference, which does not do anything and can be removed
    help: remove this redundant call
       |
    LL -     let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref.clone();
    LL +     let non_clone_type_ref_clone: &PlainType<u32> = non_clone_type_ref;
       |
    help: if you meant to clone `PlainType<u32>`, implement `Clone` for it
       |
    LL + #[derive(Clone)]
    LL | struct PlainType<T>(T);
       |
    ```
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    86727df View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#121476 - onur-ozkan:update-compiler-profile…

    …, r=compiler-errors
    
    remove `llvm.assertions=true` in compiler profile
    
    Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true` because we don't provide ci-llvm on the `rustc-alt-builds` server. Therefore, it is kept off by default.
    
    cc `@Nilstrieb` `@compiler-errors`
    
    For more context, see https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/CI.20LLVM.20for.20aarch64
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    977bbb4 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#121479 - lcnr:fix-generalize, r=compiler-er…

    …rors
    
    fix generalizer unsoundness
    
    I ended up getting confused while trying to flip the variances when flipping the order. Should be all right now.
    
    This is only exploitable when generalizing if the `ambient_variance` of the relation is `Contravariant`. This can currently only be the case in the NLL generalizer which only rarely generalizes, causing us to miss this regression. Very much an issue with rust-lang#121462 however.
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    7ae95b2 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#121480 - nnethercote:fix-more-121208-fallou…

    …t, r=lcnr
    
    Fix more rust-lang#121208 fallout
    
    rust-lang#121208 converted lots of delayed bugs to bugs. Unsurprisingly, there were a few invalid conversion found via fuzzing.
    
    r? `@lcnr`
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    5de3a4c View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#121482 - nnethercote:fix-121455, r=oli-obk

    Allow for a missing `adt_def` in `NamePrivacyVisitor`.
    
    This was caused by 72b172b in rust-lang#121206. That commit removed an early return from `analysis` when there are stashed errors. As a result, it's possible to reach privacy analysis when there are stashed errors, which means more code paths can be reached. One such code path was handled in that commit, where a `span_bug` was changed to a `span_delayed_bug`.
    
    This commit handles another such code path uncovered by fuzzing, in much the same way.
    
    Fixes rust-lang#121455.
    
    r? `@oli-obk`
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    52805b0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#121484 - Zalathar:this, r=oli-obk

    coverage: Use variable name `this` in `CoverageGraph::from_mir`
    
    A tiny little improvement, extracted from rust-lang#120013.
    
    This makes it easier to see that we're manipulating the instance that is being constructed, and is a lot less verbose than `basic_coverage_blocks`.
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    3f693a1 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#121487 - nnethercote:fix-121450, r=oli-obk

    Explicitly call `emit_stashed_diagnostics`.
    
    Commit 72b172b in rust-lang#121206 changed things so that
    `emit_stashed_diagnostics` is only called from `run_compiler`. But rustfmt doesn't use `run_compiler`, so it needs to call `emit_stashed_diagnostics` itself to avoid an abort in `DiagCtxtInner::drop` when stashed diagnostics occur.
    
    Fixes rust-lang#121450.
    
    r? `@oli-obk`
    matthiaskrgr authored Feb 23, 2024
    Configuration menu
    Copy the full SHA
    6ee43bc View commit details
    Browse the repository at this point in the history