Commit Graph

33773 Commits

Author SHA1 Message Date
Nicholas Nethercote
541d7cc65c Rename AddToDiagnostic as Subdiagnostic.
To match `derive(Subdiagnostic)`.

Also rename `add_to_diagnostic{,_with}` as `add_to_diag{,_with}`.
2024-03-11 10:04:49 +11:00
Nicholas Nethercote
7a294e998b Rename IntoDiagnostic as Diagnostic.
To match `derive(Diagnostic)`.

Also rename `into_diagnostic` as `into_diag`.
2024-03-11 09:15:09 +11:00
Nicholas Nethercote
a09b1d33a7 Rename IntoDiagnosticArg as IntoDiagArg.
Also rename `into_diagnostic_arg` as `into_diag_arg`, and
`NotIntoDiagnosticArg` as `NotInotDiagArg`.
2024-03-11 09:12:19 +11:00
Nicholas Nethercote
256d802233 Remove unused impls from some subdiagnostics. 2024-03-11 09:08:33 +11:00
Nicholas Nethercote
4e38ef9e1a Remove unused impls for some diagnostics. 2024-03-11 09:08:29 +11:00
Nicholas Nethercote
567744c10e Remove Default derive from MacroExpectedFound.
It's the only diagnostic in the entire project that impls `Default`, and
the code is clearer without it.
2024-03-11 08:52:50 +11:00
Matthias Krüger
9d03046a81
Rollup merge of #122271 - pitaj:diag_items-legacy_numeric_constants, r=Nilstrieb
Fix legacy numeric constant diag items

- missed syms for usize/isize
- missed diag items on unsigned integers

For rust-lang/rust-clippy#12312

r? ```@Nilstrieb```

Follow-up to #121272, #121361, #121667
This should be the last one 🤞 Sorry!
2024-03-10 10:58:20 +01:00
Matthias Krüger
163573a368
Rollup merge of #122221 - Nadrieril:patextradata, r=oli-obk
match lowering: define a convenient struct

Small refactor PR: `bindings` and `ascriptions` always come together so I made a struct for them. I'll have one or two fields to add to it in a later PR as well.
2024-03-10 10:58:18 +01:00
Matthias Krüger
fdcd05178d
Rollup merge of #121860 - mu001999:master, r=Nilstrieb
Add a tidy check that checks whether the fluent slugs only appear once

As ``````@Nilstrieb`````` said in https://github.com/rust-lang/rust/pull/121828#issuecomment-1972622855:
> Might make sense to have a tidy check that checks whether the fluent slugs only appear once in the source code and lint for that
there's a tidy check already for sorting

We can get the tidy check error:
```
tidy check
tidy error: /path/to/rust/compiler/rustc_const_eval/messages.ftl: message `const_eval_invalid_align` is not used
tidy error: /path/to/rust/compiler/rustc_lint/messages.ftl: message `lint_trivial_untranslatable_diag` is not used
tidy error: /path/to/rust/compiler/rustc_parse/messages.ftl: message `parse_invalid_literal_suffix` is not used
tidy error: /path/to/rust/compiler/rustc_infer/messages.ftl: message `infer_need_type_info_in_coroutine` is not used
tidy error: /path/to/rust/compiler/rustc_passes/messages.ftl: message `passes_expr_not_allowed_in_context` is not used
tidy error: /path/to/rust/compiler/rustc_passes/messages.ftl: message `passes_layout` is not used
tidy error: /path/to/rust/compiler/rustc_parse/messages.ftl: message `parse_not_supported` is not used
```

r? ``````@Nilstrieb``````
2024-03-10 10:58:16 +01:00
Peter Jaszkowiak
83590ac069 fix legacy numeric constant diag items
- missed syms for usize/isize
- missed diag items on unsigned integers
2024-03-09 23:33:27 -07:00
bors
094a6204f5 Auto merge of #122064 - Zoxc:dep-graph-encode-tweaks, r=cjgillot
Dep node encoding cleanups

This does some cleanups around dep node encoding.

