about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-16use `str::ends_with`Ada Alakbarova-4/+1
2025-08-16use `Option::is_some_and`Ada Alakbarova-5/+4
2025-08-16remove `should_render` in `PrintAttribute` deriveDeadbeef-40/+20
2025-08-16library: Migrate from `cfg_if` to `cfg_select`Josh Triplett-607/+845
Migrate the standard library from using the external `cfg_if` crate to using the now-built-in `cfg_select` macro. This does not yet eliminate the dependency from `library/std/Cargo.toml`, because while the standard library itself no longer uses `cfg_if`, it also incorporates the `backtrace` crate, which does. Migration assisted by the following vim command (after selecting the full `cfg_if!` invocation): ``` '<,'>s/\(cfg_if::\)\?cfg_if/cfg_select/ | '<,'>s/^\( *\)} else {/\1}\r\1_ => {/c | '<,'>s/^\( *\)} else if #\[cfg(\(.*\))\] /\1}\r\1\2 => /e | '<,'>s/if #\[cfg(\(.*\))\] {/\1 => {/e ``` This is imperfect, but substantially accelerated the process. This prompts for confirmation on the `} else {` since that can also appear inside one of the arms. This also requires manual intervention to handle any multi-line conditions.
2025-08-16Fix `unicode_data.rs` mention messageUrgau-5/+6
2025-08-16Auto merge of #145304 - m-ou-se:simplify-panic, r=oli-obkbors-9/+1
Revert "Partially outline code inside the panic! macro". This reverts https://github.com/rust-lang/rust/pull/115670 Without any tests/benchmarks that show some improvement, it's hard to know whether the change had any positive effect. (And if it did, whether that effect is still achieved today.)
2025-08-16Auto merge of #145304 - m-ou-se:simplify-panic, r=oli-obkbors-73/+8
Revert "Partially outline code inside the panic! macro". This reverts https://github.com/rust-lang/rust/pull/115670 Without any tests/benchmarks that show some improvement, it's hard to know whether the change had any positive effect. (And if it did, whether that effect is still achieved today.)
2025-08-16Only check std in cross-compilation instead of building itJakub Beránek-57/+153
2025-08-16take attr style into account in attr diagnosticsJana Dönszelmann-37/+53
2025-08-16Avoid copying rustc rmeta artifacts into the build compiler sysrootJakub Beránek-65/+189
This helps to avoid polluting the sysroot of the build compiler.
2025-08-16Fix deprecation attribute on foreign statics & typesJonathan Brouwer-3/+10
2025-08-16Don't show foreign types as an allowed target if the feature is not enabledJonathan Brouwer-0/+3
2025-08-16Add parentheses for closure when suggesting calling closureMu001999-11/+17
2025-08-16old testcase outputMu001999-0/+48
2025-08-16Optimize `copy_src_dirs`Jakub Beránek-39/+42
2025-08-16Do not call `fs::remove_file` in `cp_link_filtered_recurse`Jakub Beránek-1/+0
The target is removed by `copy_link` too, so no need to duplicate the syscall.
2025-08-16Remove `LlvmArchiveBuilder` and supporting code/bindingsZalathar-543/+6
2025-08-16`missing_inline_in_public_items`: fix lint emission source HirIdZihan-20/+25
use trait item's HirId when emitting lint at `check_item` level changelog: [`missing_inline_in_public_items`]: fix trait item lint emission Signed-off-by: Zihan <zihanli0822@gmail.com>
2025-08-16clean-up `unnecessary_unwrap` a bit (#15489)Timo-35/+37
changelog: none
2025-08-16clean-up `unnecessary_unwrap` a bitAda Alakbarova-35/+37
replace multiple `if-let`s with `match` turn the condition into a match guard allows removing the `else` branch replace `Vec::append` with `extend` don't need the second vec after this operation anyway remove `return`s
2025-08-16refactor: Hard-code `char::is_control`Karl Meakin-28/+5
According to https://www.unicode.org/policies/stability_policy.html#Property_Value, the set of codepoints in `Cc` will never change. So we can hard-code the patterns to match against instead of using a table.
2025-08-16Properly recover from parenthesized use-bounds (precise capturing)León Orell Valerian Liehr-16/+48
2025-08-15Auto merge of #145475 - jhpratt:rollup-jr0wado, r=jhprattbors-36/+722
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143717 (Add `Default` impls for `Pin`ned `Box`, `Rc`, `Arc`) - rust-lang/rust#144054 (Stabilize as_array_of_cells) - rust-lang/rust#144907 (fix: Reject async assoc fns of const traits/impls in ast_passes) - rust-lang/rust#144922 (Implement `#[derive(From)]`) - rust-lang/rust#144963 (Stabilize `core::iter::chain`) - rust-lang/rust#145436 (fix(tests/rmake/wasm-unexpected-features): change features from `WASM1` to `MVP`) - rust-lang/rust#145453 (Remove duplicated tracing span in bootstrap) - rust-lang/rust#145454 (Fix tracing debug representation of steps without arguments in bootstrap) - rust-lang/rust#145455 (Do not copy files in `copy_src_dirs` in dry run) - rust-lang/rust#145462 (Stabilize `const_exposed_provenance` feature) - rust-lang/rust#145466 (Enable new `[range-diff]` feature in triagebot) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-16Fix typo in doc for library/std/src/fs.rs#set_permissionsAlan Urmancheev-1/+1
"privalage" -> "privilege"
2025-08-15Rollup merge of #145466 - Urgau:triagebot-range-diff, r=KobzolJacob Pratt-0/+5
Enable new `[range-diff]` feature in triagebot This new feature adds a comment to triagebot range-diff feature when a PR is rebased onto a different base/master commit. Related to [#t-compiler > Experimental range-diff for force-push @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Experimental.20range-diff.20for.20force-push/near/534649322) r? Kobzol
2025-08-15Rollup merge of #145462 - Kivooeo:stabilize-const_exposed_provenance, r=RalfJungJacob Pratt-2/+2
Stabilize `const_exposed_provenance` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/144538) and stabilises `fn with_exposed_provenance` and `fn with_exposed_provenance_mut` in const
2025-08-15Rollup merge of #145455 - Kobzol:bootstrap-copy-src-dirs-dry-run, r=jieyouxuJacob Pratt-0/+6
Do not copy files in `copy_src_dirs` in dry run This reduces the time to run the current 9 dist snapshot tests from ~24s to ~2s on my PC. r? `@jieyouxu`
2025-08-15Rollup merge of #145454 - Kobzol:bootstrap-fix-step-debug-repr, r=jieyouxuJacob Pratt-3/+8
Fix tracing debug representation of steps without arguments in bootstrap I was wondering why I see `lainSourceTarbal` in tracing logs... r? `@jieyouxu`
2025-08-15Rollup merge of #145453 - Kobzol:bootstrap-cmd-span, r=jieyouxuJacob Pratt-3/+0
Remove duplicated tracing span in bootstrap `trace_cmd` is now called also in the `stream` method, so including it also here was duplicating command spans. r? `@jieyouxu`
2025-08-15Rollup merge of #145436 - StackOverflowExcept1on:patch-1, r=alexcrichtonJacob Pratt-1/+1
fix(tests/rmake/wasm-unexpected-features): change features from `WASM1` to `MVP` missed this in rust-lang/rust#145275 since test calls `rustc` with `-C target-cpu mvp` try-job: `test-various`
2025-08-15Rollup merge of #144963 - rossmacarthur-forks:stabilize-core-iter-chain, ↵Jacob Pratt-6/+3
r=jhpratt Stabilize `core::iter::chain` Closes rust-lang/rust#125964
2025-08-15Rollup merge of #144922 - Kobzol:derive-from, r=nnethercoteJacob Pratt-3/+582
Implement `#[derive(From)]` Implements the `#[derive(From)]` feature ([tracking issue](https://github.com/rust-lang/rust/issues/144889), [RFC](https://github.com/rust-lang/rfcs/pull/3809)). It allows deriving the `From` impl on structs and tuple structs with exactly one field. Some implementation notes: - I wasn't exactly sure which spans to use in the derive generating code, so I just used `span` everywhere. I don't know if it's the Right Thing To Do. In particular the errors when `#[derive(From)]` is used on a struct with an unsized field are weirdly duplicated. - I had to solve an import stability problem, where if I just added the unstable `macro From` to `core::convert`, previously working code like `use std::convert::From` would suddenly require an unstable feature gate, because rustc would think that you're trying to import the unstable macro. `@petrochenkov` suggested that I add the macro the the core prelude instead. This has worked well, although it only works in edition 2021+. Not sure if I botched the prelude somehow and it should live elsewhere (?). - I had to add `Ty::AstTy`, because the `from` function receives an argument with the type of the single field, and the existing variants of the `Ty` enum couldn't represent an arbitrary type.
2025-08-15Rollup merge of #144907 - ShoyuVanilla:no-const-async, r=fmeaseJacob Pratt-10/+69
fix: Reject async assoc fns of const traits/impls in ast_passes Fixes rust-lang/rust#117629
2025-08-15Rollup merge of #144054 - jsimmons:stabilize-as-array-of-cells, r=tgross35Jacob Pratt-4/+2
Stabilize as_array_of_cells This PR stabilizes ```rust impl<T, const N: usize> Cell<[T; N]> { pub const fn as_array_of_cells(&self) -> &[Cell<T>; N]; } ``` Stabilization report: https://github.com/rust-lang/rust/issues/88248#issuecomment-3082986863 Closes: https://github.com/rust-lang/rust/issues/88248
2025-08-15Rollup merge of #143717 - Jules-Bertholet:pin-default, r=dtolnayJacob Pratt-4/+44
Add `Default` impls for `Pin`ned `Box`, `Rc`, `Arc` Fixes rust-lang/rust#143688. `@rustbot` label T-libs-api needs-fcp Also needs a crater run, as the `Box` impls could theoretically be breaking due to `#[fundamental]` (though a [cursory search](https://github.com/search?q=%2Fimpl%28%3C.*%3E%29%3F+Default+for+Pin%3C%2F+path%3A*.rs&type=code) suggests this is unlikely to cause issues).
2025-08-15Auto merge of #142071 - lcnr:revealing-use, r=compiler-errorsbors-1/+72
`apply_member_constraints`: fix placeholder check Checking whether the member region is *an existential region from a higher universe* is just wrong and I am pretty sure we've added that check by accident as the naming was just horribly confusing before rust-lang/rust#140466. I've encountered this issue separately while working on rust-lang/rust#139587, but feel like it's probably easier to separately FCP this change. This allows the following code to compile ```rust trait Proj<'a> { type Assoc; } impl<'a, 'b, F: FnOnce() -> &'b ()> Proj<'a> for F { type Assoc = (); } fn is_proj<F: for<'a> Proj<'a>>(f: F) {} fn define<'a>() -> impl Sized + use<'a> { // This adds a use of `opaque::<'a>` with hidden type `&'unconstrained_b ()`. // 'unconstrained_b is an inference variable from a higher universe as it gets // created inside of the binder of `F: for<'a> Proj<'a>`. This previously // caused us to not apply member constraints. We now do, constraining // it to `'a`. is_proj(define::<'a>); &() } fn main() {} ``` This should not be breaking change, even in theory. Applying member constraints is incomplete in rare circumstances which means that applying them in more cases can cause spurious errors, cc rust-lang/rust#140569/rust-lang/rust#142073. However, as we always skipped these member regions in `apply_member_constraints` the skipped region is guaranteed to cause an error in `check_member_constraints` later on.
2025-08-15Merge pull request #20467 from SomeoneToIgnore/error-messageLukas Wirth-1/+3
Use a more specific error message when talking about the server logs
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-5005/+9038
2025-08-15Use a more specific error message when talking about the server logsKirill Bulatov-1/+3
2025-08-15stabilize strict provenance atomic ptrKivooeo-18/+7
2025-08-15Enable new `[range-diff]` feature in triagebotUrgau-0/+5
2025-08-15stabilize array repeatKivooeo-5/+1
2025-08-15stabilize const pathbuf osstring newKivooeo-2/+2
2025-08-15stabilize const exposed provenanceKivooeo-2/+2
2025-08-15Extend `QueryStability` to handle `IntoIterator` implementationsSamuel Moelius-52/+122
Fix adjacent code Fix duplicate warning; merge test into `tests/ui-fulldeps/internal-lints` Use `rustc_middle::ty::FnSig::inputs` Address two review comments - https://github.com/rust-lang/rust/pull/139345#discussion_r2109006991 - https://github.com/rust-lang/rust/pull/139345#discussion_r2109058588 Use `Instance::try_resolve` Import `rustc_middle::ty::Ty` as `Ty` rather than `MiddleTy` Simplify predicate handling Add more `#[allow(rustc::potential_query_instability)]` following rebase Remove two `#[allow(rustc::potential_query_instability)]` following rebase Address review comment Update compiler/rustc_lint/src/internal.rs Co-authored-by: lcnr <rust@lcnr.de>
2025-08-15Demote x86_64-apple-darwin to Tier 2 with host toolsJake Goulding-33/+21
Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2.
2025-08-15Detect missing `derive` on unresolved attribute even when not importedEsteban Küber-27/+60
``` error: cannot find attribute `sede` in this scope --> $DIR/missing-derive-3.rs:20:7 | LL | #[sede(untagged)] | ^^^^ | help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute | LL | #[serde(untagged)] | + error: cannot find attribute `serde` in this scope --> $DIR/missing-derive-3.rs:14:7 | LL | #[serde(untagged)] | ^^^^^ | note: `serde` is imported here, but it is a crate, not an attribute --> $DIR/missing-derive-3.rs:4:1 | LL | extern crate serde; | ^^^^^^^^^^^^^^^^^^^ help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute | LL + #[derive(Deserialize, Serialize)] LL | enum B { | ```
2025-08-15Auto merge of #145450 - Kobzol:rollup-cqclix0, r=Kobzolbors-339/+478
Rollup of 11 pull requests Successful merges: - rust-lang/rust#144210 (std: thread: Return error if setting thread stack size fails) - rust-lang/rust#145310 (Reduce usage of `compiler_for` in bootstrap) - rust-lang/rust#145311 (ci: clean windows disk space in background) - rust-lang/rust#145340 (Split codegen backend check step into two and don't run it with `x check compiler`) - rust-lang/rust#145408 (Deduplicate -L search paths) - rust-lang/rust#145412 (Windows: Replace `GetThreadId`+`GetCurrentThread` with `GetCurrentThreadId`) - rust-lang/rust#145413 (bootstrap: Reduce dependencies) - rust-lang/rust#145426 (Fix typos in bootstrap.example.toml) - rust-lang/rust#145430 (Fix wrong spans with external macros in the `dropping_copy_types` lint) - rust-lang/rust#145431 (Enhance UI test output handling for runtime errors) - rust-lang/rust#145448 (Autolabel `src/tools/{rustfmt,rust-analyzer}` changes with `T-{rustfmt,rust-analyzer}`) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-15Do not copy files in `copy_src_dirs` in dry runJakub Beránek-0/+6
2025-08-15Fix tracing debug representation of steps without arguments in bootstrapJakub Beránek-3/+8