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

Closed
wants to merge 28 commits into from

Commits on Dec 20, 2023

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

Commits on Dec 28, 2023

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

Commits on Dec 29, 2023

  1. Allow emitting diagnostics from the #[diagnostic] namespace without a

    nightly feature
    
    (Using this attribute still requires a nightly feature, this just
    enables that this feature does not need to be enabled on the child crate
    as well)
    weiznich committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    3ab43e5 View commit details
    Browse the repository at this point in the history
  2. Replace some usage of #[rustc_on_unimplemented] with

    `#[diagnostic::on_unimplemented]`
    
    This commit replaces those `#[rustc_on_unimplemented]` attributes with
    their equivalent `#[diagnostic::on_unimplemented]` where this is
    supported (So no filter or any extended option)
    weiznich committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    cd9425b View commit details
    Browse the repository at this point in the history
  3. Add a test that emitting diagnostics does not require the crate to use

    the corresponding feature.
    weiznich committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    eabf4df View commit details
    Browse the repository at this point in the history
  4. Fix a rustdoc test

    weiznich committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    cc31adc View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

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

Commits on Jan 3, 2024

  1. Rename some Diagnostic setters.

    `Diagnostic` has 40 methods that return `&mut Self` and could be
    considered setters. Four of them have a `set_` prefix. This doesn't seem
    necessary for a type that implements the builder pattern. This commit
    removes the `set_` prefixes on those four methods.
    nnethercote committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    505c137 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5fe5d5d View commit details
    Browse the repository at this point in the history
  3. Remove forward for downgrade_to_delayed_bug.

    It's not used, and doesn't quite fit the general pattern.
    
    Also, `Diagnostic::downgrade_to_delayed_bug` doesn't need to return
    `&mut Self` for the same reason.
    nnethercote committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    096b844 View commit details
    Browse the repository at this point in the history
  4. Fix up forward! decls.

    - Move comments onto corresponding `Diagnostic` methods.
    - Make formatting more consistent.
    nnethercote committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    caefa55 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b4a6239 View commit details
    Browse the repository at this point in the history
  6. Remove unused DiagnosticBuilder::struct_almost_fatal.

    `create_almost_fatal` and `emit_almost_fatal` are always used instead.
    nnethercote committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    1e92223 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2024

  1. Avoid some rustc_errors:: qualifiers.

    These are misleading, because the mixture of `Level` and
    `rustc_errors::Level` makes it look like there are two different types
    involved.
    nnethercote committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    9560c58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d35981 View commit details
    Browse the repository at this point in the history
  3. Inline and remove StringReader::struct_fatal_span_char.

    It has a single call site.
    nnethercote committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    8e6bca6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1d48f69 View commit details
    Browse the repository at this point in the history
  5. Remove is_lint field from Level::Error.

    Because it's redundant w.r.t. `Diagnostic::is_lint`, which is present
    for every diagnostic level.
    
    `struct_lint_level_impl` was the only place that set the `Error` field
    to `true`, and it's also the only place that calls
    `Diagnostic::is_lint()` to set the `is_lint` field.
    nnethercote committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    8388112 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4bc3552 View commit details
    Browse the repository at this point in the history
  7. rustc_mir_transform: Make DestinationPropagation stable for queries

    By using FxIndexMap instead of FxHashMap, so that the order of visiting
    of locals is deterministic.
    
    We also need to bless
    copy_propagation_arg.foo.DestinationPropagation.panic*.diff. Do not
    review the diff of the diff. Instead look at the diff file before and
    after this commit. Both before and after this commit, 3 statements are
    replaced with nop. It's just that due to change in ordering, different
    statements are replaced. But the net result is the same.
    Enselic committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    f603bab View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Rollup merge of rust-lang#118680 - djkoloski:shell_argfiles, r=compil…

    …er-errors
    
    Add support for shell argfiles
    
    Closes rust-lang/compiler-team#684
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    9065e4b View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#119151 - Jules-Bertholet:no-foreign-doc-hid…

    …den-suggest, r=davidtwco
    
    Hide foreign `#[doc(hidden)]` paths in import suggestions
    
    Stops the compiler from suggesting to import foreign `#[doc(hidden)]` paths.
    
    ``@rustbot`` label A-suggestion-diagnostics
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    33d1c50 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#119216 - weiznich:use_diagnostic_namespace_…

    …in_stdlib, r=compiler-errors
    
    Use diagnostic namespace in stdlib
    
    This required a minor fix to have the diagnostics shown in third party crates when the `diagnostic_namespace` feature is not enabled. See rust-lang@5d63f5d for details. I've opted for having a single PR for both changes as it's really not that much code. If it is required it should be easy to split up the change into several PR's.
    
    r? `@compiler-errors`
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    b4f4983 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#119350 - fmease:lazy-ty-aliases-implied-bou…

    …nds, r=compiler-errors
    
    Imply outlives-bounds on lazy type aliases
    
    Fixes rust-lang#118479.
    
    r? types
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    2cf6067 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#119538 - nnethercote:cleanup-errors-5, r=co…

    …mpiler-errors
    
    Cleanup error handlers: round 5
    
    More rustc_errors cleanups. A sequel to rust-lang#119171.
    
    r? `@compiler-errors`
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    cf4cd93 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#119563 - compiler-errors:coroutine-resume, …

    …r=oli-obk
    
    Check yield terminator's resume type in borrowck
    
    In borrowck, we didn't check that the lifetimes of the `TerminatorKind::Yield`'s `resume_place` were actually compatible with the coroutine's signature. That means that the lifetimes were totally going unchecked. Whoops!
    
    This PR implements this checking.
    
    Fixes rust-lang#119564
    
    r? types
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    5cf7bbe View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#119589 - petrochenkov:cdatalock, r=Mark-Sim…

    …ulacrum
    
    cstore: Remove unnecessary locking from `CrateMetadata`
    
    Locks and atomics in `CrateMetadata` fields were necessary before rust-lang#107765 when `CStore` was cloneable, but now they are not necessary and can be removed after restructuring the code a bit to please borrow checker.
    
    All remaining locked fields in `CrateMetadata` are lazily populated caches.
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    2e1bdea View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#119591 - Enselic:DestinationPropagation-sta…

    …ble, r=cjgillot
    
    rustc_mir_transform: Make DestinationPropagation stable for queries
    
    By using `FxIndexMap` instead of `FxHashMap`, so that the order of visiting of locals is deterministic.
    
    We also need to bless
    `copy_propagation_arg.foo.DestinationPropagation.panic*.diff`. Do not review the diff of the diff. Instead look at the diff files before and after this commit. Both before and after this commit, 3 statements are replaced with nop. It's just that due to change in ordering, different statements are replaced. But the net result is the same. In other words, compare this diff (before fix):
    * https://github.com/rust-lang/rust/blob/090d5eac722000906cc00d991f2bf052b0e388c3/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff
    
    With this diff (after fix):
    * https://github.com/rust-lang/rust/blob/f603babd63a607e155609dc0277806e559626ea0/tests/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.panic-unwind.diff
    
    and you can see that both before and after the fix, we replace 3 statements with `nop`s.
    
    I find it _slightly_ surprising that the test this PR affects did not previously fail spuriously due to the indeterminism of `FxHashMap`, but I guess in can be explained with the predictability of small `FxHashMap`s with `usize` (`Local`) keys, or something along those lines.
    
    This should fix [this](rust-lang#119252 (comment)) comment, but I wanted to make a separate PR for this fix for a simpler development and review process.
    
    Part of rust-lang#84447 which is E-help-wanted.
    
    r? `@cjgillot` who is reviewer for the highly related PR rust-lang#119252.
    matthiaskrgr committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    e147a1b View commit details
    Browse the repository at this point in the history