Performance change with `-Zthreads=2`:

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Memory</td><td align="right">Memory</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check:unchanged</td><td align="right">0.4337s</td><td align="right">0.4306s</td><td align="right"> -0.72%</td><td align="right">88.90 MiB</td><td align="right">89.04 MiB</td><td align="right"> 0.15%</td></tr><tr><td>🟣 <b>hyper</b>:check:unchanged</td><td align="right">0.1541s</td><td align="right">0.1528s</td><td align="right"> -0.86%</td><td align="right">51.99 MiB</td><td align="right">52.03 MiB</td><td align="right"> 0.07%</td></tr><tr><td>🟣 <b>regex</b>:check:unchanged</td><td align="right">0.3286s</td><td align="right">0.3248s</td><td align="right">💚  -1.15%</td><td align="right">71.89 MiB</td><td align="right">71.74 MiB</td><td align="right"> -0.21%</td></tr><tr><td>🟣 <b>syn</b>:check:unchanged</td><td align="right">0.6118s</td><td align="right">0.6057s</td><td align="right">💚  -1.01%</td><td align="right">106.59 MiB</td><td align="right">106.66 MiB</td><td align="right"> 0.06%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:unchanged</td><td align="right">1.4570s</td><td align="right">1.4463s</td><td align="right"> -0.74%</td><td align="right">197.29 MiB</td><td align="right">197.33 MiB</td><td align="right"> 0.02%</td></tr><tr><td>Total</td><td align="right">2.9852s</td><td align="right">2.9601s</td><td align="right"> -0.84%</td><td align="right">516.66 MiB</td><td align="right">516.80 MiB</td><td align="right"> 0.03%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9911s</td><td align="right"> -0.89%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.02%</td></tr></table>

r? `@cjgillot`
2024-03-10 06:27:41 +00:00
bors
5bc7b9ac8a Auto merge of #122042 - GuillaumeGomez:subtree-update_cg_gcc_2024-03-05, r=MarkSimulacrum
Subtree update cg gcc 2024 03 05

Reopening of #121390.

r? `@ghost`
2024-03-10 03:40:32 +00:00
bors
768408af12 Auto merge of #121662 - saethlin:precondition-unification, r=RalfJung
Distinguish between library and lang UB in assert_unsafe_precondition

As described in https://github.com/rust-lang/rust/pull/121583#issuecomment-1963168186, `assert_unsafe_precondition` now explicitly distinguishes between language UB (conditions we explicitly optimize on) and library UB (things we document you shouldn't do, and maybe some library internals assume you don't do).

`debug_assert_nounwind` was originally added to avoid the "only at runtime" aspect of `assert_unsafe_precondition`. Since then the difference between the macros has gotten muddied. This totally revamps the situation.

Now _all_ preconditions shall be checked with `assert_unsafe_precondition`. If you have a precondition that's only checkable at runtime, do a `const_eval_select` hack, as done in this PR.

r? RalfJung
2024-03-10 01:23:54 +00:00
Guillaume Gomez
1d058a0b06 Fix cg_gcc merge 2024-03-10 01:01:52 +01:00
Guillaume Boisseau
bc3bc2ba6b
Rollup merge of #121584 - klensy:itertools-up, r=Mark-Simulacrum
bump itertools to 0.12

still depend on 0.11 (temporary dupes version):
* <del>clippy</del>, https://github.com/rust-lang/rust-clippy/pull/12346
* rustfmt, sigh, https://github.com/rust-lang/rustfmt/pull/6093

https://github.com/rust-itertools/itertools/blob/v0.12.1/CHANGELOG.md

removed unused `derive_more` dep from `rustc_middle`
2024-03-09 21:40:08 +01:00
Guillaume Gomez
2b5b43eeb9 Merge remote-tracking branch 'upstream/master' into HEAD 2024-03-09 18:04:39 +01:00
Ben Kimock
27cf4bb985
Only enable library UB checks in const-eval/Miri when debug_assertions are enabled
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-03-09 11:34:15 -05:00
Matthias Krüger
7193ce0061
Rollup merge of #122237 - fee1-dead-contrib:rmord, r=compiler-errors
Remove `Ord` from `ClosureKind`

Using `Ord` to accomplish a meaning of subset relationship can be hard to read. The existing uses for that are easily replaced with a `match`, and in my opinion, more readable without needing to resorting to comments to explain the intention.

cc `@compiler-errors`
2024-03-09 16:21:21 +01:00
Matthias Krüger
b14e8054af
Rollup merge of #122233 - RalfJung:custom-alloc-box, r=oli-obk
miri: do not apply aliasing restrictions to Box with custom allocator

