Commit Graph

38448 Commits

Author SHA1 Message Date
Jacob Pratt
032bcbcc46 Rollup merge of #148146 - the8472:ci-use-extra-disk, r=marcoieni
CI: use alternative disks if available

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/148146)*

cleaning up disk space takes a lot of time, sometimes [30 minutes](https://github.com/rust-lang/rust/actions/runs/18817052904/job/53686898697)
2026-02-25 21:42:52 -05:00
bors
28e3ea56a8 Auto merge of #153026 - JonathanBrouwer:rollup-PAPpAYW, r=JonathanBrouwer
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#153007 (`rust-analyzer` subtree update)
 - rust-lang/rust#152670 (Simplify ThinLTO handling)
 - rust-lang/rust#152768 (Enable autodiff in ci for all major os)
 - rust-lang/rust#152908 (Enable rust.remap-debuginfo in the dist profile)
 - rust-lang/rust#152999 (Check importing `crate`/`$crate`/`super` after handling `self`)
 - rust-lang/rust#152003 (Reflection TypeId::trait_info_of)
 - rust-lang/rust#152976 (Revert relative paths for std links in rustc-docs)
 - rust-lang/rust#152985 (Port `#[feature]` to the new attribute system)
 - rust-lang/rust#152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - rust-lang/rust#152991 (fix interpreter tracing output)
 - rust-lang/rust#153004 (Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`)
 - rust-lang/rust#153008 (bootstrap.compiler.toml: update name of primary branch)
 - rust-lang/rust#153016 (Migration of `LintDiagnostic` - part 2)
 - rust-lang/rust#153020 (rustdoc: Improve sentence for documented empty impl blocks)

Failed merges:

 - rust-lang/rust#152988 (Port `#[register_tool]` to the new attribute system)
2026-02-24 03:43:46 +00:00
Jonathan Brouwer
873461831c Rollup merge of #153020 - GuillaumeGomez:improve-empty-impl-blocks-sentence, r=Urgau
rustdoc: Improve sentence for documented empty impl blocks

Part of rust-lang/rust#152874.

An impl block is not necessarily empty, so instead, better to precise that there are no **public** items.

r? @Urgau
2026-02-23 20:46:16 +01:00
Jonathan Brouwer
76fbafadcc Rollup merge of #153016 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer,Kivooeo
Migration of `LintDiagnostic` - part 2

Follow-up of https://github.com/rust-lang/rust/pull/152933.

More `LintDiagnostic` items being migrated to `Diagnostic`.

r? @JonathanBrouwer
2026-02-23 20:46:15 +01:00
Jonathan Brouwer
5c4f9095cd Rollup merge of #153008 - DanielEScherzer:patch-2, r=Zalathar
bootstrap.compiler.toml: update name of primary branch

Those building from the latest commit are building from `main`, not `master`
2026-02-23 20:46:15 +01:00
Jonathan Brouwer
18701fa010 Rollup merge of #153004 - Zalathar:tweak-modifiers, r=wesleywiser
Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`

This PR sorts the dummy items in the `modifiers` module, makes them non-pub to speed up find-all-references, and adds some extra explanation of what the dummy modifier items are for.

(These dummy items mostly just exist to carry documentation, and have no actual effect on compiler behaviour.)
2026-02-23 20:46:14 +01:00
Jonathan Brouwer
9b4164bfd0 Rollup merge of #152991 - RalfJung:interpret-step-trace, r=Kivooeo
fix interpreter tracing output

https://github.com/rust-lang/rust/pull/144708 accidentally changed the output of `MIRI_LOG=info <miri run>` in two ways:
- by adding `stmt=`/`terminator=` prefixes
- by changing the statement printing to be a verbose debug version instead of MIR pretty-printing

This fixes both of these:
- use explicit format strings to avoid the prefixes
- fix inconsistency in Debug impls for MIR types: now both TerminatorKind and StatementKind are pretty-printed, and Terminator and Statement just forward to the *Kind output
2026-02-23 20:46:14 +01:00
Jonathan Brouwer
223af3f579 Rollup merge of #152989 - JonathanBrouwer:rustc_inherit_overflow_checks, r=jdonszelmann
Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers

For https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163

r? @jdonszelmann
2026-02-23 20:46:13 +01:00
Jonathan Brouwer
5924302ae3 Rollup merge of #152985 - JonathanBrouwer:convert-feature, r=jdonszelmann
Port `#[feature]` to the new attribute system

Rebase of https://github.com/rust-lang/rust/pull/146652
2026-02-23 20:46:13 +01:00
Jonathan Brouwer
453b066cb8 Rollup merge of #152976 - arferreira:revert-relative-extern-paths, r=jieyouxu
Revert relative paths for std links in rustc-docs

Reverts rust-lang/rust#152243.

The relative path `../` passed via `--extern-html-root-url` produces broken links in compiler documentation. The path is wrong in both the published layout (`doc.rust-lang.org/nightly/nightly-rustc/` vs `doc.rust-lang.org/nightly/core/`) and local builds (`compiler-doc/` vs `doc/`).

This restores absolute URLs via `#[doc(html_root_url)]`.

Fixes rust-lang/rust#152917
Re-opens rust-lang/rust#151496

cc @eggyal
2026-02-23 20:46:12 +01:00
Jonathan Brouwer
feec59e8f7 Rollup merge of #152003 - 9SonSteroids:trait_info_of, r=oli-obk
Reflection TypeId::trait_info_of

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152003)*

