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 5 pull requests #133551

Merged
merged 20 commits into from
Nov 28, 2024
Merged

Rollup of 5 pull requests #133551

merged 20 commits into from
Nov 28, 2024

Commits on Nov 9, 2024

  1. Let make_input immediately report an error for multiple input filenames

    This allows simplifying the call site and make_input by using a single
    match instead of two levels of if's.
    bjorn3 committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    8fbe046 View commit details
    Browse the repository at this point in the history
  2. Don't mutably borrow GlobalCtxt in QueryResult::enter

    This allows re-entrant entering of the GlobalCtxt
    bjorn3 committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    bec24a2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e9bbc8 View commit details
    Browse the repository at this point in the history
  4. Reduce the amount of GlobalCtxt::enter calls in the driver

    We now only exit the GlobalCtxt when calling a callback and all the way
    at the end when the GlobalCtxt is about to be destroyed.
    bjorn3 committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    1eece74 View commit details
    Browse the repository at this point in the history
  5. Pass TyCtxt instead of Queries to the after_analysis callbacks

    There is no other query that may need to be called at that point anyway.
    bjorn3 committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    3b02a33 View commit details
    Browse the repository at this point in the history
  6. Deprecate the after_crate_root_parsing callback

    Several custom drivers are incorrectly calling queries.global_ctxt()
    from inside of it, which causes some driver code to be skipped. As such
    I would like to either remove it in the future or if custom drivers
    still need it, change it to accept an &rustc_ast::Crate instead.
    bjorn3 committed Nov 9, 2024
    Configuration menu
    Copy the full SHA
    159ba4c View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2024

  1. coverage: Ignore functions that end up having no mappings

    A used function with no mappings has historically indicated a bug, but that
    will no longer be the case after moving some fallible span-processing steps
    into codegen.
    Zalathar committed Nov 24, 2024
    Configuration menu
    Copy the full SHA
    619a272 View commit details
    Browse the repository at this point in the history
  2. coverage: Rename some FFI fields from span to cov_span

    This will avoid confusion with actual `Span` spans.
    Zalathar committed Nov 24, 2024
    Configuration menu
    Copy the full SHA
    87fe7de View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b9fb1a6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2748009 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2024

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

Commits on Nov 27, 2024

  1. Configuration menu
    Copy the full SHA
    72cd7ac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    48b2bbd View commit details
    Browse the repository at this point in the history
  3. Bless tests due to extra error reporting due to normalizing types tha…

    …t are not WF
    
    It's okay though b/c these are duplicated diagnostics.
    compiler-errors committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    4c0ea55 View commit details
    Browse the repository at this point in the history
  4. Fix review comment

    bjorn3 committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    dc65c63 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#132410 - bjorn3:yet_another_driver_refactor…

    …_round, r=cjgillot
    
    Some more refactorings towards removing driver queries
    
    Follow up to rust-lang#127184
    
    ## Custom driver breaking change
    
    The `after_analysis` callback is changed to accept `TyCtxt` instead of `Queries`. The only safe query in `Queries` to call at this point is `global_ctxt()` which allows you to enter the `TyCtxt` either way. To fix your custom driver, replace the `queries: &'tcx Queries<'tcx>` argument with `tcx: TyCtxt<'tcx>` and remove your `queries.global_ctxt().unwrap().enter(|tcx| { ... })` call and only keep the contents of the closure.
    
    ## Custom driver deprecation
    
    The `after_crate_root_parsing` callback is now deprecated. Several custom drivers are incorrectly calling `queries.global_ctxt()` from inside of it, which causes some driver code to be skipped. As such I would like to either remove it in the future or if custom drivers still need it, change it to accept an `&rustc_ast::Crate` instead.
    matthiaskrgr authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    af1ca15 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#133418 - Zalathar:spans, r=jieyouxu

    coverage: Store coverage source regions as `Span` until codegen
    
    Historically, coverage spans were converted into line/column coordinates during the MIR instrumentation pass.
    
    This PR moves that conversion step into codegen, so that coverage spans spend most of their time stored as `Span` instead.
    
    In addition to being conceptually nicer, this also reduces the size of coverage mappings in MIR, because `Span` is smaller than 4x u32.
    
    ---
    
    There should be no changes to coverage output.
    matthiaskrgr authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    adf9b5f View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#133498 - GuillaumeGomez:missing-examples, r…

    …=joboet
    
    Add missing code examples on `LocalKey`
    
    r? ``@Amanieu``
    matthiaskrgr authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    a8b690f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#133518 - compiler-errors:structurally-resol…

    …ve-never, r=lcnr
    
    Structurally resolve before checking `!` in HIR typeck
    
    Some more missing structural resolves in HIR typeck :>
    
    r? lcnr
    matthiaskrgr authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    5d0ee56 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#133521 - compiler-errors:structurally-resol…

    …ve-cat-proj, r=lcnr
    
    Structurally resolve before matching on type of projection
    
    Another missing structural resolve in closure upvar analysis. I think it's better to place the normalization here rather than trying to guarantee that all types returned by the expr use visitor are structurally normalized, which I don't think we do now. Thoughts?
    
    r? lcnr
    matthiaskrgr authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    5fc4f85 View commit details
    Browse the repository at this point in the history