about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
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
2025-04-15feat: highlight tail expression in labeled blockroifewu-0/+29
2025-04-15compiletest: Add an experimental new executor to replace libtestZalathar-11/+451
The new executor can be enabled by passing `--new-executor` or `-n` to compiletest. For example: `./x test ui -- -n`
2025-04-15compiletest: Extract libtest-specific executor code to a submoduleZalathar-103/+113
2025-04-15fix: `Extract into function include inline variable in fmt macroHayashi Mikihiro-14/+71
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-14Remove incorrect doc commentTyler Breisacher-1/+0
2025-04-15Move `name` field from `AssocItem` to `AssocKind` variants.Nicholas Nethercote-6/+6
To accurately reflect that RPITIT assoc items don't have a name. This avoids the use of `kw::Empty` to mean "no name", which is error prone. Helps with #137978.
2025-04-15Move `opt_rpitit_info` field to `hir::AssocKind::Type`.Nicholas Nethercote-1/+1
From `hir::AssocItem`.
2025-04-14Rollup merge of #139813 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-14/+42
Miri subtree update r? `@ghost` Fixes build failures on macOS
2025-04-14Rollup merge of #139757 - ognevny:opt-dist-hostllvm, r=KobzolMatthias Krüger-1/+3
opt-dist: use executable-extension for host llvm-profdata because it's used for target llvm-profdata too r? Kobzol
2025-04-14Merge pull request #19583 from Kobzol/revert-19582-ci-pgoLukas Wirth-2/+0
Do not perform PGO on Linux CI
2025-04-14Do not enable PGO in combination with zigbuildJakub Beránek-2/+0
2025-04-14Merge pull request #19568 from snprajwal/destructure-struct-editorLukas Wirth-99/+76
refactor: editor for `destructure_struct_binding`
2025-04-14Disable some r-a tests in bootstrap.Mara Bos-0/+2
2025-04-14Merge pull request #19572 from snprajwal/expand-rest-patternLukas Wirth-53/+66
refactor: migrate `expand_rest_pattern` to editor
2025-04-14Merge pull request #19582 from Kobzol/ci-pgoLukas Wirth-9/+104
Distribute x64 and aarch64 Linux builds with PGO optimizations
2025-04-14Expose Pointer to/from AllocId conversion functions, make some arguments ↵Patrick-6-49/+62
optional
2025-04-14Merge pull request #19569 from snprajwal/fixmesLukas Wirth-75/+79
fix(ast): return correct types for `make::expr_*` methods
2025-04-14Merge pull request #19578 from clouds56-contrib/drive-letterLukas Wirth-12/+35
add normalizeDriveLetter
2025-04-14Merge pull request #19521 from snprajwal/ciLukas Wirth-4/+16
ci: cancel parallel jobs if test fails
2025-04-14Merge pull request #19579 from ChayimFriedman2/cyclic-closureLukas Wirth-7/+65
fix: Prevent panics when there is a cyclic dependency between closures
2025-04-14Use PGO for x64 and aarch64 Linux builds on CIJakub Beránek-3/+6
2025-04-14Add `xdist dist --pgo` command to build Rust Analyzer with PGO optimizationsJakub Beránek-6/+98
2025-04-14Auto merge of #139781 - jhpratt:rollup-qadsjvb, r=jhprattbors-434/+410
Rollup of 9 pull requests Successful merges: - #138336 (Improve `-Z crate-attr` diagnostics) - #139636 (Encode dep node edge count as u32 instead of usize) - #139666 (cleanup `mir_borrowck`) - #139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout) - #139699 (Proactively update coroutine drop shim's phase to account for later passes applied during shim query) - #139718 (enforce unsafe attributes in pre-2024 editions by default) - #139722 (Move some things to rustc_type_ir) - #139760 (UI tests: migrate remaining compile time `error-pattern`s to line annotations when possible) - #139776 (Switch attrs to `diagnostic::on_unimplemented`) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-14Move `has_self` field to `hir::AssocKind::Fn`.Nicholas Nethercote-19/+17
`hir::AssocItem` currently has a boolean `fn_has_self_parameter` field, which is misplaced, because it's only relevant for associated fns, not for associated consts or types. This commit moves it (and renames it) to the `AssocKind::Fn` variant, where it belongs. This requires introducing a new C-style enum, `AssocTag`, which is like `AssocKind` but without the fields. This is because `AssocKind` values are passed to various functions like `find_by_ident_and_kind` to indicate what kind of associated item should be searched for, and having to specify `has_self` isn't relevant there. New methods: - Predicates `AssocItem::is_fn` and `AssocItem::is_method`. - `AssocItem::as_tag` which converts `AssocItem::kind` to `AssocTag`. Removed `find_by_name_and_kinds`, which is unused. `AssocItem::descr` can now distinguish between methods and associated functions, which slightly improves some error messages.
2025-04-14Use `Symbol` in `LateContext::get_associated_type`.Nicholas Nethercote-8/+8
To avoid unnecessary interning.
2025-04-14Prevent panics when there is a cyclic dependency between closuresChayim Refael Friedman-7/+65
We didn't include them in the sorted closures list, therefore didn't analyze them, then failed to find them.
2025-04-13Rollup merge of #139695 - jieyouxu:compiletest-utf8path, r=KobzolJacob Pratt-434/+410
compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout compiletest already practically assumes UTF-8 paths everywhere. Use `camino`'s `{Utf8Path,Utf8PathBuf}` consistently throughout compiletest to enforce UTF-8 path assumptions. r? ```@Kobzol``` (or compiler/bootstrap)
2025-04-14Auto merge of #124141 - ↵bors-7/+7
nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov Remove `Nonterminal` and `TokenKind::Interpolated` A third attempt at this; the first attempt was #96724 and the second was #114647. r? `@ghost`
2025-04-14fix formatClouds Flowing-2/+8
2025-04-14add normalizeDriveLetterClouds Flowing-12/+29
2025-04-14Ignore errors from rustfmt which may trigger error notificationyukang-1/+5