This is for https://github.com/rust-lang/rust/issues/146922.

As https://github.com/rust-lang/rust/pull/151236 was requested to be remade by someone I implemented the functionality as `TypeId::trait_info_of` which additionally allows getting the vtable pointer to build `dyn` Objects in recursive reflection.

It allows checking if a TypeId implements a trait. Since this is my first PR feel free to tell me if there are any formal issues.
2026-02-23 20:46:11 +01:00
Jonathan Brouwer
41617cd988 Rollup merge of #152999 - mu001999-contrib:fix/152997, r=petrochenkov
Check importing `crate`/`$crate`/`super` after handling `self`

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

r? petrochenkov
2026-02-23 20:46:11 +01:00
Jonathan Brouwer
235a90f214 Rollup merge of #152908 - bjorn3:dist_profile_remap_debuginfo, r=Kobzol
Enable rust.remap-debuginfo in the dist profile

Anyone who distributes rustc almost certainly wants to enable this option. It is necessary for reproducibility and for a distributed rustc local paths are useless anyway. And finally it improves privacy if you distribute a local build.
2026-02-23 20:46:11 +01:00
Jonathan Brouwer
c53d562d29 Rollup merge of #152768 - ZuseZ4:autodiff-in-ci-for-all-os, r=Kobzol
Enable autodiff in ci for all major os

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152768)*

Follow-up attempt to https://github.com/rust-lang/rust/pull/140064 after moving autodiff to dlopen.
It covers Linux (x86_64+aarch64), MacOS (aarch64), Windows (mingw-llvm aarch64+x86_64)
The extra build time for Enzyme are 180.27s on our slowest runner (aarch64-apple).

The follow-up distribution via rustup probably still needs a small fix, see https://github.com/rust-lang/rust/pull/151063#issuecomment-3778937008

Placing the downloaded libEnzyme artifact on my local linux under `~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib` enables my nightly compiler to run autodiff.

r? @Kobzol

closes: https://github.com/rust-lang/rust/pull/140064
closes: https://github.com/rust-lang/rust/pull/151243
closes: https://github.com/rust-lang/rust/pull/151063
2026-02-23 20:46:10 +01:00
Jonathan Brouwer
739b49fe4c Rollup merge of #152670 - bjorn3:lto_refactors12, r=petrochenkov
Simplify ThinLTO handling

