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 9 pull requests #122457

Closed
wants to merge 37 commits into from

Commits on Mar 1, 2024

  1. Give TRACK_DIAGNOSTIC a return value.

    This means `DiagCtxtInner::emit_diagnostic` can return its result
    directly, rather than having to modify a local variable.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    bf62d59 View commit details
    Browse the repository at this point in the history
  2. Inline and remove Level::get_diagnostic_id.

    It has a single call site, and this will enable subsequent refactorings.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    ecd3718 View commit details
    Browse the repository at this point in the history
  3. Move DelayedBug handling into the match.

    It results in a tiny bit of duplication (another
    `self.treat_next_err_as_bug()` condition) but I think it's worth it to
    get more code into the main `match`.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    272e60b View commit details
    Browse the repository at this point in the history
  4. Reorder has_future_breakage handling.

    This will enable additional refactorings.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    c81767e View commit details
    Browse the repository at this point in the history
  5. Move Expect/ForceWarning handling into the match.

    Note that `self.suppressed_expected_diag` is no longer set for
    `ForceWarning`, which is good. Nor is `TRACK_DIAGNOSTIC` called for
    `Allow`, which is also good.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    aec4bdb View commit details
    Browse the repository at this point in the history
  6. Add comments about TRACK_DIAGNOSTIC use.

    Also add an assertion for the levels allowed with `has_future_breakage`.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    a7d9262 View commit details
    Browse the repository at this point in the history
  7. Make the match in emit_diagnostic complete.

    This match is complex enough that it's a good idea to enumerate every
    variant.
    
    This also means `can_be_top_or_sub` can just be `can_be_subdiag`.
    nnethercote committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    7ef605b View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2024

  1. Add CStr::bytes iterator

    clarfonthey committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    15b71f4 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. Add methods to create constants

    I've been experimenting with transforming the StableMIR to instrument
    the code with potential UB checks. The modified body will only
    be used by our analysis tool, however, constants in StableMIR must be
    backed by rustc constants. Thus, I'm adding a few functions to build
    constants, such as building string and other primitives.
    celinval committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    c076509 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    893a910 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a38a556 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Various style improvements to rustc_lint::levels

    - Replace some nested if-let with let-chains
    - Tweak a match pattern to allow shorthand struct syntax
    - Fuse an `is_empty` check with getting the last element
    - Merge some common code that emits `MalformedAttribute` and continues
    - Format `"{tool}::{name}"` in a way that's consistent with other match arms
    - Replace if-let-else-panic with let-else
    - Use early-exit to flatten a method body
    Zalathar committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    f2fcfe8 View commit details
    Browse the repository at this point in the history
  2. CFI: Break tests into smaller files

    Break type metadata identifiers tests into smaller set of tests/files,
    and move CFI (and KCFI) tests to a cfi (and kcfi) subdirectory,
    rcvalle committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    bf71825 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90acda1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f10ebfe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    44b1f8a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    31fa142 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    71ef9e2 View commit details
    Browse the repository at this point in the history
  8. Move generate_stacktrace_from_stack away from InterpCx to avoid havin…

    …g to know the `Machine` type
    oli-obk committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    bd7580b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7aee665 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ffaf082 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    66a46bb View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    af59eec View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2a1a6fa View commit details
    Browse the repository at this point in the history
  14. Rename some things around validation error reporting to signal that i…

    …t is in fact about validation failures
    oli-obk committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    3393227 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b6312eb View commit details
    Browse the repository at this point in the history
  16. Make incremental sessions identity no longer depend on the crate name…

    …s provided by source code
    Zoxc committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    12cd322 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    514b274 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#104353 - clarfonthey:cstr-bytes-iter, r=cuv…

    …iper
    
    Add CStr::bytes iterator
    
    See rust-lang/libs-team#135 for an ACP.
    
    Since rust-lang/libs-team#134 was also accepted, this type is now `core::ffi::c_str::Bytes` instead of `core::ffi::CStrBytes`.
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    11e1f53 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#120699 - nnethercote:rm-useless-TRACK_DIAGN…

    …OSTIC-calls, r=oli-obk
    
    Document `TRACK_DIAGNOSTIC` calls.
    
    r? ```@cjgillot```
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    0eab80b View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#120943 - petrochenkov:somehir3, r=oli-obk

    Create some minimal HIR for associated opaque types
    
    `LocalDefId`s for opaque types in traits and impls are created after AST -> HIR lowering, so they don't have corresponding HIR and return their various properties through fed queries.
    
    In this PR I also feed some core HIR-related queries for these `LocalDefId`s (which happen to be HIR owners).
    As a result all `LocalDefId`s now have corresponding `HirId`s and HIR nodes, and "optional" methods like `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` can be removed.
    
    Follow up to rust-lang#120206.
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    f4e9710 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#121764 - Zoxc:incr-sess-no-source, r=oli-obk

    Make incremental sessions identity no longer depend on the crate names provided by source code
    
    This makes incremental sessions identity no longer depend on the crate names provided by source code, implementing
    rust-lang/compiler-team#726.
    
    r? ``@oli-obk``
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    e4d89a8 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#122375 - rcvalle:rust-cfi-break-tests-into-…

    …smaller-files, r=compiler-errors
    
    CFI: Break tests into smaller files
    
    Break type metadata identifiers tests into smaller set of tests/files, and move CFI (and KCFI) tests to a cfi (and kcfi) subdirectory,
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    0f8bae1 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#122397 - oli-obk:machine-read-hook2, r=Ralf…

    …Jung
    
    Various cleanups around the const eval query providers
    
    r? ```@RalfJung```
    
    after this, working on running validation before interning starts with swapping the order of two lines of code
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    c99ae2b View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#122405 - celinval:smir-new-const, r=oli-obk

    Add methods to create StableMIR constant
    
    I've been experimenting with transforming the StableMIR to instrument the code with potential UB checks.
    
    The modified body will only be used by our analysis tool, however, constants in StableMIR must be backed by rustc constants. Thus, I'm adding a few functions to build constants, such as building string and other primitives.
    
    One question I have is whether we should create a global allocation instead for strings.
    
    r? ``@oli-obk``
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    74f8248 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#122416 - Zalathar:levels, r=petrochenkov

    Various style improvements to `rustc_lint::levels`
    
    While reading this file, I noticed a few opportunities to make things a little nicer:
    
    - Replace some nested if-let with let-chains
    - Tweak a match pattern to allow shorthand struct syntax
    - Fuse an `is_empty` check with getting the last element
    - Merge some common code that emits `MalformedAttribute` and continues
    - Format `"{tool}::{name}"` in a way that's consistent with other match arms
    - Replace if-let-else-panic with let-else
    - Use early-exit to flatten a method body
    
    Some of these changes cause indentation churn, so ignoring whitespace is recommended.
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    f4d4443 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#122440 - RalfJung:required-consts, r=oli-obk

    const-eval: organize and extend tests for required-consts
    
    This includes some tests that are known-broken and hence disabled (due to rust-lang#107503).
    
    r? ``@oli-obk``
    matthiaskrgr authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    b76648f View commit details
    Browse the repository at this point in the history