This is the Miri side of https://github.com/rust-lang/rust/pull/122018. The "intrinsics with body" made this much more pleasant. :)

Fixes https://github.com/rust-lang/miri/issues/3341.
r? `@oli-obk`
2024-03-09 16:21:20 +01:00
Matthias Krüger
2894585f7e
Rollup merge of #122223 - Jarcho:visit_fix, r=oli-obk
Fix typo in `VisitorResult`

r? ```@oli-obk```
2024-03-09 16:21:19 +01:00
Matthias Krüger
dc7a9f6c7f
Rollup merge of #122215 - Zoxc:cycle-detect-names, r=oli-obk
Some tweaks to the parallel query cycle handler

This renames `deadlock` to `break_query_cycles`. The abort logic is moved next to the thread spawning and gives the thread a name.

Fixes https://github.com/rust-lang/rust/issues/122035.

r? ```@oli-obk```
2024-03-09 16:21:18 +01:00
Matthias Krüger
9ac5cc86d7
Rollup merge of #122187 - bjorn3:merge_header_version_checks, r=petrochenkov
Move metadata header and version checks together

This will make it easier to report rustc versions for older metadata formats.

Split out of https://github.com/rust-lang/rust/pull/120855
2024-03-09 16:21:17 +01:00
Matthias Krüger
985befe036
Rollup merge of #122160 - jieyouxu:eager-translate-help-use-latest-edition, r=cjgillot
Eagerly translate `HelpUseLatestEdition` in parser diagnostics

Fixes #122130.

This makes me suspicious of these other two usage of  `add_to_diagnostic()`. Would they *also* crash? I haven't attempted to construct test cases for them.

```
compiler/rustc_parse/src/parser/expr.rs
3453:            errors::HelpUseLatestEdition::new().add_to_diagnostic(e);

compiler/rustc_hir_typeck/src/expr.rs
2603:            HelpUseLatestEdition::new().add_to_diagnostic(&mut err);
```

This also seems like a footgun?
2024-03-09 16:21:16 +01:00
Matthias Krüger
a979f971b4
Rollup merge of #121813 - Urgau:misc-non_local_defs-lint, r=cjgillot
Misc improvements to non local defs lint implementation

