about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-18rename htmldocck.md -> rustdoc-test-suite.mdbinarycat-1/+1
2025-03-18rustdoc test suite: clean up wording and introbinarycat-3/+6
2025-03-18htmldocck: expand limitations and mention compiletest directivesbinarycat-3/+9
2025-03-18add htmldocck.md to SUMMARY.mdbinarycat-1/+1
2025-03-18add new section on the `rustdoc` test suitebinarycat-8/+109
2025-03-18Add Fuchsia ping group pageJakub Beránek-2/+16
2025-03-18Reorder RfL tests page to move the "what if it breaks" section to the topJakub Beránek-20/+20
2025-03-18Add Fuchsia ping group noticeJakub Beránek-0/+8
2025-03-18Merge pull request #2268 from xizheyin/issue-137421许杰友 Jieyou Xu (Joe)-0/+56
Add issue link for explaining that why rustc_private linker fails
2025-03-18Add chapter Remarks on perma-unstable featuresxizheyin-0/+56
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-18Revert "Rollup merge of #136355 - ↵Ralf Jung-9/+2
GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu" This reverts commit 08dfbf49e30d917c89e49eb14cb3f1e8b8a1c9ef, reversing changes made to 10bcdad7df0de3cfb95c7bdb7b16908e73cafc09.
2025-03-18Merge pull request #19391 from Veykril/push-rnrskpqoltplLukas Wirth-30/+17
chore: Clean up proc-macro-srv CI job
2025-03-18chore: Clean up proc-macro-srv CI jobLukas Wirth-30/+17
2025-03-18refactor: Do not use `Expander` in assoc item loweringLukas Wirth-125/+106
`Expander` is a macro expansion solution for body lowering, there is no need to use it here
2025-03-18Remove double nesting in post-merge workflowJakub Beránek-8/+1
2025-03-18reintroduce remote-test support in run-make testsPietro Albini-1/+14
The old Makefile-based infrastructure included support for executing binaries with remote-test-client if configured, but that didn't get ported to run_make_support as part of the rmake migration. This PR re-introduces back that support, with the same implementation (and limitations) of the original Makefile-based support.
2025-03-18Rollup merge of #138080 - moxian:bootstrap-breadcrumb, r=jieyouxuMatthias Krüger-2/+3
Leave a breadcrumb towards bootstrap config documentation in `bootstrap.toml` I was curious as to the possible bootstrap options I can put in config.toml, but had some trouble figuring it out. There is no obvious documentation in `config.toml` (obviously), the documentation in src/bootstrap/defaults is *nice*, but also rather sparse, by design. I had to dive into the parsing code, and stuble upon [a very helpful doc comment](https://github.com/rust-lang/rust/blob/30f168ef811aec63124eac677e14699baa9395bd/src/bootstrap/src/core/config/config.rs#L181) there to realize that `config.example.toml` *exists*, and that it does, indeed, answer all of my questions. So I figured it might be worth making this journey a bit easier for future contributors and add mention the `config.example.toml` directly in `config.toml`. Now, since #137081 is in-flight which would rename `config(.example)?.toml` to `bootstrap(.example)?.toml`, I figure it's better to wait until that one lands, and submit the "new", "correct" filename upfront, instead of landing `config.toml` now and updating it to `boostrap.toml` later. `@rustbot` blocked #137081
2025-03-18Auto merge of #138630 - matthiaskrgr:rollup-kk1gogr, r=matthiaskrgrbors-709/+770
Rollup of 7 pull requests Successful merges: - #138384 (Move `hir::Item::ident` into `hir::ItemKind`.) - #138508 (Clarify "owned data" in E0515.md) - #138531 (Store test diffs in job summaries and improve analysis formatting) - #138533 (Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitly) - #138556 (Fix ICE: attempted to remap an already remapped filename) - #138608 (rustc_target: Add target feature constraints for LoongArch) - #138619 (Flatten `if`s in `rustc_codegen_ssa`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-18Merge from rustcJieyou Xu-1382/+1612
2025-03-18Preparing for merge from rustcJieyou Xu-1/+1
2025-03-17Teach rustfmt to handle postfix yieldEric Holk-21/+21
This involved fixing the span when parsing .yield
2025-03-17[bootstrap] Distribute split debuginfo if presentWesley Wiser-99/+255
If debuginfo has been requested in `config.toml`, it should be packaged alongside the appropriate binary when running `x.py dist`. Currently, this is only implemented for msvc environments where split debuginfo is (basically) the only option. I've tested that this correctly packages the `.pdb` for each binary in the various dist packages.
2025-03-17Auto merge of #127173 - bjorn3:mangle_rustc_std_internal_symbol, ↵bors-19/+64
r=wesleywiser,jieyouxu Mangle rustc_std_internal_symbols functions This reduces the risk of issues when using a staticlib or rust dylib compiled with a different rustc version in a rust program. Currently this will either (in the case of staticlib) cause a linker error due to duplicate symbol definitions, or (in the case of rust dylibs) cause rustc_std_internal_symbols functions to be silently overridden. As rust gets more commonly used inside the implementation of libraries consumed with a C interface (like Spidermonkey, Ruby YJIT (curently has to do partial linking of all rust code to hide all symbols not part of the C api), the Rusticl OpenCL implementation in mesa) this is becoming much more of an issue. With this PR the only symbols remaining with an unmangled name are rust_eh_personality (LLVM doesn't allow renaming it) and `__rust_no_alloc_shim_is_unstable`. Helps mitigate https://github.com/rust-lang/rust/issues/104707 try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: x86_64-apple-1 try-job: x86_64-mingw-1 try-job: i686-mingw-1 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: test-various try-job: armhf-gnu
2025-03-17Rollup merge of #138556 - charmitro:already-remapped-filename, ↵Matthias Krüger-2/+2
r=GuillaumeGomez,Urgau Fix ICE: attempted to remap an already remapped filename This commit fixes an internal compiler error (ICE) that occurs when rustdoc attempts to process macros with a remapped filename. The issue arose during macro expansion when the `--remap-path-prefix` option was used. Instead of passing remapped filenames through, which would trigger the "attempted to remap an already remapped filename" panic, we now extract the original local path from remapped filenames before processing them. A test case has been added to verify this behavior. Fixes #138520
2025-03-17Rollup merge of #138533 - Kobzol:try-job-auto-tests, r=marcoieniMatthias Krüger-19/+26
Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitly Some CI jobs (x64 Linux, ARM64 Linux and x64 MSVC) use the `opt-dist` tool to build an optimized toolchain using PGO and BOLT. When performing a default try build for x64 Linux, in most cases we want to run perf. on that artifact. To reduce the latency of this common use-case, `opt-dist` skips building several components not needed for perf., and it also skips running post-optimization tests, when it detects that the job is executed as a try job (not a merge/auto job). This is useful, but it also means that if you *want* to run the tests, you had to go to `jobs.yml` and manually comment this environment variable, create a WIP commit, do a try build, and then remove the WIP commit, which is annoying (in the similar way that modifying what gets run in try builds was annoying before we had the `try-job` annotations). I thought that we could introduce some additional PR description marker like `try-job-run-tests`, but it's hard to discover that such things exist. Instead, I think that there's a much simpler heuristic for determining whether `DIST_TRY_BUILD` should be used (that I implemented in this PR): - If you do just ``@bors` try`, without any custom try jobs selected, `DIST_TRY_BUILD` will be activated, to finish the build as fast as possible. - If you specify any custom try jobs, you are most likely doing experiments and you want to see if tests pass and everything builds as it should. The `DIST_TRY_BUILD` variable will thus *not* be set in this case. In this way, if you want to run dist tests, you can just add the `try-job: dist-x86_64-linux` line to the PR description, and you don't need to create any WIP commits. r? `@marcoieni`
2025-03-17Rollup merge of #138531 - Kobzol:test-diff-try-build, r=marcoieniMatthias Krüger-470/+515
Store test diffs in job summaries and improve analysis formatting This PR stores the test diffs that we already have in the post-merge workflow also into individual job summaries. This makes it easier to compare test (and later also other) diffs per job, which will be especially useful for try jobs, so that we can actually see the test diffs *before* we merge a given PR. As a drive-by, I also made a bunch of cleanups in `citool` and in the formatting of the summary and post-merge analyses. These changes are split into self-contained commits. The analysis can be tested locally with the following command: ```bash $ curl https://ci-artifacts.rust-lang.org/rustc-builds/<current-sha>/metrics-<job-name>.json > metrics.json $ cargo run --manifest-path src/ci/citool/Cargo.toml postprocess-metrics metrics.json --job-name <job-name> --parent <parent-sha> > out.md ``` For example, for [this PR](https://github.com/rust-lang/rust/pull/138523): ```bash $ curl https://ci-artifacts.rust-lang.org/rustc-builds/282865097d138c7f0f7a7566db5b761312dd145c/metrics-aarch64-gnu.json > metrics.json $ cargo run --manifest-path src/ci/citool/Cargo.toml postprocess-metrics metrics.json --job-name aarch64-gnu --parent d9e5539a39192028a7b15ae596a8685017faecee > out.md ``` Best reviewed commit by commit. r? `@marcoieni` try-job: aarch64-gnu try-job: dist-x86_64-linux
2025-03-17Rollup merge of #138384 - nnethercote:hir-ItemKind-idents, r=fmeaseMatthias Krüger-218/+227
Move `hir::Item::ident` into `hir::ItemKind`. `hir::Item` has an `ident` field. - It's always non-empty for these item kinds: `ExternCrate`, `Static`, `Const`, `Fn`, `Macro`, `Mod`, `TyAlias`, `Enum`, `Struct`, `Union`, Trait`, TraitAalis`. - It's always empty for these item kinds: `ForeignMod`, `GlobalAsm`, `Impl`. - For `Use`, it is non-empty for `UseKind::Single` and empty for `UseKind::{Glob,ListStem}`. All of this is quite non-obvious; the only documentation is a single comment saying "The name might be a dummy name in case of anonymous items". Some sites that handle items check for an empty ident, some don't. This is a very C-like way of doing things, but this is Rust, we have sum types, we can do this properly and never forget to check for the exceptional case and never YOLO possibly empty identifiers (or possibly dummy spans) around and hope that things will work out. This is step towards `kw::Empty` elimination (#137978). r? `@fmease`
2025-03-17Test unsafeness is respected when manual impling derivesAli Bektas-5/+45
2025-03-17Observe unsafeness only for replace_derive_with_manual_implAli Bektas-34/+6
2025-03-17Observe unsafeness when generating manual impls of former derivesAli Bektas-2/+35
2025-03-17Small review improvementsJakub Beránek-2/+2
2025-03-17Use llvm_runtimes for compiler-rtDavid Tenty-1/+4
2025-03-17Merge pull request #19005 from ↵HKalbasi-143/+186
duncanawoods/18955---fix-running-tests-for-packages-with-multiple-targets fix testing packages with multiple targets
2025-03-18Move `hir::Item::ident` into `hir::ItemKind`.Nicholas Nethercote-217/+226
`hir::Item` has an `ident` field. - It's always non-empty for these item kinds: `ExternCrate`, `Static`, `Const`, `Fn`, `Macro`, `Mod`, `TyAlias`, `Enum`, `Struct`, `Union`, Trait`, TraitAalis`. - It's always empty for these item kinds: `ForeignMod`, `GlobalAsm`, `Impl`. - For `Use`, it is non-empty for `UseKind::Single` and empty for `UseKind::{Glob,ListStem}`. All of this is quite non-obvious; the only documentation is a single comment saying "The name might be a dummy name in case of anonymous items". Some sites that handle items check for an empty ident, some don't. This is a very C-like way of doing things, but this is Rust, we have sum types, we can do this properly and never forget to check for the exceptional case and never YOLO possibly empty identifiers (or possibly dummy spans) around and hope that things will work out. The commit is large but it's mostly obvious plumbing work. Some notable things. - A similar transformation makes sense for `ast::Item`, but this is already a big change. That can be done later. - Lots of assertions are added to item lowering to ensure that identifiers are empty/non-empty as expected. These will be removable when `ast::Item` is done later. - `ItemKind::Use` doesn't get an `Ident`, but `UseKind::Single` does. - `lower_use_tree` is significantly simpler. No more confusing `&mut Ident` to deal with. - `ItemKind::ident` is a new method, it returns an `Option<Ident>`. It's used with `unwrap` in a few places; sometimes it's hard to tell exactly which item kinds might occur. None of these unwraps fail on the test suite. It's conceivable that some might fail on alternative input. We can deal with those if/when they happen. - In `trait_path` the `find_map`/`if let` is replaced with a loop, and things end up much clearer that way. - `named_span` no longer checks for an empty name; instead the call site now checks for a missing identifier if necessary. - `maybe_inline_local` doesn't need the `glob` argument, it can be computed in-function from the `renamed` argument. - `arbitrary_source_item_ordering::check_mod` had a big `if` statement that was just getting the ident from the item kinds that had one. It could be mostly replaced by a single call to the new `ItemKind::ident` method. - `ItemKind` grows from 56 to 64 bytes, but `Item` stays the same size, and that's what matters, because `ItemKind` only occurs within `Item`.
2025-03-17Auto merge of #138611 - matthiaskrgr:rollup-hmjbqva, r=matthiaskrgrbors-88/+86
Rollup of 7 pull requests Successful merges: - #133870 (Stabilize `asm_goto` feature gate) - #137449 (Denote `ControlFlow` as `#[must_use]`) - #137465 (mir_build: Avoid some useless work when visiting "primary" bindings) - #138349 (Emit function declarations for functions with `#[linkage="extern_weak"]`) - #138412 (Install licenses into `share/doc/rust/licenses`) - #138577 (rustdoc-json: Don't also include `#[deprecated]` in `Item::attrs`) - #138588 (Avoid double lowering of idents) Failed merges: - #138321 ([bootstrap] Distribute split debuginfo if present) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-17 No edit if no bodyjnyfah-1/+4
2025-03-17Auto merge of #137081 - ↵bors-513/+549
Shourya742:2025-02-15-change-config.toml-to-bootstrap.toml, r=onur-ozkan,jieyouxu,kobzol change config.toml to bootstrap.toml Currently, both Bootstrap and Cargo uses same name as their configuration file, which can be confusing. This PR is based on a discussion to rename `config.toml` to `bootstrap.toml` for Bootstrap. Closes: https://github.com/rust-lang/rust/issues/126875. I have split the PR into atomic commits to make it easier to review. Once the changes are finalized, I will squash them. I am particularly concerned about the changes made to modules that are not part of Bootstrap. How should we handle those changes? Should we ping the respective maintainers?
2025-03-17some changesjnyfah-3/+2
2025-03-17modify config.toml->bootstrap.toml for new upstream changesbit-aloo-4/+4
2025-03-17Rollup merge of #138577 - aDotInTheVoid:deprecate-deprecations, r=GuillaumeGomezMatthias Krüger-10/+13
rustdoc-json: Don't also include `#[deprecated]` in `Item::attrs` Closes #138378 Not sure if this should bump `FORMAT_VERSION` or not. CC `@Enselic` `@LukeMathWalker` `@obi1kenobi` r? `@GuillaumeGomez,` best reviewed commit-by-commit
2025-03-17Rollup merge of #138412 - cuviper:licenses, r=jieyouxuMatthias Krüger-1/+1
Install licenses into `share/doc/rust/licenses` This changes the path from "licences" to "licenses" for consistency across the repo, including the usage directly around this line. This is a US/UK spelling difference, but I believe the US spelling is also more common in open source in general.
2025-03-17Rollup merge of #137449 - compiler-errors:control-flow, r=Amanieu,lnicolaMatthias Krüger-45/+45
Denote `ControlFlow` as `#[must_use]` I've repeatedly hit bugs in the compiler due to `ControlFlow` not being marked `#[must_use]`. There seems to be an accepted ACP to make the type `#[must_use]` (https://github.com/rust-lang/libs-team/issues/444), so this PR implements that part of it. Most of the usages in the compiler that trigger this new warning are "root" usages (calling into an API that uses control-flow internally, but for which the callee doesn't really care) and have been suppressed by `let _ = ...`, but I did legitimately find one instance of a missing `?` and one for a never-used `ControlFlow` value in #137448. Presumably this needs an FCP too, so I'm opening this and nominating it for T-libs-api. This PR also touches the tools (incl. rust-analyzer), but if this went into FCP, I'd split those out into separate PRs which can land before this one does. r? libs-api `@rustbot` label: T-libs-api I-libs-api-nominated
2025-03-17Rollup merge of #133870 - nbdd0121:asm, r=traviscross,nnethercoteMatthias Krüger-32/+27
Stabilize `asm_goto` feature gate Stabilize `asm_goto` feature (tracked by #119364). The issue will remain open and be updated to track `asm_goto_with_outputs`. Reference PR: https://github.com/rust-lang/reference/pull/1693 # Stabilization Report This feature adds a `label <block>` operand type to `asm!`. `<block>` must be a block expression with type unit or never. The address of the block is substituted and the assembly may jump to the block. When block completes the `asm!` block returns and continues execution. The block starts a new safety context and unsafe operations within must have additional `unsafe`s; the effect of `unsafe` that surrounds `asm!` block is cancelled. See https://github.com/rust-lang/rust/issues/119364#issuecomment-2316037703 and https://github.com/rust-lang/rust/pull/131544. It's currently forbidden to use `asm_goto` with output operands; that is still unstable under `asm_goto_with_outputs`. Example: ```rust unsafe { asm!( "jmp {}", label { println!("Jumped from asm!"); } ); } ``` Tests: - tests/ui/asm/x86_64/goto.rs - tests/ui/asm/x86_64/goto-block-safe.stderr - tests/ui/asm/x86_64/bad-options.rs - tests/codegen/asm/goto.rs
2025-03-17Merge pull request #19378 from ↵Lukas Wirth-2/+8
davidbarsky/davidbarsky/run-lru-at-end-of-analysis-stats analysis-stats: run Salsa's LRU at the end of analysis
2025-03-17fix download-llvm logic for subtree sync branchesRalf Jung-1/+9
2025-03-17analysis-stats: run Salsa's LRU at the end of analysisDavid Barsky-2/+8
2025-03-17Merge pull request #19379 from Veykril/push-nwmqsvtqpnkoLukas Wirth-244/+277
chore: Bump `Edition::CURRENT` to 2024
2025-03-17Fix miribjorn3-19/+64
2025-03-17expand: Leave traces when expanding `cfg_attr` attributesVadim Petrochenkov-1/+5
2025-03-17adjust commentGiang Dao-22/+8