This reduces the amount of complexity around ThinLTO module buffers. It removes duplication between `ModuleBuffer` and `ThinBuffer` (the latter was also used for fat LTO in some cases), clarifies when and where the ThinLTO summary is used (only for `--emit thin-link-bitcode`, ThinLTO performed by rustc rebuilds the summary every time). This also enables a follow up cleanup to reduce code duplication between red, green and imported codegen units.

Part of https://github.com/rust-lang/compiler-team/issues/908
2026-02-23 20:46:10 +01:00
Jonathan Brouwer
b3d5959cf5 Rollup merge of #153007 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 05da4cf3c4.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-23 20:46:09 +01:00
bors
61e7ff7fb2 Auto merge of #152791 - nnethercote:rm-const-FLAGS, r=Zalathar
Remove `const FLAGS`.

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152791)*

The performance wins provided by these types are meagre, and I don't think they justify the code complexity they introduce.

r? @Zalathar
2026-02-23 19:11:54 +00:00
Laurențiu Nicola
05da4cf3c4 Merge pull request #21694 from rust-lang/rustc-pull
minor: Rustc pull update
2026-02-23 07:04:48 +00:00
The rustc-josh-sync Cronjob Bot
2ee47149d1 Merge ref 'c78a29473a68' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@c78a29473a
Filtered ref: rust-lang/rust-analyzer@d21f4bf288
Upstream diff: 139651428d...c78a29473a

This merge was created using https://github.com/rust-lang/josh-sync.
2026-02-23 04:45:13 +00:00
The rustc-josh-sync Cronjob Bot
8289ede8c7 Prepare for merging from rust-lang/rust
This updates the rust-version file to c78a29473a68f07012904af11c92ecffa68fcc75.
2026-02-23 04:45:04 +00:00
Shoyu Vanilla (Flint)
0c746f6990 Merge pull request #21692 from ChayimFriedman2/builtin-derive-param
fix: Fix another case where we forgot to put the type param for `PartialOrd` and `PartialEq` in builtin derives
2026-02-23
2026-02-22 16:55:23 +00:00
Chayim Refael Friedman
807f591315 Fix another case where we forgot to put the type param for PartialOrd and PartialEq in builtin derives 2026-02-22 16:58:09 +02:00
bors
d21f4bf288 Auto merge of #152965 - JonathanBrouwer:rollup-QnrcBRx, r=JonathanBrouwer
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - rust-lang/rust#151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - rust-lang/rust#151871 (don't use env with infer vars)
 - rust-lang/rust#152591 (Simplify internals of `{Rc,Arc}::default`)
 - rust-lang/rust#152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - rust-lang/rust#147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls)
 - rust-lang/rust#152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - rust-lang/rust#152767 (fix typo in `carryless_mul` macro invocation)
 - rust-lang/rust#152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - rust-lang/rust#152871 (Fix warnings in rs{begin,end}.rs files)
 - rust-lang/rust#152879 (Remove `impl IntoQueryParam<P> for &'a P`.)
 - rust-lang/rust#152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - rust-lang/rust#152937 (remove unneeded reboxing)
 - rust-lang/rust#152953 (Fix typo in armv7a-vex-v5.md)
2026-02-22 13:27:26 +00:00
Jonathan Brouwer
9714e99199 Rollup merge of #152953 - willschlitzer:patch-1, r=petrochenkov
Fix typo in armv7a-vex-v5.md

Remove duplicate "to" in armv7-vex-v5.md
2026-02-22 11:31:18 +01:00
Jonathan Brouwer
c9e811acfc Rollup merge of #152937 - cyrgani:box-box, r=JonathanBrouwer
remove unneeded reboxing

Just a small thing I noticed while experimenting with replacing `box_syntax` with `deref_patterns` in the compiler.
2026-02-22 11:31:17 +01:00
Jonathan Brouwer
bab9c17aa3 Rollup merge of #152933 - GuillaumeGomez:start-migrating-lintdiag, r=JonathanBrouwer
Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint

This is more or less the same approach as https://github.com/rust-lang/rust/pull/152811, but in a much smaller size to make it reviewable. A lot of PRs will follow though. :)