This PR is a collection of small improvements I found when I [needlessly tried](https://www.github.com/rust-lang/rust/pull/120393#issuecomment-1971787475) to fix a "perf-regression" in the lint implementation.

I recommend looking at each commit individually.
2024-03-09 16:21:15 +01:00
Nadrieril
594cf1de61 review 2024-03-09 15:28:26 +01:00
Deadbeef
7e1969ac13 Remove Ord from ClosureKind
Using `Ord` to accomplish a meaning of subset relationship
can be hard to read. The existing uses for that are easily
replaced with a `match`, and in my opinion, more readable
without needing to resorting to comments to explain the
intention.
2024-03-09 21:16:43 +08:00
Ralf Jung
e632e3f9a5 miri: do not apply aliasing restrictions to Box with custom allocator 2024-03-09 13:08:55 +01:00
bors
b054da8155 Auto merge of #122150 - ShoyuVanilla:replace-typewalker, r=lcnr
Replace `TypeWalker` usage with `TypeVisitor` in `wf.rs`

Resolves #121693
2024-03-09 12:02:25 +00:00
bors
9d272a1b05 Auto merge of #122102 - Urgau:optimize-symbol-integer, r=cjgillot
Optimize `Symbol::integer` by utilizing in-place formatting

This PR optimize `Symbol::integer` by utilizing `itoa` in-place formatting instead of going through a dynamically allocated `String` and the format machinery.

<details>

For some context: I was profiling `rustc --check-cfg` with callgrind and due to the way we currently setup all the targets and we end-up calling `Symbol::integer` multiple times for all the targets. Using `itoa` reduced the number of instructions.

</details>
2024-03-09 08:47:57 +00:00
Jason Newcomb
564837e23d Fix typo in VisitorResult 2024-03-08 23:20:29 -05:00
bors
1b427b3bf7 Auto merge of #118879 - Nadrieril:lint-range-gap, r=estebank
Lint singleton gaps after exclusive ranges

In the discussion to stabilize exclusive range patterns (https://github.com/rust-lang/rust/issues/37854), it has often come up that they're likely to cause off-by-one mistakes. We already have the `overlapping_range_endpoints` lint, so I [proposed](https://github.com/rust-lang/rust/issues/37854#issuecomment-1845580712) a lint to catch the complementary mistake.

This PR adds a new `non_contiguous_range_endpoints` lint that catches likely off-by-one errors with exclusive range patterns. Here's the idea (see the test file for more examples):
```rust
match x {
    0..10 => ..., // WARN: this range doesn't match `10_u8` because `..` is an exclusive range
    11..20 => ..., // this could appear to continue range `0_u8..10_u8`, but `10_u8` isn't matched by either of them
    _ => ...,
}
// help: use an inclusive range instead: `0_u8..=10_u8`
```

More precisely: for any exclusive range `lo..hi`, if `hi+1` is matched by another range but `hi` isn't, we suggest writing an inclusive range `lo..=hi` instead. We also catch `lo..T::MAX`.
2024-03-09 03:49:01 +00:00
Nadrieril
7843e46f17 Factor out non-branch-related pattern data 2024-03-09 03:51:30 +01:00
bors
4d4bb491b6 Auto merge of #122010 - oli-obk:intrinsics3.0, r=pnkfelix
Avoid invoking the `intrinsic` query for DefKinds other than `Fn` or `AssocFn`

fixes the perf regression from https://github.com/rust-lang/rust/pull/120675 by only invoking (and thus inserting into the dep graph) the `intrinsic` query if the `DefKind` matches items that can actually be intrinsics
2024-03-09 01:18:13 +00:00
Nadrieril
8ac9a04257 Lint small gaps between ranges 2024-03-09 01:14:22 +01:00
Nadrieril
77f679430c Declare new lint 2024-03-09 01:13:42 +01:00
Nadrieril
a047284b5a Make MaybeInfiniteInt::plus_one/minus_one fallible 2024-03-09 01:13:42 +01:00
Ben Kimock
5a93a59fd5 Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00
John Kåre Alsaker
87ab9e8c6e Some tweaks to the parallel query cycle handler 2024-03-09 00:24:14 +01:00
bors
01d73d4041 Auto merge of #122208 - bjorn3:sync_cg_clif-2024-03-08, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlight this time is a bunch of new vendor intrinsics. Cranelift has also been updated to 0.105. And there were a bunch of big-endian fixes.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2024-03-08 22:49:31 +00:00
bjorn3
8fb8b08716 Merge commit '54cbb6e7531f95e086d5c3dd0d5e73bfbe3545ba' into sync_cg_clif-2024-03-08 2024-03-08 20:41:29 +00:00
Matthias Krüger
b61edb9544
Rollup merge of #122198 - beetrees:no-llvm-14, r=cuviper
Remove handling for previously dropped LLVM version

LLVM 14 support was dropped in #114148, so this LLVM version check is no longer required.
2024-03-08 21:02:04 +01:00
Matthias Krüger
bf939fcb99
Rollup merge of #122197 - lcnr:proof-tree-braces, r=BoxyUwU
inspect formatter: add braces

This makes it easier to hide subtrees when looking through proof trees. Looking at the proof tree for `usize: Clone`:

nightly:
```
ROOT GOAL: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }
    GOAL: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[8e4b]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] }
    REVISION 0
        INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[8e4b]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }
        ROOT RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] })
            CANDIDATE Impl(DefId(2:30665 ~ core[a9f5]::clone::impls::{impl#5})): Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] })
                TRY_EVALUATE_ADDED_GOALS: Ok(Yes)
                ITERATION 0
            CANDIDATE constituent tys: Err(NoSolution)
            NORMALIZING SELF TY FOR ASSEMBLY:
            NORMALIZING SELF TY FOR ASSEMBLY:
    RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] })
```

with this PR:
```
ROOT GOAL: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } } {
    GOAL: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[4f74]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] }
    REVISION 0: {
        INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<usize as std::clone::Clone>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing } }, anchor: Bind(DefId(0:5 ~ main[4f74]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }
        ROOT RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) {
            CANDIDATE Impl(DefId(2:30468 ~ core[d1d7]::clone::impls::{impl#5})): Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) {
                TRY_EVALUATE_ADDED_GOALS: Ok(Yes)
                ITERATION 0 {}
            }
            CANDIDATE constituent tys: Err(NoSolution) {}
            NORMALIZING SELF TY FOR ASSEMBLY: {}
            NORMALIZING SELF TY FOR ASSEMBLY: {}
        }
    }
    RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] })
}
```

r? `@BoxyUwU`
2024-03-08 21:02:03 +01:00
Matthias Krüger
02b89d1676
Rollup merge of #122172 - compiler-errors:rpitit-collect-ice, r=fmease
Don't ICE if we collect no RPITITs unless there are no unification errors

Move an assertion in `collect_return_position_impl_trait_in_trait_tys` to after the `ObligationCtxt::eq` calls, so that we only assert and ICE if we have unification errors.

Fixes #121468
2024-03-08 21:02:03 +01:00
Matthias Krüger
2b6ae95d3f
Rollup merge of #122164 - beetrees:uefi-argv-align, r=workingjubilee
Fix misaligned loads when loading UEFI arg pointers

Currently, the two UEFI argument pointers are stored in an `alloca` of alignment 1, a pointer to which is then passed as `argv`. However, [the library code](9c3ad802d9/library/std/src/sys/pal/uefi/mod.rs (L60-L61)) treats `argv` as a pointer to an array of pointers and dereferences it as such, meaning that it presumes the `alloca` is aligned to at least the alignment of a pointer. This PR fixes this mismatch by aligning the `alloca` to the alignment of a pointer.

This PR also changed the `gep` to use the new `inbounds_ptradd` method.
2024-03-08 21:02:01 +01:00
Matthias Krüger
b9a3952479
Rollup merge of #122157 - dpaoliello:targetdesc, r=Nilstrieb
Add the new description field to Target::to_json, and add descriptions for some MSVC targets

The original PR to add a `description` field to `Target` (<https://github.com/rust-lang/rust/pull/121905>) didn't add the field to `Target::to_json`, which meant that the `check_consistency` testwould fail if you tried to set a description as it wouldn't survive round-tripping via JSON: https://github.com/rust-lang/rust/actions/runs/8180997936/job/22370052535#step:27:4967

This change adds the field to `Target::to_json`, and sets some descriptions to verify that it works correctly.
2024-03-08 21:02:01 +01:00
Matthias Krüger
e76bd6214f
Rollup merge of #122100 - compiler-errors:better-capture, r=oli-obk
Better comment for implicit captures in RPITIT

Improve the error message for implicit captures. Also always set E0657.

r? oli-obk
2024-03-08 21:02:00 +01:00
Matthias Krüger
2c3ca0931d
Rollup merge of #122076 - WaffleLapkin:mplace-args, r=RalfJung
Tweak the way we protect in-place function arguments in interpreters

Use `MPlaceTy` instead of `PlaceTy` in `FnArg` and ignore (copy) locals in an earlier step ("Locals that don't have their address taken are as protected as they can ever be").

This seems to be crucial for tail call support (as they can't refer to caller's locals which are killed when replacing the stack frame).

r? `@RalfJung`
cc `@oli-obk`
see https://github.com/rust-lang/rust/pull/121273#issuecomment-1980210690
2024-03-08 21:02:00 +01:00
Michael Goulet
ffd30e0a69 Improve error message for opaque captures 2024-03-08 19:08:13 +00:00
Daniel Paoliello
d6b597b786 Add the new description field to Target::to_json, and add descriptions for some MSVC targets 2024-03-08 09:57:20 -08:00
bors
a655e648a9 Auto merge of #122190 - matthiaskrgr:rollup-9ol4y30, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #121025 (add known-bug tests for derive failure to detect packed repr)
 - #121194 (Refactor pre-getopts command line argument handling)
 - #121563 (Use `ControlFlow` in visitors.)
 - #122173 (Don't ICE in CTFE if raw/fn-ptr types differ)
 - #122175 (Bless tidy issues order)
 - #122179 (rustc: Fix typo)
 - #122181 (Fix crash in internal late lint checking)
 - #122183 (interpret: update comment about read_discriminant on uninhabited variants)

Failed merges:

 - #122076 (Tweak the way we protect in-place function arguments in interpreters)
 - #122132 (Diagnostic renaming 3)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-08 17:31:00 +00:00