about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-28Update target maintainers for thumb targets to reflect new REWG Arm team nameAdam Greig-10/+5
2025-03-27Rollup merge of #139010 - madsmtm:parse-xcrun-better, r=wesleywiserJacob Pratt-6/+12
Improve `xcrun` error handling The compiler invokes `xcrun` on macOS when linking Apple targets, to find the Xcode SDK which contain all the necessary linker stubs. The error messages that `xcrun` outputs aren't always that great though, so this PR tries to improve that by providing extra context when an error occurs. Fixes https://github.com/rust-lang/rust/issues/56829. Fixes https://github.com/rust-lang/rust/issues/84534. Part of https://github.com/rust-lang/rust/issues/129432. See also the alternative https://github.com/rust-lang/rust/pull/131433. Tested on: - `x86_64-apple-darwin`, MacBook Pro running Mac OS X 10.12.6 - With no tooling installed - With Xcode 9.2 - With Xcode 9.2 Commandline Tools - `aarch64-apple-darwin`, MacBook M2 Pro running macOS 14.7.4 - With Xcode 13.4.1 - With Xcode 16.2 - Inside `nix-shell -p xcbuild` (nixpkgs' `xcrun` shim) - `aarch64-apple-darwin`, VM running macOS 15.3.1 - With no tooling installed - With Xcode 16.2 Commandline Tools ``@rustbot`` label O-apple r? compiler CC ``@BlackHoleFox`` ``@thomcc``
2025-03-27search.js: revert usage of nonundef for now (not available under test)binarycat-2/+3
specifically, `storage.js` is not loaded during `rustdoc-js` and `rustdoc-js-std` tests.
2025-03-28Add `{ast,hir,thir}::PatKind::Missing` variants.Nicholas Nethercote-5/+12
"Missing" patterns are possible in bare fn types (`fn f(u32)`) and similar places. Currently these are represented in the AST with `ast::PatKind::Ident` with no `by_ref`, no `mut`, an empty ident, and no sub-pattern. This flows through to `{hir,thir}::PatKind::Binding` for HIR and THIR. This is a bit nasty. It's very non-obvious, and easy to forget to check for the exceptional empty identifier case. This commit adds a new variant, `PatKind::Missing`, to do it properly. The process I followed: - Add a `Missing` variant to `{ast,hir,thir}::PatKind`. - Chang `parse_param_general` to produce `ast::PatKind::Missing` instead of `ast::PatKind::Missing`. - Look through `kw::Empty` occurrences to find functions where an existing empty ident check needs replacing with a `PatKind::Missing` check: `print_param`, `check_trait_item`, `is_named_param`. - Add a `PatKind::Missing => unreachable!(),` arm to every exhaustive match identified by the compiler. - Find which arms are actually reachable by running the test suite, changing them to something appropriate, usually by looking at what would happen to a `PatKind::Ident`/`PatKind::Binding` with no ref, no `mut`, an empty ident, and no subpattern. Quite a few of the `unreachable!()` arms were never reached. This makes sense because `PatKind::Missing` can't happen in every pattern, only in places like bare fn tys and trait fn decls. I also tried an alternative approach: modifying `ast::Param::pat` to hold an `Option<P<Pat>>` instead of a `P<Pat>`, but that quickly turned into a very large and painful change. Adding `PatKind::Missing` is much easier.
2025-03-27tester.js: ignore displayTypeSignature if it is nullbinarycat-1/+1
2025-03-27Auto merge of #139023 - jhpratt:rollup-4ou6ei4, r=jhprattbors-58/+148
Rollup of 7 pull requests Successful merges: - #138844 (expand: Leave traces when expanding `cfg` attributes) - #138926 (Remove `kw::Empty` uses from `rustc_middle`.) - #138989 (Clean up a few things in rustc_hir_analysis::check::region) - #138999 (Report compiletest pass mode if forced) - #139014 (Improve suggest construct with literal syntax instead of calling) - #139015 (Remove unneeded LLVM CI test assertions) - #139016 (Add job duration changes to post-merge analysis report) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-27Delete from_method from rustc_on_unimplemented documentationmejrs-3/+0
2025-03-27Rollup merge of #139016 - Kobzol:post-merge-analysis-durations, r=marcoieniJacob Pratt-9/+118
Add job duration changes to post-merge analysis report This should help us observe large regressions in job duration changes. I would also like to add quick links to GH jobs/workflow to the post-merge workflow, but for that I first need to store some CI metadata to the bootstrap metrics, to make it easier to lookup the corresponding GH workflows (otherwise we'd need to look them up by commit SHA, which would be much more complicated). The last commit adds this metadata. Once this PR is merged, and the metadata will be available in the metrics stored on S3, I'll send a follow-up PR that uses the metadata to add links to job names in the post-merge workflow report. r? `@marcoieni`
2025-03-27Rollup merge of #139015 - Kobzol:llvm-ci-test-fixes, r=onur-ozkanJacob Pratt-21/+1
Remove unneeded LLVM CI test assertions The `download_ci_llvm` bootstrap test was checking implementation details of the LLVM CI download check, which isn't very useful. It was essentially testing "if function_that_checks_if_llvm_ci_is_available returns true, we enable CI LLVM", but the usage of the function was an implementation detail. After https://github.com/rust-lang/rust/pull/138704, the inner implementation has changed, so the test now breaks if LLVM is updated. I don't think that it's very useful to test implementation details like this, without taking the outside git state into account. Ideally, we should mock the git state for the test, otherwise the test will randomly break when executed in environments which the test does not control (e.g. on CI when a LLVM change happens). I only kept the part of the test that checks that LLVM CI isn't used when we specify `download-ci-llvm = false`, as that should hold under all conditions, CI/local, and all git states. I also kept the `if-unchanged` assertion, but only on CI, and as a temporary measure. After https://github.com/rust-lang/rust/pull/138591, we should have a proper way of mocking the git state to make the test robust, and make it test what we actually want. Fixes [this](https://github.com/rust-lang/rust/pull/138784#issuecomment-2751460456). r? `@ghost`
2025-03-27Rollup merge of #138999 - jieyouxu:spellout-pass-mode, r=wesleywiserJacob Pratt-12/+17
Report compiletest pass mode if forced This is very non-obvious if it fails in PR CI, because the starting invocation is miles away from the final test suite outcome.
2025-03-27Rollup merge of #138926 - nnethercote:less-kw-Empty-rustc_middle, r=lcnrJacob Pratt-6/+3
Remove `kw::Empty` uses from `rustc_middle`. There are several places in `rustc_middle` that check for an empty lifetime name. These checks appear to be totally unnecessary, because empty lifetime names aren't produced here. (Empty lifetime names *are* possible in `hir::Lifetime`. Perhaps there was some confusion between it and the `rustc_middle` types?) This commit removes the `kw::Empty` checks. r? `@lcnr`
2025-03-27Rollup merge of #138844 - petrochenkov:cfgtrace2, r=nnethercoteJacob Pratt-10/+9
expand: Leave traces when expanding `cfg` attributes This is the same as https://github.com/rust-lang/rust/pull/138515, but for `cfg(true)` instead of `cfg_attr`. The difference is that `cfg(true)`s already left "traces" after themselves - the `cfg` attributes themselves, with `expanded_inert_attrs` set to true, with full tokens, available to proc macros. This is not a reasonably expected behavior, but it could not be removed without a replacement, because a [major rustdoc feature](https://github.com/rust-lang/rfcs/pull/3631) and a number of clippy lints rely on it. This PR implements a replacement. This needs a crater run, because it changes observable behavior (in an intended way) - proc macros can no longer see expanded `cfg(true)` attributes. (Some minor unnecessary special casing for `sym::cfg_attr` is also removed in this PR.) r? `@nnethercote`
2025-03-27Only take outer attributes into account when generating content between ↵Guillaume Gomez-120/+19
first non-crate items and the crate items
2025-03-27add changeInfo to change trackerbit-aloo-0/+5
2025-03-27feat(config): Add ChangeId enum for suppressing warningsbit-aloo-48/+70
Introduces the `ChangeId` enum to allow suppressing `change_id` warnings. Now, `ChangeId` supports both numeric values and the string literal `"ignore"`. Numeric values behave as expected, while `"ignore"` is used to suppress warning messages.
2025-03-27Add CI metadata to bootstrap metricsJakub Beránek-5/+36
This will allow us to provide links to CI workflows, jobs and summaries in the post-merge analysis report.
2025-03-27librustdoc: also stabilize iteration order hereAugie Fackler-1/+2
2025-03-27Remove recursion in `check_item`Guillaume Gomez-16/+4
2025-03-27Add new regression test for doctestGuillaume Gomez-0/+131
2025-03-27Auto merge of #138927 - nnethercote:rearrange-Item-ItemInner, r=GuillaumeGomezbors-37/+46
rustdoc: Rearrange `Item`/`ItemInner`. The `Item` struct is 48 bytes and contains a `Box<ItemInner>`; `ItemInner` is 104 bytes. This is an odd arrangement. Normally you'd have one of the following. - A single large struct, which avoids the allocation for the `Box`, but can result in lots of wasted space in unused parts of a container like `Vec<Item>`, `HashSet<Item>`, etc. - Or, something like `struct Item(Box<ItemInner>)`, which requires the `Box` allocation but gives a very small Item size, which is good for containers like `Vec<Item>`. `Item`/`ItemInner` currently gets the worst of both worlds: it always requires a `Box`, but `Item` is also pretty big and so wastes space in containers. It would make sense to push it in one direction or the other. #138916 showed that the first option is a regression for rustdoc, so this commit does the second option, which improves speed and reduces memory usage. r? `@GuillaumeGomez`
2025-03-27Improve codeGuillaume Gomez-34/+29
2025-03-27run a few more concurrency tests on aarch64-linux-androidRalf Jung-4/+4
2025-03-27Apply `collapsible_if` to Clippy itselfSamuel Tardieu-10/+10
Since Clippy uses the `let_chains` feature, there are many occasions to collapse `if` and `if let` statements.
2025-03-27Allow crate authors to control completion of their thingsChayim Refael Friedman-291/+768
Via the new `#[rust_analyzer::completions(...)]` attribute. Also fix a bug with existing settings for that where the paths wouldn't resolve correctly.
2025-03-27Add `expect` to the list of non-crate attributes for doctest generationGuillaume Gomez-1/+1
2025-03-27Improve code commentGuillaume Gomez-2/+2
2025-03-27Improve comment and test for generated doctest with code commentsGuillaume Gomez-3/+26
2025-03-27Add a note about interpreting job duration changesJakub Beránek-1/+9
2025-03-27Add cache for job metricsJakub Beránek-1/+19
2025-03-27Add job duration changes stats in post-merge analysisJakub Beránek-5/+57
2025-03-27Correctly handle line comments in attributes and generate extern cratesGuillaume Gomez-18/+62
outside of wrapping function
2025-03-27Correctly handle `fn main` in macroGuillaume Gomez-18/+35
2025-03-27Greatly simplify doctest parsing and information extractionGuillaume Gomez-323/+136
2025-03-27Remove some asserts from the `download_ci_llvm` bootstrap testJakub Beránek-21/+1
2025-03-27Merge pull request #19460 from Veykril/push-krmvxxvrlmyxLukas Wirth-2/+3
fix: Fix `format_args` lowering using wrong integer suffix
2025-03-27Remove `kw::Empty` uses from `src/librustdoc`.Nicholas Nethercote-6/+3
Much like the ones in the previous commit.
2025-03-27Merge pull request #19459 from Veykril/push-swywyozvsqowLukas Wirth-41/+41
refactor: Shuffle some unsafety around in proc-macro-srv
2025-03-27fix: Fix `format_args` lowering using wrong integer suffixLukas Wirth-2/+3
2025-03-27refactor: Shuffle some unsafety around in proc-macro-srvLukas Wirth-41/+41
2025-03-27Merge pull request #19457 from Veykril/push-xpmluxlzprpyLukas Wirth-12/+63
chore: Remove salsa dependency from proc-macro server again
2025-03-27chore: Remove salsa dependency from proc-macro server againLukas Wirth-12/+63
2025-03-27Rollup merge of #138946 - Urgau:platform-support-bottom, r=jieyouxuStuart Cook-13/+16
Un-bury chapters from the chapter list in rustc book This PR moves the "Platform Support" section to the bottom of rustc chapter book, as to un-burry chapters from the chapter list, which where hidden by the wall of targets. | Before | After | |--------|-------| | ![image](https://github.com/user-attachments/assets/92769307-eadb-4d9d-bdbb-9e610207eb79) | ![image](https://github.com/user-attachments/assets/1834f5c5-a1e6-4674-9be2-1094d1376eda) | r? ````@jieyouxu````
2025-03-27Rollup merge of #138624 - LukasWoodtli:gardena/lw/mipsel-maintainer, r=jieyouxuStuart Cook-1/+30
Add mipsel maintainer
2025-03-27Document how the SDK is found if SDKROOT is not setMads Marquart-6/+12
I've intentionally used slightly vague language ("roughly"), as we don't want to guarantee the exact invocation of `xcrun`, just hint that it's close to that.
2025-03-26satisfy eslintbinarycat-3/+3
2025-03-26Update cargoWeihang Lo-0/+0
2025-03-27Report compiletest pass mode if forcedJieyou Xu-12/+17
This is very non-obvious if it fails in PR CI.
2025-03-26expand: Leave traces when expanding `cfg` attributesVadim Petrochenkov-10/+9
2025-03-26Auto merge of #138974 - Zalathar:rollup-568cpmy, r=Zalatharbors-54/+178
Rollup of 7 pull requests Successful merges: - #138483 (Target modifiers fix for bool flags without value) - #138818 (Don't produce debug information for compiler-introduced-vars when desugaring assignments.) - #138898 (Mostly parser: Eliminate code that's been dead / semi-dead since the removal of type ascription syntax) - #138930 (Add bootstrap step diff to CI job analysis) - #138954 (Ensure `define_opaque` attrs are accounted for in HIR hash) - #138959 (Revert "Make MatchPairTree::place non-optional") - #138967 (Fix typo in error message) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-26Rollup merge of #138930 - Kobzol:analyze-bootstrap-diffs, r=marcoieniStuart Cook-51/+178
Add bootstrap step diff to CI job analysis This PR adds another analysis to the job analysis report in GitHub summary. It compares (diffs) bootstrap steps executed by the parent run and by the current commit. This will help us figure out if the bootstrap invocation did something different than before, and also how did the duration of individual steps and bootstrap invocations change. Can be tested on the https://github.com/rust-lang/rust/pull/119899 PR like this: ```bash $ curl https://ci-artifacts.rust-lang.org/rustc-builds/3d3394eb64ee2f99ad1a2b849b376220fd38263e/metrics-mingw-check.json > metrics.json $ cargo run --manifest-path src/ci/citool/Cargo.toml postprocess-metrics metrics.json --job-name mingw-check --parent 961351c76c812e3aeb65bfb542742500a6436aed > out.md ``` r? `@marcoie`