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 4 pull requests #125136

Merged
merged 9 commits into from
May 15, 2024
Merged

Rollup of 4 pull requests #125136

merged 9 commits into from
May 15, 2024

Commits on May 10, 2024

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

Commits on May 14, 2024

  1. coverage: CoverageIdsInfo::mcdc_bitmap_bytes is never needed

    This code for recalculating `mcdc_bitmap_bytes` doesn't provide any benefit,
    because its result won't have changed from the value in `FunctionCoverageInfo`
    that was computed during the MIR instrumentation pass.
    Zalathar committed May 14, 2024
    Configuration menu
    Copy the full SHA
    bfadc3a View commit details
    Browse the repository at this point in the history
  2. coverage: Remove confusing comments from CoverageKind

    These comments appear to be inspired by the similar comments on
    `CounterIncrement` and `ExpressionUsed`. But those comments refer to specific
    simplification steps performed during coverage codegen, and there is no
    corresponding step for the MC/DC coverage statements.
    
    If these statements do not survive optimization, they will simply not
    participate in code generation, just like any other statement.
    Zalathar committed May 14, 2024
    Configuration menu
    Copy the full SHA
    c81be68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    18d7411 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Configuration menu
    Copy the full SHA
    75895f5 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#124990 - fmease:expand-weak-aliases-within-…

    …cts, r=compiler-errors
    
    Also expand weak alias tys inside consts inside `expand_weak_alias_tys`
    
    Ever since rust-lang#121344 has been merged, I couldn't let go of the fear that I might've slipped a tiny bug into rustc (:P).
    
    Checking the type flags of the `Const` is strictly more correct than only checking the ones of the `Const`'s `Ty`. I don't think it's possible to trigger an ICE rn (i.e., one of the two `bug!("unexpected weak alias type")` I added in branches where `expand_weak_alias_tys` should've expanded *all* weak alias tys) because presently const exprs aren't allowed to capture late-bound vars. To be future-proof however, we should iron this out.
    
    A possible reproducer would be the following if I'm not mistaken (currently fails to compile due to the aforementioned restriction):
    
    ```rs
    #![feature(lazy_type_alias, adt_const_params, generic_const_exprs)]
    
    type F = for<'a> fn(A<{ S::<Weak<'a>>(loop {}) }>) -> &'a ();
    
    type A<const N: S<Weak<'static>>> = ();
    
    #[derive(PartialEq, Eq, std::marker::ConstParamTy)]
    struct S<T>(T);
    
    type Weak<'a> = &'a ();
    ```
    
    Whether a late-bound region should actually be considered constrained by a const expr is a separate question — one which we don't need to answer until / unless we actually allow them in such contexts (probable answer: only inside the return exprs of a block but not inside the stmts).
    
    r? oli-obk (he's not available rn but that's fine) or types or compiler
    matthiaskrgr authored May 15, 2024
    Configuration menu
    Copy the full SHA
    03ff673 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#125108 - Zalathar:info-bitmap-bytes, r=nnet…

    …hercote
    
    coverage: `CoverageIdsInfo::mcdc_bitmap_bytes` is never needed
    
    This code for recalculating `mcdc_bitmap_bytes` in a query doesn't provide any benefit, because its result won't have changed from the value in `FunctionCoverageInfo` that was computed during the MIR instrumentation pass.
    
    Extracted from rust-lang#124571, to avoid having this held up by unrelated issues with condition count checks.
    
    `@rustbot` label +A-code-coverage
    matthiaskrgr authored May 15, 2024
    Configuration menu
    Copy the full SHA
    a8ff937 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#125132 - mejrs:diag, r=compiler-errors

    Add `on_unimplemented" typo suggestions
    matthiaskrgr authored May 15, 2024
    Configuration menu
    Copy the full SHA
    f7c2934 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#125135 - chenyukang:yukang-fix-116502, r=co…

    …mpiler-errors
    
    Fix the dedup error because of spans from suggestion
    
    Fixes rust-lang#116502
    
    I believe this kind of issue is supposed resolved by rust-lang#118057, but the `==` in `span` respect syntax context, here we should only care that they point to the same bytes of source text, so should use `source_equal`.
    matthiaskrgr authored May 15, 2024
    Configuration menu
    Copy the full SHA
    5f1a120 View commit details
    Browse the repository at this point in the history