about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2025-06-30Disable f16 on Aarch64 without neon for llvm < 20.1.1Trevor Gross-0/+8
This check was added unconditionally in c51b229140 ("Disable f16 on Aarch64 without `neon`") and reverted in 4a8d35709e ("Revert "Disable `f16` on Aarch64 without `neon`"") since it did not fail in Rust's build. However, it is still possible to hit this crash if using LLVM 19 built with assertions, so disable the type conditionally based on version here. Note that for these builds, a similar patch is needed in the build script for `compiler-builtins` since it does not yet use `cfg(target_has_reliable_f16)` (hopefully to be resolved in the near future). Report: https://www.github.com/rust-lang/rust/pull/139276#issuecomment-3014781652 Original LLVM issue: https://www.github.com/llvm/llvm-project/issues/129394
2025-06-30Auto merge of #143233 - dianqk:rollup-lcx3278, r=dianqkbors-698/+642
Rollup of 14 pull requests Successful merges: - rust-lang/rust#142429 (`tests/ui`: A New Order [13/N]) - rust-lang/rust#142514 (Miri: handling of SNaN inputs in `f*::pow` operations) - rust-lang/rust#143066 (Use let chains in the new solver) - rust-lang/rust#143090 (Workaround for memory unsafety in third party DLLs) - rust-lang/rust#143118 (`tests/ui`: A New Order [15/N]) - rust-lang/rust#143159 (Do not freshen `ReError`) - rust-lang/rust#143168 (`tests/ui`: A New Order [16/N]) - rust-lang/rust#143176 (fix typos and improve clarity in documentation) - rust-lang/rust#143187 (Add my work email to mailmap) - rust-lang/rust#143190 (Use the `new` method for `BasicBlockData` and `Statement`) - rust-lang/rust#143195 (`tests/ui`: A New Order [17/N]) - rust-lang/rust#143196 (Port #[link_section] to the new attribute parsing infrastructure) - rust-lang/rust#143199 (Re-disable `tests/run-make/short-ice` on Windows MSVC again) - rust-lang/rust#143219 (Show auto trait and blanket impls for `!`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-30Merge commit '4b5c44b14166083eef8d71f15f5ea1f53fc976a0' into ↵Guillaume Gomez-171/+131
subtree-update_cg_gcc_2025-06-30
2025-06-30Assemble const bounds via normal item bounds in old solver tooMichael Goulet-1/+66
2025-06-30Remove let_chains featureCameron Steffen-4/+12
2025-06-30Rollup merge of #143196 - Periodic1911:link_section, r=oli-obkdianqk-16/+54
Port #[link_section] to the new attribute parsing infrastructure Ports link_section to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? `@oli-obk` cc `@JonathanBrouwer` `@jdonszelmann`
2025-06-30Rollup merge of #143190 - dianqk:new-method, r=oli-obkdianqk-537/+473
Use the `new` method for `BasicBlockData` and `Statement` This is the NFC part of rust-lang/rust#142771. I split it to make it easier to review for rust-lang/rust#142771. Even without rust-lang/rust#142771, I think this change is worthwhile.
2025-06-30Rollup merge of #143159 - compiler-errors:freshen-re-error, r=oli-obkdianqk-25/+8
Do not freshen `ReError` Because `ReError` has `ErrorGuaranteed` in it, it affects candidate selection and thus causes incompleteness which leads to weirdness in eval. See the comment in the test. Also remove an unnecessary `lookup_op_method` since it doesn't effect tests. Fixes rust-lang/rust#132882. r? types
2025-06-30Rollup merge of #143066 - compiler-errors:let-chain-solver, r=lcnrdianqk-120/+107
Use let chains in the new solver Self-explanatory Let chains are stable as of today r? lcnr
2025-06-30Introduce `ByteSymbol`.Nicholas Nethercote-243/+419
It's like `Symbol` but for byte strings. The interner is now used for both `Symbol` and `ByteSymbol`. E.g. if you intern `"dog"` and `b"dog"` you'll get a `Symbol` and a `ByteSymbol` with the same index and the characters will only be stored once. The motivation for this is to eliminate the `Arc`s in `ast::LitKind`, to make `ast::LitKind` impl `Copy`, and to avoid the need to arena-allocate `ast::LitKind` in HIR. The latter change reduces peak memory by a non-trivial amount on literal-heavy benchmarks such as `deep-vector` and `tuple-stress`. `Encoder`, `Decoder`, `SpanEncoder`, and `SpanDecoder` all get some changes so that they can handle normal strings and byte strings. This change does slow down compilation of programs that use `include_bytes!` on large files, because the contents of those files are now interned (hashed). This makes `include_bytes!` more similar to `include_str!`, though `include_bytes!` contents still aren't escaped, and hashing is still much cheaper than escaping.
2025-06-30Don't run hir wfcheck if ty wfcheck handled everythingOli Scherer-17/+58
2025-06-30Avoid some eager uses of HIR spansOli Scherer-4/+5
2025-06-30Stop requiring HIR for impl item wf checksOli Scherer-11/+11
2025-06-30Stop requiring HIR for trait item wf checksOli Scherer-7/+20
2025-06-30Avoid looking at HIR for trait and impl itemsOli Scherer-23/+7
2025-06-30Avoid eagerly loading the hir fn sigOli Scherer-14/+11
2025-06-30Merge `lower_trait_item` and `lower_impl_item` into `check_item_type`Oli Scherer-51/+26
2025-06-30Merge `lower_item` into `check_item_type`Oli Scherer-115/+77
2025-06-30Move lazy type alias checks to non-hir-wfckOli Scherer-19/+25
2025-06-30Use predicate spans instead of whole item spansOli Scherer-26/+15
2025-06-30Check variances in the non-hir wfcheckerOli Scherer-20/+13
2025-06-30Make variance wfcheck only use the HIR in the error pathOli Scherer-28/+26
2025-06-30Don't look at static items' HIR for wfcheckOli Scherer-43/+33
2025-06-30fix bitcast of single-element SIMD vectorsFolkert de Vries-8/+2
2025-06-30Unconditionally run `check_item_type` on all itemsOli Scherer-13/+4
2025-06-30Require either wrapping nullary intrinsincs in const blocks or explicitly ↵Oli Scherer-1/+22
deciding not to
2025-06-30Remove the nullary intrinsic const eval logic and treat them like other ↵Oli Scherer-119/+73
intrinsics
2025-06-30Stop backends from needing to support nullary intrinsicsOli Scherer-29/+24
2025-06-30Make check_param_wf only go through the HIR in the error pathOli Scherer-26/+31
2025-06-30Stop storing `Span` that is only used for checking for global bounds that do ↵Oli Scherer-21/+14
not hold
2025-06-30Handle build scripts better in `-Zmacro-stats` output.Nicholas Nethercote-1/+11
Currently all build scripts are listed as `build_script_build` in the stats header. This commit uses `CARGO_PKG_NAME` to improve that. I tried it on Bevy, it works well, giving output like this on the build script: ``` MACRO EXPANSION STATS: serde build script ``` and this on the crate itself: ``` MACRO EXPANSION STATS: serde ```
2025-06-30Improve macro-stats printing.Nicholas Nethercote-6/+16
By allowing long names to overlap with the "Uses" field when it has spare space. This avoids unnecessary line breaks in the output.
2025-06-30Auto merge of #142941 - compiler-errors:shallow-bail, r=lcnrbors-19/+70
Shallowly bail from `coerce_unsized` more We do a *lot* of coercion in HIR typeck. Most of the time we're just coercing a type to itself, but we always try `coerce_unsized` even if it's not necessary. Let's avoid doing that by adding a fast path to `coerce_unsized`; see the comment in that function.
2025-06-29Auto merge of #142802 - compiler-errors:dedup-analyses, r=lcnrbors-3/+11
Collapse Analysis|Borrowck|PostBorrowckAnalysis when there are no opaques r? lcnr
2025-06-29inherit `#[align]` from trait method prototypesFolkert de Vries-9/+28
2025-06-29Port #[link_section] to the new attribute parsing infrastructureAnne Stijns-16/+54
2025-06-29mir: Use the `new` method for `BasicBlockData`dianqk-209/+180
2025-06-29mir: Add a `new` method to `statement`dianqk-330/+295
Avoid introducing a large number of changes when adding optional initialization fields.
2025-06-29Rollup merge of #143030 - Urgau:issue-143025, r=SparrowLiiGuillaume Gomez-4/+6
Fix suggestion spans inside macros for the `unused_must_use` lint This PR fixes the suggestion spans inside macros for the `unused_must_use` lint by trying to find the oldest ancestor span. Fixes https://github.com/rust-lang/rust/issues/143025
2025-06-29Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubileeGuillaume Gomez-3/+27
Add SIMD funnel shift and round-to-even intrinsics This PR adds 3 new SIMD intrinsics - `simd_funnel_shl` - funnel shift left - `simd_funnel_shr` - funnel shift right - `simd_round_ties_even` (vector version of `round_ties_even_fN`) TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`) [#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286) `@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics r? `@workingjubilee`
2025-06-29Auto merge of #143173 - matthiaskrgr:rollup-ieu5k05, r=matthiaskrgrbors-67/+121
Rollup of 11 pull requests Successful merges: - rust-lang/rust#142021 (Doc: clarify priority of lint level sources) - rust-lang/rust#142367 (Add regression test for rust-lang/rust#137857 to ensure that we generate intra doc links for extern crate items.) - rust-lang/rust#142641 (Generate symbols.o for proc-macros too) - rust-lang/rust#142889 (Clarify doc comment on unix OpenOptions) - rust-lang/rust#143063 (explain `ImportData::imported_module`) - rust-lang/rust#143088 (Improve documentation of `TagEncoding`) - rust-lang/rust#143135 (fix typos on some doc comments) - rust-lang/rust#143138 (Port `#[link_name]` to the new attribute parsing infrastructure) - rust-lang/rust#143155 (`librustdoc` house-keeping 🧹) - rust-lang/rust#143169 (Remove unused feature gates) - rust-lang/rust#143171 (Fix the span of trait bound modifier `[const]`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-29Rollup merge of #143171 - fmease:fix-span-of-maybe-const-mod, r=compiler-errorsMatthias Krüger-1/+1
Fix the span of trait bound modifier `[const]` r? project-const-traits or anyone
2025-06-29Rollup merge of #143169 - yotamofek:pr/unneeded-features, r=compiler-errorsMatthias Krüger-7/+0
Remove unused feature gates After finding some unused feature gates in rust-lang/rust#143155 , I wrote a small script to see if I can find any others. And I did. Not a lot, but still a small win 😁 Contains a few instances of `iter_from_coroutine` that can be removed due to rust-lang/rust#142801 (I guess).
2025-06-29Rollup merge of #143138 - JonathanBrouwer:link_name_parser, r=jdonszelmannMatthias Krüger-24/+67
Port `#[link_name]` to the new attribute parsing infrastructure Ports `link_name` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? `@jdonszelmann`
2025-06-29Rollup merge of #143135 - tshepang:typos, r=compiler-errorsMatthias Krüger-2/+2
fix typos on some doc comments
2025-06-29Rollup merge of #143088 - firefighterduck:improve-doc-discr-tag, r=RalfJungMatthias Krüger-30/+36
Improve documentation of `TagEncoding` This PR is follow-up from the [discussion here](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20VariantId.3DDiscriminant.20when.20tag.20is.20niche.20encoded.3F/with/524384295). It aims at making the `TagEncoding` documentation less ambiguous and more detailed with references to relevant implementation sides. It especially clears up the ambiguous use of discriminant/variant index, which sparked the discussion referenced above. PS: While working with layout data, I somehow ended up looking at the docs for `FakeBorrowKind` and noticed that the one example was not in a doc comment. I hope that this is minor enough of a fix for it to be okay in this otherwise unrelated PR.
2025-06-29Rollup merge of #143063 - bvanjoi:docs-resolve, r=petrochenkovMatthias Krüger-1/+8
explain `ImportData::imported_module` r? `@petrochenkov`
2025-06-29Rollup merge of #142641 - bjorn3:proc_macro_symbols_o, r=jieyouxuMatthias Krüger-2/+7
Generate symbols.o for proc-macros too To ensure used statics are functioning correctly for proc-macros too.
2025-06-29Auto merge of #143161 - GuillaumeGomez:subtree-update_cg_gcc_2025-06-28, ↵bors-117/+150
r=GuillaumeGomez GCC backend subtree update cc `@antoyo` r? ghost
2025-06-29Fix the span of trait bound modifier `[const]`León Orell Valerian Liehr-1/+1