This PR creates the equivalent of `lint_level` working with `Diagnostic` and add new methods on `MultiSpan` to make it work as well (in particular because we need to copy messages/spans from one context to another).

r? @JonathanBrouwer
2026-02-22 11:31:17 +01:00
Jonathan Brouwer
5a6f98013d Rollup merge of #152879 - nnethercote:rm-impl-IntoQueryParam-ref-P, r=oli-obk
Remove `impl IntoQueryParam<P> for &'a P`.

`IntoQueryParam` is a trait that lets query callers be a bit sloppy with the passed-in key.
- Types similar to `DefId` will be auto-converted to `DefId`. Likewise for `LocalDefId`.
- Reference types will be auto-derefed.

The auto-conversion is genuinely useful; the auto-derefing much less so. In practice it's only used for passing `&DefId` to queries that accept `DefId`, which is an anti-pattern because `DefId` is marked with `#[rustc_pass_by_value]`.

This commit removes the auto-deref impl and makes the necessary sigil adjustments. (I generally avoid using `*` to deref manually at call sites, preferring to deref via `&` in patterns or via `*` in match expressions. Mostly because that way a single deref often covers multiple call sites.)

r? @cjgillot
2026-02-22 11:31:16 +01:00
Jonathan Brouwer
7489b5f344 Rollup merge of #152871 - mati865:fix-rs-begin-end-warnings, r=joboet
Fix warnings in rs{begin,end}.rs files

As can be seen locally and in CI logs (dist-i686-mingw) that code used to trigger `static_mut_refs` warning.
2026-02-22 11:31:16 +01:00
Jonathan Brouwer
b63331cd08 Rollup merge of #152837 - TKanX:bugfix/152340-codegen-fn-attrs-const-caller, r=dingxiangfei2009
fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`

### Summary:

#### Problem:

Coercing a `#[target_feature]` `const fn` to a function pointer inside a `const` body triggers an ICE (debug builds only):

```rust
#[target_feature(enable = "sse2")]
const fn with_target_feature() {}

const X: () = unsafe {
    let _: unsafe fn() = with_target_feature; // ICE
};
```

```text
assertion failed: def_kind.has_codegen_attrs()
unexpected `def_kind` in `codegen_fn_attrs`: Const
```

#### Root Cause:

Introduced in rust-lang/rust#135504 (2025-01-14, commit `8fee6a77394`). `adjust_target_feature_sig` unconditionally calls `codegen_fn_attrs(caller)` to get the caller's target features. `codegen_fn_attrs` requires that the `DefId` satisfies `has_codegen_attrs()`. `DefKind::Const`, `AssocConst`, and `InlineConst` do not — they have no codegen attributes by design. The debug assertion fires.

In release builds the call "worked" accidentally: `codegen_fn_attrs` on a const would reach the query machinery and happen to return empty attributes, producing a correct (but unguaranteed) result. The bug was latent until debug builds exposed it.

#### Solution:

Replace `codegen_fn_attrs(caller)` with `body_codegen_attrs(caller)`. `body_codegen_attrs` exists precisely for this case: it delegates to `codegen_fn_attrs` for function-like `DefKind`s and returns `CodegenFnAttrs::EMPTY` for const items. A const body has no target features, so returning empty is semantically correct.

Also fix the pre-existing variable name `callee_features` → `caller_features` (the variable holds the *caller*'s features, not the callee's).

### Changes:

- `compiler/rustc_middle/src/ty/context.rs`: `adjust_target_feature_sig` — use `body_codegen_attrs` for `caller`; rename `callee_features` → `caller_features`.
- `tests/ui/target-feature/const-target-feature-fn-ptr-coercion.rs`: regression test covering `Const`, `AssocConst`, and `InlineConst` caller contexts.

Fixes rust-lang/rust#152340.
2026-02-22 11:31:15 +01:00
Jonathan Brouwer
177e0f28a4 Rollup merge of #152767 - folkertdev:clmul-rhs-lhs, r=joboet
fix typo in `carryless_mul` macro invocation

