about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-23Rollup merge of #138858 - jieyouxu:ct-llvm-components, r=onur-ozkanMichael Goulet-4/+5
Say which test failed the `COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS` assertion Closes #138857. This is of course a spot fix. The general problem requires reworking compiletest directive handling's diagnostics logic.
2025-03-23Rollup merge of #138641 - jieyouxu:print-supported-crate-types, r=UrgauMichael Goulet-0/+27
Add unstable `--print=supported-crate-types` option MCP: https://github.com/rust-lang/compiler-team/issues/836 Tracking issue: https://github.com/rust-lang/rust/issues/138640 ### Test coverage Two tests: 1. `tests/ui/print-request/stability.rs` to check that `--print=supported-crate-types` is `-Zunstable-options`-gated 2. `tests/ui/print-request/supported-crate-types.rs` is added as a basic smoke test. Observe that the compiler stdout corresponds to the below *Example output* section (e.g. `proc-macro` is unsupported on `wasm32-unknown-unknown` currently). ### Example output <details> <summary>For `x86_64-unknown-linux-gnu`</summary> Notice the presence of `{c,}dylib` and `proc-macro`: ``` bin cdylib dylib lib proc-macro rlib staticlib ``` </details> <details> <summary>For `wasm32-unknown-unknown`</summary> Notice the absence of `dylib` and `proc-macro`: ``` bin cdylib lib rlib staticlib ``` </details> <details> <summary>For `x86_64-unknown-linux-musl`</summary> Notice the absence of `{c,}dylib` but presence of `proc-macro`: ``` bin lib proc-macro rlib staticlib ``` </details> ### Documentation I added an entry in the unstable book's print request section to document this `supported-crate-types` print request. ### Unresolved questions - [ ] (Name bikeshedding) is `supported-crate-types` a good name for the print request? I'm inclined to say it's good enough for an unstable print request, but may be worth revisiting at stabilization time. ### Stability This print request being added is *unstable* in this PR. A separate stabilization PR following the usual compiler flag stabilization procedure should be filed for stabilization after some baking time. ### Review remarks Best reviewed commit-by-commit. r? compiler
2025-03-23Rollup merge of #138293 - clubby789:doc-cfg-gate, r=GuillaumeGomezMichael Goulet-11/+12
rustdoc: Gate unstable `doc(cfg())` predicates Fixes #138113 Since the extraction process treats `cfg(true)` as having no cfg attribute, we have to do the gating during parsing; so we remove the unused `features` arg from `Cfg::matches`
2025-03-23Rework `--print` options documentationUrgau-52/+214
2025-03-23Say which test failed the `COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS` assertionJieyou Xu-4/+5
2025-03-23Document `supported-crate-types` print request in unstable bookJieyou Xu-0/+27
2025-03-23doc: fix reference to #create-a-configtomlChiichen-1/+1
2025-03-22Auto merge of #138841 - matthiaskrgr:rollup-bfkls57, r=matthiaskrgrbors-21/+105
Rollup of 8 pull requests Successful merges: - #138018 (rustdoc: Use own logic to print `#[repr(..)]` attributes in JSON output.) - #138294 (Mark some std tests as requiring `panic = "unwind"`) - #138468 (rustdoc js: add nonnull helper and typecheck src-script.js) - #138675 (Add release notes for 1.85.1) - #138765 (Fix Thread::set_name on cygwin) - #138786 (Move some driver code around) - #138793 (target spec check: better error when llvm-floatabi is missing) - #138822 (De-Stabilize `file_lock`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-22Auto merge of #138831 - matthiaskrgr:rollup-3t0dqiz, r=matthiaskrgrbors-4/+1
Rollup of 7 pull requests Successful merges: - #138609 (Add stack overflow handler for cygwin) - #138639 (Clean UI tests 2 of n) - #138773 (catch_unwind intrinsic: document return value) - #138782 (test(ui): add tuple-struct-where-clause-suggestion ui test for #91520) - #138794 (expand: Do not report `cfg_attr` traces on macros as unused attributes) - #138801 (triagebot: add autolabel rules for D-* and L-*) - #138804 (Allow inlining for `Atomic*::from_ptr`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-22Rollup merge of #138468 - lolbinarycat:rustdoc-js-less-expect-error-part3, ↵Matthias Krüger-9/+70
r=notriddle rustdoc js: add nonnull helper and typecheck src-script.js this removes ``@ts-nocheck`` from `src-script.js` and adds a `nonnull` helper function that assists in adding null checks to places where null values should be impossible. r? `@notriddle`
2025-03-22rustdoc: Use own logic to print `#[repr(..)]` attributes in JSON output.Predrag Gruevski-12/+35
2025-03-22rustdoc: be more strict about "Methods from Deref"binarycat-3/+32
hack: is_doc_subtype_of always returns true for TyAlias it's worth noting that this function is only used in the handling of "Methods from Deref", and we were previously assuming all generic parameters were meaningless, so this is still an improvment from the status quo. this change means that we will have strictly less false positives without adding any new false negitives. Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-03-22Group test diffs by stage in post-merge analysisJakub Beránek-18/+25
2025-03-22Rollup merge of #138639 - spencer3035:clean-ui-tests-2-of-n, r=jieyouxuMatthias Krüger-4/+1
Clean UI tests 2 of n Modified 4 tests in tests/ui. Cleaned 3 and deleted one. I have a final commit changing the values in `src/tools/tidy/src/ui_tests.rs`. I wasn't sure if it was best practice to change this value as you go along or once at the end. I can rebase to something that incrementally changes the value in the "cleaned" commits if that is preferred. Related Issues: #73494 #133895 r? jieyouxu
2025-03-22Rollup merge of #138763 - aDotInTheVoid:two-years-later, r=GuillaumeGomezMatthias Krüger-2/+17
jsondocck: Replace `jsonpath_lib` with `jsonpath-rust` The current jsonpath implementation we use isn't spec-compliant, and is buggy. See https://github.com/freestrings/jsonpath/issues/91 To solve it, it's replaced with https://github.com/besok/jsonpath-rust. This is spec-compiant, and doesn't have a really awkward bug we need to always dance around. Unfortunately, this requires rewriting almost every test, as the behaviour of `[?(```@`,``` which is *extremely* common was changed. (But the new behaviour makes way more sense, and isn't buggy with tripply nested selectors) Unblocks #110406. Makes #100515 much easier as we don't need to explain the broken JSONPath implementation Best reviewed commit-by-commit. The first does the replacement. The next two rewrite the test-suite mechanically. The last rewrites the test-suite by hand. r? ```@GuillaumeGomez```
2025-03-22Rollup merge of #138535 - yotamofek:pr/rustdoc/lang-string-parse-cleanup, ↵Matthias Krüger-44/+41
r=notriddle Cleanup `LangString::parse` Flatten some `if`s into match patterns Use `str::strip_prefix` instead of `starts_with`+indexing Avoid redundant tests for `extra.is_some()`
2025-03-21cleaned and organized 3 tests in `./tests/ui/issues`Spencer-4/+1
2025-03-22Auto merge of #138808 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 14 commits in 6cf8267012570f63d6b86e85a2ae5627de52df9e..307cbfda3119f06600e43cd38283f4a746fe1f8b 2025-03-14 15:25:36 +0000 to 2025-03-20 20:00:39 +0000 - feat: Add custom completer for cargo &lt;TAB&gt; to complete aliases defined in config.toml (rust-lang/cargo#15319) - fix(build-dir): Renamed workspace-manifest-path-hash to workspace-path-hash (rust-lang/cargo#15334) - feat: vcs, color, and message format native completion (rust-lang/cargo#15322) - Fix `[env]` `relative` description in reference (rust-lang/cargo#15332) - chore: fix some typos (rust-lang/cargo#15329) - Cleanup for rustc-link-arg-cdylib (rust-lang/cargo#15326) - fix(toml): Report '&lt;target&gt;.edition' deprecation to users (rust-lang/cargo#15321) - test(build-std): address overly-matched snapshot (rust-lang/cargo#15325) - Added `build.build_dir` templating support (rust-lang/cargo#15236) - docs: make it clearer that `rust_version` is enforced during compile (rust-lang/cargo#15303) - feat: Add custom completer for cargo +&lt;TAB&gt; to complete toolchain name (rust-lang/cargo#15301) - chore: fix some typos (rust-lang/cargo#15316) - fix: deduplicate crate types in cargo rustc command (rust-lang/cargo#15314) - docs: mention wrong URLs as a cause of git authentication errors (rust-lang/cargo#15304) r? ghost
2025-03-21Update cargoWeihang Lo-0/+0
2025-03-21Auto merge of #138791 - matthiaskrgr:rollup-ev46cqr, r=matthiaskrgrbors-57/+62
Rollup of 9 pull requests Successful merges: - #138364 (ports the compiler test cases to new rust_intrinsic format) - #138570 (add `naked_functions_target_feature` unstable feature) - #138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - #138627 (Autodiff cleanups) - #138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - #138706 (Improve bootstrap git modified path handling) - #138709 (Update GCC submodule) - #138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - #138721 (Use explicit cpu in some asm and codegen tests.) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-21Rollup merge of #138709 - Kobzol:update-gcc, r=GuillaumeGomezMatthias Krüger-0/+0
Update GCC submodule Includes https://github.com/rust-lang/gcc/pull/66 to use our mirrors for downloading GCC dependencies. r? ```@GuillaumeGomez```
2025-03-21Rollup merge of #138706 - Kobzol:bootstrap-git-refactor-1, r=onur-ozkanMatthias Krüger-56/+58
Improve bootstrap git modified path handling Drive-by improvements extracted out of https://github.com/rust-lang/rust/pull/138591. r? ``@onur-ozkan``
2025-03-21Rollup merge of #138623 - daltenty:daltenty/fix-compiler-rt, r=KobzolMatthias Krüger-1/+4
[bootstrap] Use llvm_runtimes for compiler-rt Trying to enable `compiler-rt` via `LLVM_ENABLE_PROJECTS` is no longer a supported option in LLVM, and gives you nasty warnings: ``` Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will become a fatal error in the LLVM 21 release. Please use -DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at https://compiler-rt.llvm.org/ for building the runtimes. ``` try-job: aarch64-gnu-debug try-job: x86_64-gnu-debug
2025-03-21Merge pull request #4236 from RalfJung/rustupRalf Jung-1266/+5089
Rustup
2025-03-21Merge from rustcRalf Jung-1265/+5088
2025-03-21Preparing for merge from rustcRalf Jung-1/+1
2025-03-21Fix test using `download-ci-llvm=true` on CIJakub Beránek-1/+1
2025-03-21Disable CI mode when checking default bootstrap profilesJakub Beránek-1/+2
2025-03-21Set `if-unchanged` as the default value for `download-ci-llvm` when we're on CI.Jakub Beránek-1/+8
2025-03-21Allow unused code in testsJakub Beránek-0/+1
To avoid working around some code being unused in tests due to it being stubbed out with `#[cfg(test)]`.
2025-03-21Remove duplicated check for LLVM modifications and disable ↵Jakub Beránek-42/+23
`download-ci-llvm=true` on CI
2025-03-21Unify LLVM invalidation path handlingJakub Beránek-17/+18
Before it was using a different set of paths in different call-sites.
2025-03-21catch_unwind: do not permit catch function to unwindRalf Jung-1/+2
2025-03-21Stub out codegen backend test pagesJieyou Xu-2/+28
2025-03-21Move Fuchsia and RfL under `ecosystem-test-jobs/` folderJieyou Xu-9/+11
Includes redirects to avoid breaking existing links.
2025-03-21update rustfmt testlcnr-2/+2
2025-03-21remove `feature(inline_const_pat)`lcnr-24/+0
2025-03-21Auto merge of #138768 - matthiaskrgr:rollup-nfu3cm3, r=matthiaskrgrbors-77/+421
Rollup of 8 pull requests Successful merges: - #137357 (Document results of non-positive logarithms) - #138650 (Optimize `io::Write::write_fmt` for constant strings) - #138694 (Fix: add ohos target notes) - #138713 (interpret memory access hooks: also pass through the Pointer used for the access) - #138724 (Check attrs: Don't try to retrieve the name of list stems) - #138743 (bootstrap: add `--ci` flag) - #138751 (Fix the "used_with_archive" test on Fuchsia) - #138754 (Handle spans of `~const`, `const` and `async` trait bounds in macro expansion) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-21Rollup merge of #138743 - onur-ozkan:override-is-ci-behaviour, r=KobzolMatthias Krüger-74/+415
bootstrap: add `--ci` flag To make bootstrap act like it's running on CI, we had to override the `GITHUB_ACTIONS` environment variable which is a hidden detail of `CiEnv::is_ci`. Now, we can use the `--ci` flag directly on bootstrap which will be documented automatically from `x --help`. This also helps us to avoid race conditions on bootstrap (overriding `GITHUB_ACTIONS` env in each test can cause that if we run the tests in parallel) tests.
2025-03-21Rollup merge of #138713 - RalfJung:memory-hook-pointers, r=oli-obkMatthias Krüger-0/+3
interpret memory access hooks: also pass through the Pointer used for the access In some ongoing work on the Miri side, we need the absolute address that the memory access occurred at. That is non-trivial to obtain since we don't have an `ecx`. So pass through the `Pointer` used for the access, which contains the address, and which is available everywhere we are calling these hooks. r? `@oli-obk`
2025-03-21Rollup merge of #138694 - LuuuXXX:fix-platform-support-book, r=jieyouxuMatthias Krüger-3/+3
Fix: add ohos target notes
2025-03-21Auto merge of #138761 - flip1995:clippy-subtree-update, r=Manishearthbors-1143/+4610
Clippy subtree update r? `@Manishearth` Cargo.lock update is because of the `ui_test` dependency bump in Clippy.
2025-03-21jsondocck: Replace `jsonpath_lib` with `jsonpath-rust`Alona Enraght-Moony-2/+17
2025-03-20Auto merge of #138747 - matthiaskrgr:rollup-68x44rw, r=matthiaskrgrbors-52/+89
Rollup of 8 pull requests Successful merges: - #138435 (Add support for postfix yield expressions) - #138685 (Use `Option<Ident>` for lowered param names.) - #138700 (Suggest `-Whelp` when pass `--print lints` to rustc) - #138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`) - #138729 (Clean up `FnCtxt::resolve_coroutine_interiors`) - #138731 (coverage: Add LLVM plumbing for expansion regions) - #138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`) - #138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-20Merge commit '1e5237f4a56ae958af7e5824343eacf737b67083' into ↵Philipp Krones-1144/+4611
clippy-subtree-update
2025-03-20Auto merge of #138515 - petrochenkov:cfgtrace, r=nnethercotebors-1/+5
expand: Leave traces when expanding `cfg_attr` attributes Currently `cfg_trace` just disappears during expansion, but after this PR `#[cfg_attr(some tokens)]` will leave a `#[cfg_attr_trace(some tokens)]` attribute instead of itself in AST after expansion (the new attribute is built-in and inert, its inner tokens are the same as in the original attribute). This trace attribute can then be used by lints or other diagnostics, #133823 has some examples. Tokens in these trace attributes are set to an empty token stream, so the traces are non-existent for proc macros and cannot affect any user-observable behavior. This is also a weakness, because if a proc macro processes some code with the trace attributes, they will be lost, so the traces are best effort rather than precise. The next step is to do the same thing with `cfg` attributes (`#[cfg(TRUE)]` currently remains in both AST and tokens after expanding, it should be replaced with a trace instead). The idea belongs to `@estebank.`
2025-03-20Update `ParamEnv` section for `TypingEnv` changesBoxy-211/+211
2025-03-20interpret memory access hooks: also pass through the Pointer used for the accessRalf Jung-0/+3
2025-03-20Rollup merge of #138735 - jieyouxu:drop-llvm-alias, r=nikicMatthias Krüger-7/+10
Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group Because it's way too easy to confuse LLVM Icebreakers ping group versus trying to ping WG-llvm. And AFAIK, icebreakers-llvm isn't really used in a good while. I also fixed the rustc-dev-guide docs about ``@rustbot` ping llvm` (and changed that to the raw ping group name ``@rustbot` icebreakers-llvm`) because it's very confusing. Previously discussed in [#t-compiler/wg-llvm > Ping group renaming](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fwg-llvm/topic/Ping.20group.20renaming/with/453005029). FYI `@rust-lang/wg-llvm` FYI `@RalfJung` (since you asked in https://github.com/rust-lang/rust/pull/138120#issuecomment-2710466874) r? `@nikic` (or wg-llvm)
2025-03-20Rollup merge of #138685 - ↵Matthias Krüger-37/+42
nnethercote:use-Option-Ident-for-lowered-param-names, r=compiler-errors Use `Option<Ident>` for lowered param names. Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`. - If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type. - If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs. This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases. Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in #138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing. r? ``@compiler-errors``