about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-04-17Deduplicate nix codeRoss Smyth-50/+111
And clean it up a little.
2025-04-17Replace infallible `name_or_empty` methods with fallible `name` methods.Nicholas Nethercote-2/+2
I'm removing empty identifiers everywhere, because in practice they always mean "no identifier" rather than "empty identifier". (An empty identifier is impossible.) It's better to use `Option` to mean "no identifier" because you then can't forget about the "no identifier" possibility. Some specifics: - When testing an attribute for a single name, the commit uses the `has_name` method. - When testing an attribute for multiple names, the commit uses the new `has_any_name` method. - When using `match` on an attribute, the match arms now have `Some` on them. In the tests, we now avoid printing empty identifiers by not printing the identifier in the `error:` line at all, instead letting the carets point out the problem.
2025-04-16Update cargoWeihang Lo-1/+2
* The license exception of sha1_smol with BSD-3-Clause is no longer needed, as `gix-*` doesn't depend on it. * Cargo depends on zlib-rs, which is distributed under Zlib license
2025-04-17Rollup merge of #139894 - Kobzol:opt-dist-fixes, r=lqdMatthias Krüger-2/+4
Fix `opt-dist` CLI flag and make it work without LLD Suggested in https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/experiment.20with.20.60opt-dist.20local.60.20in.20MSYS2/with/512456991. r? `@jieyouxu`
2025-04-17Rollup merge of #139770 - nnethercote:rename-LifetimeName, r=BoxyUwUMatthias Krüger-13/+13
Rename `LifetimeName` as `LifetimeKind`. It's a much better name, more consistent with how we name such things. Also rename `Lifetime::res` as `Lifetime::kind` to match. I suspect this field used to have the type `LifetimeRes` and then the type was changed but the field name remained the same. r? ``@BoxyUwU``
2025-04-17Fix a bug with predicate lowering of associated itemsChayim Refael Friedman-5/+32
The essence of the bug is that bounds on `impl Trait` got lowered with incorrect bound vars, as if we were lowering the parent.
2025-04-16Use PGO on macOS x64 and arm64 buildsAlexander Zaitsev-0/+2
- realted to https://github.com/rust-lang/rust-analyzer/issues/9412#issuecomment-2810772246
2025-04-16Upgrade to `rustc-rayon-core` 0.5.1Josh Stone-3/+0
* [Fix a race with deadlock detection](https://github.com/rust-lang/rustc-rayon/pull/15) * [Cherry-pick changes from upstream rayon-core](https://github.com/rust-lang/rustc-rayon/pull/16) - This also removes a few dependencies from rustc's tidy list.
2025-04-17replaced check_shim with check_shim_abi for env, file, sockets and time ↵geetanshjuneja-82/+405
related shims Making type consistent in shims pread return type fix make clock_gettime shim type consistent
2025-04-16remove old remove_and_create_dir_all and use build_helpers ↵bit-aloo-14/+25
remove_and_create_dir_all
2025-04-16Merge pull request #19605 from ChayimFriedman2/fix-sigChayim Refael Friedman-1/+2
minor: Fix signature of libc memory usage function on Linux
2025-04-16Fix signature of libc memory usage function on LinuxChayim Refael Friedman-1/+2
A soundness issue!
2025-04-16add semicolon to useWtz_LASR-1/+1
2025-04-16use std-declared intrinsics rather than copying the declarationRalf Jung-106/+50
2025-04-16Rollup merge of #139884 - rustbot:docs-update, r=ehussMatthias Krüger-0/+10
Update books ## rust-lang/book 1 commits in 45f05367360f033f89235eacbbb54e8d73ce6b70..d33916341d480caede1d0ae57cbeae23aab23e88 2025-04-08 18:24:27 UTC to 2025-04-08 18:24:27 UTC - Ch01+ch02 after tech review (rust-lang/book#4329) ## rust-lang/edition-guide 2 commits in 1e27e5e6d5133ae4612f5cc195c15fc8d51b1c9c..467f45637b73ec6aa70fb36bc3054bb50b8967ea 2025-04-15 19:49:59 UTC to 2025-04-11 15:27:31 UTC - fix grammar errors (rust-lang/edition-guide#374) - remove the unused and deprecated `multilingual` field from `book.toml` (rust-lang/edition-guide#375) ## rust-lang/nomicon 2 commits in b4448fa406a6dccde62d1e2f34f70fc51814cdcc..0c10c30cc54736c5c194ce98c50e2de84eeb6e79 2025-04-09 01:54:42 UTC to 2025-04-07 20:22:31 UTC - Remove double wording in opaque type chapter (rust-lang/nomicon#487) - remove `rust-intrinsic` ABI (rust-lang/nomicon#485) ## rust-lang/reference 6 commits in 46435cd4eba11b66acaa42c01da5c80ad88aee4b..3340922df189bddcbaad17dc3927d51a76bcd5ed 2025-04-15 19:03:24 UTC to 2025-04-10 01:56:25 UTC - Add a new grammar renderer (rust-lang/reference#1787) - Misc. spelling fixes (rust-lang/reference#1785) - Fix std::ops links in range-expr (rust-lang/reference#1786) - traits.md: remove unusual formatting (rust-lang/reference#1784) - doc: add missing space (rust-lang/reference#1782) - spelling fix, Discrimants -> Discriminants (rust-lang/reference#1783)
2025-04-16Rollup merge of #139867 - WaffleLapkin:tidypaper, r=jieyouxuMatthias Krüger-1/+3
Fix some tidy paper cuts The main thing this fixes is that currently, if you run `x t tidy` it will format ~6K files, even though it's supposed to format only modified files (whatever this is a useful optimization or not is besides the point). The problem is that `x t tidy` never writes the `rustfmt` stamp, so it always assumes `rustfmt` that was last used is outdated and we need to recheck everything. This PR fixes it by actually writing the stamp. There are also some minor tweaks to comments/diagnostics. cc ```@Kobzol``` this probably conflicts with #138591. I didn't fix anything, just tried to document better the status quo. r? ```@jieyouxu```
2025-04-16Rollup merge of #139823 - WaffleLapkin:bootpaper, r=jieyouxuMatthias Krüger-1/+8
Fix some bootstrap papercuts ... related to jj and my `./build` symlink setup[^1]. I'm not sure if these are good solutions, but they seem to work. See commits for a bit more info. r? ``@jieyouxu`` [^1]: see #139804
2025-04-16Merge pull request #19589 from roife/fix-issue-19138Lukas Wirth-0/+66
fix: highlighting for tail expr in labelled blocks
2025-04-16feat: highlight tail expr when cursor is on labelroifewu-0/+37
2025-04-16Merge pull request #19591 from snprajwal/fix-make-macroLukas Wirth-14/+21
fix: use `ast::TokenTree` in `make::expr_macro`
2025-04-16Merge pull request #19590 from roife/fix-issue-19540Lukas Wirth-0/+18
feat: add `pub(crate) mod` option for unlinked files
2025-04-16Merge pull request #19597 from Kobzol/arm-ciLukas Wirth-2/+3
Build aarch64 builds on CI with PGO
2025-04-16fix: use `ast::TokenTree` in `make::expr_macro`Prajwal S N-14/+21
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-16Merge pull request #19596 from roife/sig-help-infoLukas Wirth-13/+154
feat: enhance signature help to display generic parameters for callables and default values for generic args
2025-04-16Merge pull request #19588 from Hmikihiro/ext_func_moduleLukas Wirth-14/+71
fix: `Extract into` function include inline variable in fmt macro
2025-04-16Merge pull request #19587 from MatrixFrog/patch-1Lukas Wirth-1/+0
Remove incorrect doc comment
2025-04-16Pin rustc used for the `proc-macro-src` CI jobJakub Beránek-5/+13
2025-04-16Only delete the lld directory if it existsJakub Beránek-1/+3
2025-04-16Allow disabling `--llvm-shared` in opt-distJakub Beránek-1/+1
2025-04-15rustdoc: Output target feature informationWill Glynn-1/+8
`#[target_feature]` attributes refer to a target-specific list of features. Enabling certain features can imply enabling other features. Certain features are always enabled on certain targets, since they are required by the target's ABI. Features can also be enabled indirectly based on other compiler flags. Feature information is ultimately known to `rustc`. Rather than force external tools to track it -- which may be wildly impractical due to `-C target-cpu` -- have `rustdoc` output `rustc`'s feature data.
2025-04-15Update Cargo.lock for rustbookEric Huss-0/+10
2025-04-16Rename `LifetimeName` as `LifetimeKind`.Nicholas Nethercote-13/+13
It's a much better name, more consistent with how we name such things. Also rename `Lifetime::res` as `Lifetime::kind` to match. I suspect this field used to have the type `LifetimeRes` and then the type was changed but the field name remained the same.
2025-04-15Perform PGO for aarch64 buildsJakub Beránek-2/+3
2025-04-15normalize canonical and non-canonical paths in compiletestWaffle Lapkin-5/+8
Apparently there are tests that print canonical paths *and* tests which print non-canonical paths. An example of the latter is `tests/ui/type_length_limit.rs`.
2025-04-16feat: enhance signature help to display generic parameters for callables and ↵roifewu-13/+154
default values for generic args
2025-04-15Use PGO on Linux x64 buildsJakub Beránek-0/+1
2025-04-15Merge pull request #19585 from Kobzol/pgo-windowsLaurențiu Nicola-11/+53
Allow training PGO on a custom crate and enable it Windows on CI
2025-04-15Use `manylinux` Docker container instead of zigbuild for x64 LinuxJakub Beránek-1/+9
This gets us glibc 2.28 without using `cargo zigbuild`, which is not compatible with PGO.
2025-04-15tidy: don't crush on non-existent submodulesWaffle Lapkin-1/+3
2025-04-15Merge pull request #4260 from CraftSpider/windows-file-deleteOli Scherer-5/+46
Implement file deletion on Windows
2025-04-15Use `-q` to silence RA outputJakub Beránek-3/+1
2025-04-15Run PGO for Windows on CIJakub Beránek-0/+2
2025-04-15Allow passing a specific crate for PGO trainingJakub Beránek-10/+52
2025-04-15Fix `llvm-profdata` extension on non Linux OSesJakub Beránek-1/+1
2025-04-15Auto merge of #139845 - Zalathar:rollup-u5u5y1v, r=Zalatharbors-181/+606
Rollup of 17 pull requests Successful merges: - #138374 (Enable contracts for const functions) - #138380 (ci: add runners for vanilla LLVM 20) - #138393 (Allow const patterns of matches to contain pattern types) - #139517 (std: sys: process: uefi: Use NULL stdin by default) - #139554 (std: add Output::exit_ok) - #139660 (compiletest: Add an experimental new executor to replace libtest) - #139669 (Overhaul `AssocItem`) - #139671 (Proc macro span API redesign: Replace proc_macro::SourceFile by Span::{file, local_file}) - #139750 (std/thread: Use default stack size from menuconfig for NuttX) - #139772 (Remove `hir::Map`) - #139785 (Let CStrings be either 1 or 2 byte aligned.) - #139789 (do not unnecessarily leak auto traits in item bounds) - #139791 (drop global where-bounds before merging candidates) - #139798 (normalize: prefer `ParamEnv` over `AliasBound` candidates) - #139822 (Fix: Map EOPNOTSUPP to ErrorKind::Unsupported on Unix) - #139833 (Fix some HIR pretty-printing problems) - #139836 (Basic tests of MPMC receiver cloning) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-15canonicalize test build dir before normalizing itWaffle Lapkin-1/+5
Fix fixes failures of the following tests when build directory is a symlink: - `tests/ui/error-codes/E{0464,0523}.rs` - `tests/ui/crate-loading/crateresolve{1,2}.rs` (those are the same tests)
2025-04-15fix typoWaffle Lapkin-1/+1
2025-04-15Rollup merge of #139671 - m-ou-se:proc-macro-span, r=dtolnayStuart Cook-38/+15
Proc macro span API redesign: Replace proc_macro::SourceFile by Span::{file, local_file} Simplification/redesign of the unstable proc macro span API, tracked in https://github.com/rust-lang/rust/issues/54725: Before: ```rust impl Span { pub fn line(&self) -> usize; pub fn column(&self) -> usize; pub fn source_file(&self) -> SourceFile; } #[derive(Clone, Debug, PartialEq, Eq)] pub struct SourceFile { .. } impl !Send for SourceFile {} impl !Sync for SourceFile {} impl SourceFile { pub fn path(&self) -> PathBuf; pub fn is_real(&self) -> bool; } ``` After: ```rust impl Span { pub fn line(&self) -> usize; pub fn column(&self) -> usize; pub fn file(&self) -> String; // Mapped file name, for display purposes. pub fn local_file(&self) -> Option<PathBuf>; // Real file name as it exists on disk. } ``` This resolves the last blocker for stabilizing these methods. (Stabilizing will be a separate PR with FCP.)
2025-04-15Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obkStuart Cook-33/+31
Overhaul `AssocItem` `AssocItem` has multiple fields that only make sense some of the time. E.g. the `name` can be empty if it's an RPITIT associated type. It's clearer and less error prone if these fields are moved to the relevant `kind` variants. r? ``@fee1-dead``
2025-04-15feat: Add `pub(crate) mod` option for unlinked filesroifewu-0/+18