This wouldn't really impact anyone, but it's slightly confusing, so let's fix it.
2026-02-22 11:31:15 +01:00
Jonathan Brouwer
90f4230898 Rollup merge of #152705 - PaulDance:patches/skip-raw_attributes-doctest, r=joboet
Test(lib/win/proc): Skip `raw_attributes` doctest under Win7

The current doctest for `ProcThreadAttributeListBuilder::raw_attribute` uses `CreatePseudoConsole`, which is only available on Windows 10 October 2018 Update and above. On older versions of Windows, the test fails due to trying to link against a function that is not present in the kernel32 DLL. This therefore ensures the test is still built, but not run under the Win7 target.

@rustbot label T-libs A-process A-doctests O-windows-7
2026-02-22 11:31:14 +01:00
Jonathan Brouwer
b6dfc35417 Rollup merge of #147859 - cyrgani:nonfatal-tokenstream-parse, r=petrochenkov,JonathanBrouwer
reduce the amount of panics in `{TokenStream, Literal}::from_str` calls

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/147859)*

Before this PR, calling `TokenStream::from_str` or `Literal::from_str` with an invalid argument would always cause a compile error, even if the `TokenStream` is not used afterwards at all.
This PR changes this so it returns a `LexError` instead in some cases.

This is very theoretically a breaking change, but the doc comment on the impl already says
```
/// NOTE: some errors may cause panics instead of returning `LexError`. We reserve the right to
/// change these errors into `LexError`s later.
```

Fixes some cases of rust-lang/rust#58736.
2026-02-22 11:31:14 +01:00
Jonathan Brouwer
52fcdd6bec Rollup merge of #152591 - alexcrichton:simplify-rc-arc-default, r=joboet
Simplify internals of `{Rc,Arc}::default`

This commit simplifies the internal implementation of `Default` for these two pointer types to have the same performance characteristics as before (a side effect of changes in rust-lang/rust#131460) while avoid use of internal private APIs of Rc/Arc. To preserve the same codegen as before some non-generic functions needed to be tagged as `#[inline]` as well, but otherwise the same IR is produced before/after this change.

The motivation of this commit is I was studying up on the state of initialization of `Arc` and `Rc` and figured it'd be nicer to reduce the use of internal APIs and instead use public stable APIs where possible, even in the implementation itself.
2026-02-22 11:31:13 +01:00
Jonathan Brouwer
55db7958e1 Rollup merge of #151628 - enthropy7:fix-simd-const-eval-ice, r=RalfJung
Fix ICE in const eval of packed SIMD types with non-power-of-two element counts

fixes rust-lang/rust#151537

const evaluation of packed SIMD types with non-power-of-two element counts (like `Simd<_, 3>`) was hitting an ICE. the issue was in `check_simd_ptr_alignment` - it asserted that `backend_repr` must be `BackendRepr::SimdVector`, but for packed SIMD types with non-power-of-two counts the compiler uses `BackendRepr::Memory` instead (as mentioned in `rustc_abi/src/layout.rs:1511`).

was fixed by making `check_simd_ptr_alignment` accept both `BackendRepr::SimdVector` and `BackendRepr::Memory` for SIMD types. added a check to ensure we're dealing with a SIMD type, and the alignment logic works the same for both representations.

also i added a test that reproduces the original ICE.
2026-02-22 11:31:11 +01:00
Jonathan Brouwer
ba9946d9a3 Rollup merge of #150468 - Gelbpunkt:rustc-target-callconv-spec-elf-abi, r=RalfJung
rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing

All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case.

The fallback based on endianness is kept for the sake of compatibility with custom targets.

This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code.

The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details.

CC @RalfJung who pointed out the missing `llvm_abiname` validation
2026-02-22 11:31:11 +01:00
A4-Tacks
5d00e459f8 Merge pull request #21688 from akashchakrabortymsc-cmd/fix/convert-if-to-bool-then-negation
fix: correctly parenthesize inverted condition in convert_if_to_bool_…
2026-02-22 08:05:42 +00:00
bors
cd38bcdd28 Auto merge of #152737 - scottmcm:box_new_uninit_layout, r=RalfJung
Just pass `Layout` directly to `box_new_uninit`

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152737)*

