about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-14Rollup merge of #145353 - CathalMullan:jemalloc-tools, r=KobzolJakub Beránek-0/+9
bootstrap: Fix jemalloc 64K page support for aarch64 tools Resolves rust-lang/rust#133748 The prior page size fix only targeted the compile build step, not the tools step: https://github.com/rust-lang/rust/pull/135081 Also note that since `miri` always uses jemalloc, I didn't copy the `builder.config.jemalloc(target)` check to the tools section. Tested by running `strings` on the compiled `miri` binary to see the LG_PAGE value. Before: ``` > strings miri | grep '^LG_PAGE' LG_PAGE 14 ``` After: ``` > strings miri | grep '^LG_PAGE' LG_PAGE 16 ``` May also need a separate fix for the standalone miri repository: https://github.com/rust-lang/miri/issues/4514 (likely a change needed in miri-script?)
2025-08-14Rollup merge of #145324 - Kobzol:bootstrap-host-only, r=jieyouxuJakub Beránek-119/+119
Rename and document `ONLY_HOSTS` in bootstrap Everytime I examined the `ONLY_HOSTS` flag of bootstrap steps, I was utterly confused. Why is it called ONLY_HOSTS? How does the fact that it is skipped if `--target` is passed, but `--host` is not (which was not accurate) help me? The reality of the flag is that if it is true, the targets for which the given Step will be built is determined based on the `--host` flag, while if it is false, it is determined based on the `--target` flag, that's pretty much it. The previous comment was just a (not very helpful and not even accurate) corollary of that. I clarified the comment, and also renamed the flag to `IS_HOST` (happy to brainstorm better names, but the doc. comment change is IMO the main improvement). r? ``@jieyouxu``
2025-08-14Rollup merge of #145261 - Kobzol:bootstrap-tracing, r=jieyouxuJakub Beránek-412/+560
Improve tracing in bootstrap I was annoyed that bootstrap had like 5 separate ways of debugging/tracing/profiling, and it was hard for me to understand how are individual steps executed. This PR tries to unify severla things behind `BOOTSTRAP_TRACING`, and improve tracing/profiling in general: - All generated tracing outputs are now stored in a single directory to make it easier to examine them, plus bootstrap prepares a `latest` symlink to the latest generated tracing output directory for convenience. - All executed spans are now logged automatically (without requiring usage of `#[tracing::instrument]`). - A custom span/event formatter was implemented, to provide domain-specific output (like location of executed commands or spans) and hopefully also to reduce visual clutter. - `tracing_forest` was removed. While it did some useful postprocessing, it didn't expose enough information for making the dynamic step spans work. - You can now explicitly log steps (`STEP=info`) and/or commands (`COMMAND=info`), to have more granular control over what gets logged. - `print-step-timings` also show when a step starts its execution (not just when it ends it), so that when some step fails in CI, we can actually see what step it was (before we would only see the end of the previous step). - The rustc-dev-guide page on debugging/profiling bootstrap was updated. There are still some things that work outside of tracing (`print-step-timings` and `dump-bootstrap-shims`), but I think that for now this improvement is good enough. I removed the `> step`, `< step` verbose output, because I found it unusable, as verbose bootstrap output also enables verbose Cargo output, and then you simply drown in too much data, and because I think that the new tracing system makes it obsolete (although it does require recompilation with the `tracing` feature). If you want to keep it, happy to revert 690c781475acb890f33d928186bdaea9ef179330. And the information about cached steps is now also shown in the Graphviz step dependency graph. We can modify the tracing output however we want, as we now implement it ourselves. Notably, we could also show exit logs for step spans, currently I only show enter spans. Maybe creating indents for each executed nested command is also not needed. Happy to hear feedback! Some further improvements could be to print step durations, if we decide to also log step exit events. We could also try to enable tracing in CI logs, but it might be too verbose. Best reviewed commit-by-commit. r? ``@jieyouxu`` CC ``@Shourya742``
2025-08-14Rollup merge of #145233 - joshtriplett:cfg-select-expr, r=jieyouxuJakub Beránek-25/+60
cfg_select: Support unbraced expressions Tracking issue for `cfg_select`: rust-lang/rust#115585 When operating on expressions, `cfg_select!` can now handle expressions without braces. (It still requires braces for other things, such as items.) Expand the test coverage and documentation accordingly. --- I'm not sure whether deciding to extend `cfg_select!` in this way is T-lang or T-libs-api. I've labeled for both, with the request that both teams don't block on each other. :)
2025-08-14Rollup merge of #144631 - fneddy:fix_be_test_intrinsic_const_bad, ↵Jakub Beránek-8/+10
r=compiler-errors Fix test intrinsic-raw_eq-const-bad for big-endian The test fails on s390x and presumably other big-endian systems, due to print of raw values. To fix the tests remove the raw output values in the error note with normalize-stderr.
2025-08-14Rollup merge of #137872 - estebank:extra-vert, r=compiler-errorsJakub Beránek-129/+76
Include whitespace in "remove |" suggestion and make it hidden Tweak error rendering of patterns with an extra `|` on either end. Built on #137409. Only last commit is relevant. ? ``@compiler-errors``
2025-08-14Auto merge of #145085 - JonathanBrouwer:target_checking, r=jdonszelmannbors-3670/+3443
Rework target checking for built-in attributes This is a refactoring of target checking for built-in attributes. This PR has the following goals: - Only refactor the 80% of the attributes that are simple to target check. More complicated ones like `#[repr]` will be in a future PR. Tho I have written the code in such a way that this will be possible to add in the future. - No breaking changes. - This part of the codebase is not very well tested though, we can do a crater run if we want to be sure. - I've spotted quite a few weird situations (like I don't think an impl block should be deprecated?). We can propose fixing these to in a future PR Fixes https://github.com/rust-lang/rust/issues/143780 Fixes https://github.com/rust-lang/rust/issues/138510 I've split it in commits and left a description on some of the commits to help review. r? `@jdonszelmann`
2025-08-14drive-by: fix typoWaffle Lapkin-1/+1
2025-08-14std: thread: Return error if setting thread stack size failsJens Reidel-1/+12
Currently, when setting the thread stack size fails, it would be rounded up to the nearest multiple of the page size and the code asserts that the next call to pthread_attr_setstacksize succeeds. This may be true for glibc, but it isn't true for musl, which not only enforces a minimum stack size, but also a maximum stack size of usize::MAX / 4 - PTHREAD_STACK_MIN [1], triggering the assert rather than erroring gracefully. There isn't any way to handle this properly other than bailing out and letting the user know it didn't succeed. [1]: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_attr_setstacksize.c#n5 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-08-14Update autodiff tests for the new intrinsics implMarcelo Domínguez-221/+152
2025-08-14`unnecessary_operation`: add space between stmts in suggestion (#15432)Timo-11/+12
makes the suggestion a bit more legible changelog: [`unnecessary_operation`]: add space between stmts in suggestion
2025-08-14Fix `match_ref_pats` FP on match scrutinee of never type (#15474)Timo-7/+80
Closes rust-lang/rust-clippy#15378 changelog: [`match_ref_pats`] fix FP on match scrutinee of never type
2025-08-14Merge pull request #20425 from avrabe/feat/unterminated-string-hintsChayim Refael Friedman-1/+49
feat: hint at unterminated strings in unknown prefix errors
2025-08-14feat: hint at unterminated strings in unknown prefix errorsRalf Anton Beier-1/+49
When encountering 'unknown literal prefix' errors, check for unbalanced quotes in recent code and suggest checking for unterminated string literals.
2025-08-14fixed diagnosticKivooeo-1/+93
2025-08-14Adjust error message grammar to be less awkwardJake Goulding-61/+61
2025-08-14Merge pull request #751 from rust-lang/sync_from_rust_2025_08_14antoyo-11/+16
Sync from rust 2025/08/14
2025-08-14Remove lto inline logicMarcelo Domínguez-79/+1
2025-08-14Remove inlining for autodiff handlingMarcelo Domínguez-19/+21
2025-08-14Complete functionality and general cleanupMarcelo Domínguez-6/+0
2025-08-14Complete functionality and general cleanupMarcelo Domínguez-827/+419
2025-08-14Basic implementation of `autodiff` intrinsicMarcelo Domínguez-245/+284
2025-08-14cleanup: Remove useless `[T].iter().last()`Esteban Küber-2/+2
2025-08-14Update uitestsJonathan Brouwer-2267/+2449
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-14Remove the old target checking logicJonathan Brouwer-1310/+138
2025-08-14Specify the list of allowed targets per attributeJonathan Brouwer-44/+361
2025-08-14Allow attribute parsers to specify a list of allowed targetsJonathan Brouwer-13/+304
Every acceptor gets an `ALLOWED_TARGETS` specification which can specify per target whether it is allowed, warned, or errored.
2025-08-14Pass the target type down to `parse_attribute_list`Jonathan Brouwer-25/+48
2025-08-14Improved `Target` typeJonathan Brouwer-11/+143
- Added a few more variants which are needed for various attributes - Previously a trait method with default block had the same target representation as a method in a `impl trait for` block, this has been changed (See `MethodKind`) - Added `plural_name` for more precision on the form of the name
2025-08-14Do not ICE on private type in field of unresolved structEsteban Küber-3/+33
2025-08-14resolve: Add one more test case for "binding is available in a different ↵Vadim Petrochenkov-2/+21
scope" help
2025-08-14resolve: Restructure `resolve_ident_in_lexical_scope` for better clarityVadim Petrochenkov-42/+37
2025-08-14resolve: Inline `with_mod_rib`Vadim Petrochenkov-26/+18
2025-08-14resolve: Introduce `RibKind::Block`Vadim Petrochenkov-24/+24
to avoid confusing module items, blocks with items, and blocks without items.
2025-08-14Use `default_field_values` in `Resolver`Esteban Küber-30/+17
2025-08-14Don't set feature compiler-builtins-no-f16-f128Antoni Boucher-3/+3
2025-08-14it's not a borrow checker limitation :<lcnr-24/+24
2025-08-14add commentlcnr-1/+6
2025-08-14fix alignment testEsteban Küber-1/+1
2025-08-14Rename/remove some UI and run-make testsAntoni Boucher-4/+3
2025-08-14rustc-dev-guide :3lcnr-2/+2
2025-08-14Rename and document `ONLY_HOSTS` in bootstrapJakub Beránek-114/+119
2025-08-14Remove `ONLY_HOSTS` value overrides that just set the default value and had ↵Jakub Beránek-5/+0
no comment
2025-08-14update commentlcnr-0/+12
2025-08-14Auto merge of #144542 - sayantn:stabilize-sse4a-tbm, r=Amanieu,traviscrossbors-15/+7
Stabilize `sse4a` and `tbm` target features This PR stabilizes the feature flag `sse4a_target_feature` and `tbm_target_feature` (tracking issue rust-lang/rust#44839). # Public API The 2 `x86` target features `sse4a` and `tbm` Also, these were added in LLVM2.6 and LLVM3.4-rc1, respectively, and as the minimum LLVM required for rustc is LLVM19, we are safe in that front too! As all of the required tasks have been done (adding the target features to rustc, implementing their runtime detection in std_detect and implementing the associated intrinsics in core_arch), these target features can be stabilized now. The intrinsics were stabilized *long* ago, in 1.27.0 Reference PR: - https://github.com/rust-lang/reference/pull/1949 cc `@rust-lang/lang` `@rustbot` label I-lang-nominated r? lang
2025-08-14add regression testlcnr-0/+43
2025-08-14Add FnContext in parser for diagnosticxizheyin-80/+95
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-14Add test suggest-self-in-bare-functionxizheyin-0/+87
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-14resolve prelude import at `build_reduced_graph` phaseLorrensP-2158466-49/+53
2025-08-14Merge pull request #20459 from rust-lang/veykril/push-pwzyxwuozkrqShoyu Vanilla (Flint)-24/+32
Track diagnostic generations per package