about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-04-26Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-26Auto merge of #140177 - tmandry:compiletest-par, r=jieyouxubors-38/+60
[compiletest] Parallelize test discovery Certain filesystems are slow to service individual read requests, but can service many in parallel. This change brings down the time to run a single cached test on one of those filesystems from 40s to about 8s.
2025-04-25If there is a `;` alone, we consider that the doctest needs to be put inside ↵Guillaume Gomez-2/+0
a function
2025-04-25Improve codeGuillaume Gomez-4/+7
2025-04-25Auto merge of #140298 - matthiaskrgr:rollup-5tc1gvb, r=matthiaskrgrbors-1/+50
Rollup of 8 pull requests Successful merges: - #137683 (Add a tidy check for GCC submodule version) - #138968 (Update the index of Result to make the summary more comprehensive) - #139572 (docs(std): mention const blocks in const keyword doc page) - #140152 (Unify the format of rustc cli flags) - #140193 (fix ICE in `#[naked]` attribute validation) - #140205 (Tidying up UI tests [2/N]) - #140284 (remove expect() in `unnecessary_transmutes`) - #140290 (rustdoc: fix typo change from equivelent to equivalent) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-25typoTshepang Mbambo-2/+2
2025-04-25Rollup merge of #140290 - styvane:patch0001-fix-typo-in-rusdoc-search, ↵Matthias Krüger-1/+1
r=GuillaumeGomez rustdoc: fix typo change from equivelent to equivalent This PR fixes a typo in the search section in `rustdoc` book.
2025-04-25Rollup merge of #137683 - Kobzol:tidy-gcc-submodule, r=GuillaumeGomezMatthias Krüger-0/+49
Add a tidy check for GCC submodule version To make sure that it stays in sync with the required GCC version of the GCC codegen backend. The check should succeed on CI, although it will fail after https://github.com/rust-lang/rust/pull/137660, until the next GCC sync. r? `@GuillaumeGomez`
2025-04-25Merge pull request #19690 from ChayimFriedman2/preallocate-inputChayim Refael Friedman-3/+10
minor: Preallocate `parser::Input`
2025-04-25Preallocate `parser::Input`Chayim Refael Friedman-3/+10
2025-04-25Auto merge of #140282 - matthiaskrgr:rollup-g6ze4jj, r=matthiaskrgrbors-5/+53
Rollup of 8 pull requests Successful merges: - #137653 (Deprecate the unstable `concat_idents!`) - #138957 (Update the index of Option to make the summary more comprehensive) - #140006 (ensure compiler existance of tools on the dist step) - #140143 (Move `sys::pal::os::Env` into `sys::env`) - #140202 (Make #![feature(let_chains)] bootstrap conditional in compiler/) - #140236 (norm nested aliases before evaluating the parent goal) - #140257 (Some drive-by housecleaning in `rustc_borrowck`) - #140278 (Don't use item name to look up associated item from trait item) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-25Correctly display stdout and stderr in case a doctest is failingGuillaume Gomez-1/+16
2025-04-25compiletest: Use the new non-libtest executor by default (2)Zalathar-7/+11
(Re-landing #139998, with a compiler change to inhibit download-rustc.) Currently the new executor can be explicitly disabled by passing the `-N` flag to compiletest (e.g. `./x test ui -- -N`), but eventually that flag will be removed, alongside the removal of the libtest dependency.
2025-04-25Merge pull request #19688 from ChayimFriedman2/less-unusedLukas Wirth-173/+164
internal: More `shrink_to_fit()` and upgrade dashmap and hashbrown
2025-04-25avoid an unnecessary transmuteRalf Jung-1/+1
2025-04-25rustdoc: fix typo change from equivelent to equivalentSede Soukossi-1/+1
2025-04-25Switch `AstIdMap` to `hashbrown::HashTable` from the raw APIChayim Refael Friedman-10/+10
It's the intended use.
2025-04-25Upgrade dashmap and hashbrownChayim Refael Friedman-136/+103
And adapt `intern` to the changes in the API.
2025-04-25Auto merge of #140273 - matthiaskrgr:rollup-rxmuvkg, r=matthiaskrgrbors-154/+192
Rollup of 8 pull requests Successful merges: - #137096 (Stabilize flags for doctest cross compilation) - #140148 (CI: use aws codebuild for job dist-arm-linux) - #140187 ([AIX] Handle AIX dynamic library extensions within c-link-to-rust-dylib run-make test) - #140196 (Improved diagnostics for non-primitive cast on non-primitive types (`Arc`, `Option`)) - #140210 (Work around cygwin issue on condvar timeout) - #140213 (mention about `x.py setup` in `INSTALL.md`) - #140229 (`DelimArgs` tweaks) - #140248 (Fix impl block items indent) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-25minor: formatgohome001-6/+4
2025-04-25test: add test case for highlight unsafe operationsgohome001-0/+28
2025-04-25feat: highlight unsafe operationsgohome001-0/+57
2025-04-25`shrink_to_fit()` in more placesChayim Refael Friedman-27/+51
This saves 18mb on `analysis-stats .`, without regressing speed.
2025-04-25Update gcc submodule to 0ea98a1365b81f7488073512c850e8ee951a4afdJakub Beránek-0/+0
To keep it in sync with rustc_codegen_gcc.
2025-04-25Add a tidy check for GCC submodule versionJakub Beránek-0/+49
2025-04-25Enable [behind-upstream] triagebot optionxizheyin-0/+3
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-25Auto merge of #140233 - Zalathar:revert-new-executor, r=jieyouxubors-11/+7
Revert compiletest new-executor, to re-land without download-rustc Revert <https://github.com/rust-lang/rust/pull/139998> because the original merge triggered download-rustc, which messes with test metrics and prevents us from properly comparing them before/after the change. The plan is to re-land this PR as-is, combined with a trivial compiler change to avoid download-rustc and get proper test metrics for comparison. This reverts commit be181dd75c83d72fcc95538e235768bc367b76b9, reversing changes made to 645d0ad2a4f145ae576e442ec5c73c0f8eed829b. r? ghost
2025-04-25Rollup merge of #140006 - onur-ozkan:138778, r=onur-ozkanMatthias Krüger-5/+50
ensure compiler existance of tools on the dist step Fixes https://github.com/rust-lang/rust/issues/138778 with a coverage on https://github.com/rust-lang/rust/issues/138123 and https://github.com/rust-lang/rust/issues/138004. try-job: dist-powerpc64le-linux
2025-04-25Rollup merge of #137653 - tgross35:deprecate-concat_idents, r=workingjubileeMatthias Krüger-0/+3
Deprecate the unstable `concat_idents!` `concat_idents` has been around unstably for a long time, but there is now a better (but still unstable) way to join identifiers using `${concat(...)}` syntax with `macro_metavar_expr_concat`. This resolves a lot of the problems with `concat_idents` and is on a better track toward stabilization, so there is no need to keep both versions around. `concat_idents!` still has a lot of use in the ecosystem so deprecate it before removing, as discussed in [1]. Link: https://github.com/rust-lang/rust/issues/124225 [1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Removing.20.60concat_idents.60
2025-04-25Merge from rustcThe Miri Cronjob Bot-129/+146
2025-04-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-25Add PGO support to installFrançois Bernier-132/+175
Enable PGO optimizations when installing rust-analyzer with the --pgo flag. This mirrors functionality already available in dist command, allowing developers to create optimized local builds. Example: cargo xtask install --server --pgo clap-rs/clap PGO code has been extracted to a dedicated module for reuse.
2025-04-24Always error when failed to parse DiscoverProjectMessageDavid Richey-13/+13
2025-04-25Rollup merge of #140248 - GuillaumeGomez:fix-impl-block-items-indent, ↵Matthias Krüger-12/+19
r=notriddle Fix impl block items indent Fixes #139771. Now, all impl block "before impl block items" indent are the same (ie, item info and documentation). With this fix, it looks like this: ![Screenshot From 2025-04-24 12-32-40](https://github.com/user-attachments/assets/907803a2-2949-4d01-afa5-fc3132d10ff2) You can test it [here](https://rustdoc.crud.net/imperio/fix-impl-block-items-indent/foo/struct.Context.html). r? `@notriddle`
2025-04-25Rollup merge of #140148 - marcoieni:ci-aws-codebuild, r=KobzolMatthias Krüger-13/+78
CI: use aws codebuild for job dist-arm-linux try-job: dist-arm-linux
2025-04-25Rollup merge of #137096 - ehuss:stabilize-doctest-xcompile, r=fmeaseMatthias Krüger-129/+95
Stabilize flags for doctest cross compilation This makes the following changes in preparation for supporting doctest cross-compiling in cargo: - Renames `--runtool` and `--runtool-arg` to `--test-runtool` and `--test-runtool-arg` to maintain consistency with other `--test-*` arguments. - Stabilizes the `--test-runtool` and `--test-runtool-arg`. These are needed in order to support cargo's `target.runner` option which specifies a runner to execute a cross-compiled doctest (for example, qemu). - Stabilizes the `--enable-per-target-ignores` flag by removing it and making it unconditionally enabled. This makes it possible to disable a doctest on a per-target basis, which I think will be helpful for rolling out this feature. These changes were suggested in https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/stabilizing.20doctest.20xcompile/near/409281127 The intent is to stabilize the doctest-xcompile feature in cargo. This will help ensure that for projects that do cross-compile testing that their doctests are also covered. Currently there is a somewhat surprising behavior that they are ignored. Closes https://github.com/rust-lang/rust/issues/64245 try-job: x86_64-msvc-1
2025-04-24Deprecate the unstable `concat_idents!`Trevor Gross-0/+3
`concat_idents` has been around unstably for a long time, but there is now a better (but still unstable) way to join identifiers using `${concat(...)}` syntax with `macro_metavar_expr_concat`. This resolves a lot of the problems with `concat_idents` and is on a better track toward stabilization, so there is no need to keep both versions around. `concat_idents!` still has a lot of use in the ecosystem so deprecate it before removing, as discussed in [1]. Link: https://github.com/rust-lang/rust/issues/124225 [1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Removing.20.60concat_idents.60
2025-04-24update unstable book to mention moving out of boxesdianne-1/+14
2025-04-24Rollup merge of #140191 - Kobzol:remove-git-repository-from-git-config, ↵Matthias Krüger-16/+0
r=jieyouxu Remove git repository from git config It is no longer needed after https://github.com/rust-lang/rust/pull/138591. We could even remove the `nightly_branch` field, but it still has one usage. r? ``@jieyouxu``
2025-04-24Rollup merge of #140172 - bjoernager:const-float-algebraic, r=RalfJungMatthias Krüger-26/+0
Make algebraic functions into `const fn` items. Tracking issue: #136469 This PR makes the algebraic intrinsics and the unstable, algebraic functions of `f16`, `f32`, `f64`, and `f128` into `const fn` items: ```rust impl f16 { pub const fn algebraic_add(self, rhs: f16) -> f16; pub const fn algebraic_sub(self, rhs: f16) -> f16; pub const fn algebraic_mul(self, rhs: f16) -> f16; pub const fn algebraic_div(self, rhs: f16) -> f16; pub const fn algebraic_rem(self, rhs: f16) -> f16; } impl f32 { pub const fn algebraic_add(self, rhs: f32) -> f32; pub const fn algebraic_sub(self, rhs: f32) -> f32; pub const fn algebraic_mul(self, rhs: f32) -> f32; pub const fn algebraic_div(self, rhs: f32) -> f32; pub const fn algebraic_rem(self, rhs: f32) -> f32; } impl f64 { pub const fn algebraic_add(self, rhs: f64) -> f64; pub const fn algebraic_sub(self, rhs: f64) -> f64; pub const fn algebraic_mul(self, rhs: f64) -> f64; pub const fn algebraic_div(self, rhs: f64) -> f64; pub const fn algebraic_rem(self, rhs: f64) -> f64; } impl f128 { pub const fn algebraic_add(self, rhs: f128) -> f128; pub const fn algebraic_sub(self, rhs: f128) -> f128; pub const fn algebraic_mul(self, rhs: f128) -> f128; pub const fn algebraic_div(self, rhs: f128) -> f128; pub const fn algebraic_rem(self, rhs: f128) -> f128; } // core::intrinsics pub const fn fadd_algebraic<T: Copy>(a: T, b: T) -> T; pub const fn fsub_algebraic<T: Copy>(a: T, b: T) -> T; pub const fn fmul_algebraic<T: Copy>(a: T, b: T) -> T; pub const fn fdiv_algebraic<T: Copy>(a: T, b: T) -> T; pub const fn frem_algebraic<T: Copy>(a: T, b: T) -> T; ``` This PR does not preserve the initial behaviour of these functions yielding non-deterministic output under Miri; it is most likely desired to reimplement this behaviour at some point.
2025-04-24Rollup merge of #136083 - bend-n:⃤⃤, r=lcnrMatthias Krüger-67/+87
Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc implements #136067 Rust has helper methods for many kinds of safe transmutes, for example integer<->bytes. This is a lint against using transmute for these cases. ```rs fn bytes_at_home(x: [u8; 4]) -> u32 { transmute(x) } // other examples transmute::<[u8; 2], u16>(); transmute::<[u8; 8], f64>(); transmute::<u32, [u8; 4]>(); transmute::<char, u32>(); transmute::<u32, char>(); ``` It would be handy to suggest `u32::from_ne_bytes(x)`. This is implemented for `[u8; _]` -> `{float int}` This also implements the cases: `fXX` <-> `uXX` = `{from_bits, to_bits}` `uXX` -> `iXX` via `cast_unsigned` and `cast_signed` {`char` -> `u32`, `bool` -> `n8`} via `from` `u32` -> `char` via `from_u32_unchecked` (note: notes `from_u32().unwrap()`) (contested) `u8` -> `bool` via `==` (debatable) --- try-job: aarch64-gnu try-job: test-various
2025-04-24Merge pull request #19678 from Veykril/push-mkznvpsktnnzLukas Wirth-60/+126
Arena allocate `LifetimeRef`s
2025-04-24Auto merge of #140245 - matthiaskrgr:rollup-e0fwsfv, r=matthiaskrgrbors-16/+35
Rollup of 8 pull requests Successful merges: - #139261 (mitigate MSVC alignment issue on x86-32) - #140075 (Mention average in midpoint documentations) - #140184 (Update doc of cygwin target) - #140186 (Rename `compute_x` methods) - #140194 (minicore: Have `//@ add-core-stubs` also imply `-Cforce-unwind-tables=yes`) - #140195 (triagebot: label minicore changes w/ `A-test-infra-minicore` and ping jieyouxu on changes) - #140214 (Remove comment about handling non-global where bounds with corresponding projection) - #140228 (Revert overzealous parse recovery for single colons in paths) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-24Remove `weak` alias terminologyBoxy-4/+4
2025-04-24Fix indent of impl docsGuillaume Gomez-1/+4
2025-04-24Make impl item info come before docGuillaume Gomez-11/+15
2025-04-24Rollup merge of #140194 - jieyouxu:minicore-force-unwind-tables, r=bjorn3Matthias Krüger-9/+25
minicore: Have `//@ add-core-stubs` also imply `-Cforce-unwind-tables=yes` To preserve CFI directives in assembly tests, as `//@ add-core-stubs` already imply `-C panic=abort`. This is a blocker for https://github.com/rust-lang/rust/pull/140037#issuecomment-2816665358. cc ```@RalfJung``` r? ```@bjorn3```
2025-04-24Rollup merge of #140184 - Berrysoft:cygwin-target-doc, r=NoratriebMatthias Krüger-2/+3
Update doc of cygwin target Some trivial updates.
2025-04-24Rollup merge of #139261 - RalfJung:msvc-align-mitigation, r=oli-obkMatthias Krüger-5/+7
mitigate MSVC alignment issue on x86-32 This implements mitigation for https://github.com/rust-lang/rust/issues/112480 by stopping to emit `align` attributes on loads and function arguments when building for a win32 MSVC target. MSVC is known to not properly align `u64` and similar types, and claiming to LLVM that everything is properly aligned increases the chance that this will cause problems. Of course, the misalignment is still a bug, but we can't fix that bug, only MSVC can. Also add an errata note to the platform support page warning users about this known problem. try-job: `i686-msvc*`
2025-04-24clippyRalf Jung-14/+12