We have a constant for it already (used in `RawVec` for basically the same polymorphization) so let's use it.

This is a simple follow-up to rust-lang/rust#148190 from one of the comments.
2026-02-22 01:21:56 +00:00
protonblu
86e3e3fdbf fix: correctly parenthesize inverted condition in convert_if_to_bool_then
The convert_if_to_bool_then assist was producing incorrect code when
the Some branch was in the else arm and the condition was a method call
expression (e.g. is_empty()).

Before:
    if test.is_empty() { None } else { Some(()) }
was incorrectly rewritten to:
    test.is_empty().then(|| ())

After (correct):
    (!test.is_empty()).then(|| ())

Root cause: the parenthesization check ran on the original condition
before inversion. When invert_boolean_expression produced a PrefixExpr
(e.g. !test.is_empty()), it was not being parenthesized because the
check had already passed on the original MethodCallExpr.

Fix: move the parenthesization check to after the inversion step so it
correctly detects PrefixExpr and wraps it in parentheses.

A regression test has been added to cover this case.
2026-02-21 11:45:24 +05:30
A4-Tacks
af68fc6e78 Merge pull request #21684 from akashchakrabortymsc-cmd/fix/generate-method-wrong-impl-block
fix: generate method assist uses enclosing impl block instead of first found
2026-02-21 02:03:10 +00:00
protonblu
ab26b67215 fix: remove redundant comment 2026-02-21 07:24:22 +05:30
protonblu
c4c0ba4fa1 style: apply rustfmt 2026-02-20 19:21:24 +05:30
protonblu
f858569371 fix: generate method assist uses enclosing impl block instead of first found 2026-02-20 19:01:22 +05:30
Chayim Refael Friedman
46a214b5d3 Merge pull request #21389 from A4-Tacks/assist-try-enum-ref
Fix some TryEnum reference assists
2026-02-20 11:05:31 +00:00
A4-Tacks
bfdb0e7b41 Do strip references for desugar_try_expr 2026-02-20 18:19:51 +08:00
Shoyu Vanilla (Flint)
8f1f66b49a Merge pull request #21635 from tascord/import-cfg-fixes
fix: Better import placement + merging
2026-02-20 02:08:33 +00:00
Flora Hill
75a8d56f4e Perf + Test Case RE: ShoyuVanilla 2026-02-19 23:04:01 +00:00
bors
045f1dc03f Auto merge of #152689 - scottmcm:also-simplify-of-sized-val-alt, r=cjgillot
Simplify `size/align_of_val<T: Sized>` to `size/align_of<T>` instead

This is relevant to things like `Box<[u8; 1024]>` where the drop looks at the `size_of_val` (since obviously it might be DST in general) but where we don't actually need to do that since it's always that same value for the `Sized` type.

(Equivalent to rust-lang/rust#152681, but flipped in the rebase so it can land before rust-lang/rust#152641 instead of depending on it.)
2026-02-19 22:03:50 +00:00
bors
ca3340262a Auto merge of #149375 - oli-obk:const_typeck, r=fee1-dead
Perform many const checks in typeck

Some smaller diagnostic changes, the biggest ones avoided by https://github.com/rust-lang/rust/pull/148641

We should be able to move various checks in mir const checking to using `span_bug!` instead of reporting an error, just like mir typeck does as a sanity check. I would like to start doing so separately though, as this PR is a big enough (in what effects it causes, pun intended).

r? @fee1-dead
2026-02-19 18:41:36 +00:00
Chayim Refael Friedman
d8e0e96766 Merge pull request #21675 from akashchakrabortymsc-cmd/fix/exclude-tests-macro-refs
fix: exclude macro refs in tests when excludeTests is enabled
2026-02-19 12:58:19 +00:00
protonblu
fc01350085 ci: rerun checks 2026-02-19 17:41:49 +05:30