about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-11don't emit rustdoc::broken_intra_doc_links for stuff like [!NOTE]binarycat-2/+20
2025-08-11Add tracing to data race functionsStypox-0/+6
2025-08-11Document compiler and stdlib in stage1 in `pr-check-2` CI jobJakub Beránek-3/+3
2025-08-11Merge pull request #20434 from ShoyuVanilla/diag-fix-againShoyu Vanilla (Flint)-1/+1
fix: Panic while trying to clear old diagnostics while there's nothing
2025-08-12fix: Panic while trying to clear old diagnostics while there's nothingShoyu Vanilla-1/+1
2025-08-12Make import sorting order follow 2024 edition styleShoyu Vanilla-50/+219
2025-08-11Merge pull request #20420 from iorizu/doc-symbols-filterChayim Refael Friedman-47/+368
feat: Add Config Option to Exclude Locals from Document Symbol Search
2025-08-11Make a James Bond referenceJakub Stasiak-2/+2
2025-08-11Update actions/checkouts to v5Alexey Semenyuk-13/+13
2025-08-11dec2flt: Provide more valid inputs examplesJakub Stasiak-0/+2
I was just looking at the specifics of how the parsing is handled here and I wasn't sure if the examples were incomplete or the grammar below was misleading. The grammar was correct so I figured I'd add these examples to clarify.
2025-08-11Correct `needless_borrow_for_generic_args` doc comment (#15440)Alejandra González-1/+1
I think the comment is meant to refer to `needless_borrow_count`. changelog: none
2025-08-11Rollup merge of #145247 - GuillaumeGomez:update-sysinfo, r=KobzolGuillaume Gomez-6/+6
Update `sysinfo` version to `0.37.0` Some small performance improvements and internal cleanups.
2025-08-11Rollup merge of #145221 - Kobzol:cargo-dist-fix-2, r=jieyouxuGuillaume Gomez-0/+2
Fix Cargo cross-compilation (take two) In https://github.com/rust-lang/rust/pull/145083, I fixed the case of manually invoking `x dist cargo`, but I realized that `x install` creates the `tool::Cargo` step through the `from_build_frompiler` constructor, which doesn't go through `get_tool_target_compiler`. So we just prepare both the host and target stdlibs directly before building Cargo. Ideally we would get rid of `from_build_compiler`, but that will require refactoring the dist and test steps, which is upcoming. Hopefully fixes https://github.com/rust-lang/rust/issues/145059 for good.
2025-08-11Rollup merge of #145111 - fee1-dead-contrib:push-rlvnyrztlkpq, r=jieyouxuGuillaume Gomez-24/+1
remove some unused private trait impls they're neither required for completeness nor used
2025-08-11Rollup merge of #144966 - scrabsha:push-rozroqqmurvu, r=jdonszelmannGuillaume Gomez-15/+91
Improve suggestion for "missing function argument" on multiline call `rustc` has a very neat suggestion when the argument count does not match, with a nice placeholder that shows where an argument may be missing. Unfortunately the suggestion is always single-line, even when the function call spans across multiple lines. With this PR, `rustc` tries to guess if the function call is multiline or not, and emits a multiline suggestion when required. r? `@jdonszelmann`
2025-08-11significantly improve provisional cache rebasinglcnr-91/+100
2025-08-11std: sys: pal: uefi: tests: Add systemtime testsAyush Singh-24/+96
Add tests to ensure that extream system times are still representable. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-08-11std: sys: pal: uefi: Overhaul TimeAyush Singh-18/+110
Use a time representation with 1900-01-01-00:00:00 at timezone -1440 min as anchor. This is the earliest time supported in UEFI. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-08-11Update error messagetiif-8/+8
2025-08-11Update rustc dev guidetiif-1/+6
2025-08-11Support using #[unstable_feature_bound] on traittiif-2/+52
2025-08-11Port `#[allow_internal_unsafe]` to the new attribute system (attempt 2)Sasha Pourcelot-28/+85
2025-08-11Turn _span into _trace as trace span nameStypox-31/+31
_span could possibly be confused with the Span type in rustc
2025-08-11Add tracing to resolve-related functionsStypox-23/+43
2025-08-11Update `sysinfo` version to `0.37.0`Guillaume Gomez-6/+6
2025-08-11Auto merge of #145215 - Kobzol:rust-backtrace, r=marcoienibors-0/+3
Enable RUST_BACKTRACE=1 on CI We should really see the backtrace if something in bootstrap fails on CI. https://github.com/rust-lang/rust/pull/145011#issuecomment-3172664934 doesn't show many details.
2025-08-11doc: use `is_some_and` instead of `map_or(false, _)` (#15455)Philipp Krones-1/+1
see https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or changelog: none
2025-08-11Set dead_on_return attribute for indirect argumentsNikita Popov-6/+55
Set the dead_on_return attribute (added in LLVM 21) for arguments that are passed indirectly, but not byval. This indicates that the value of the argument on return does not matter, enabling additional dead store elimination.
2025-08-11Merge pull request #2545 from rust-lang/tshepang-patch-1nora-1/+1
fix grammar
2025-08-11Merge pull request #20429 from ShoyuVanilla/masterLukas Wirth-0/+1
hotfix: Update flycheck diagnostics generation
2025-08-11hotfix: Update flycheck diagnostics generationShoyu Vanilla (Flint)-0/+1
2025-08-11Auto merge of #145240 - Zalathar:rollup-7r97lia, r=Zalatharbors-82/+239
Rollup of 5 pull requests Successful merges: - rust-lang/rust#135331 (Reject relaxed bounds inside associated type bounds (ATB)) - rust-lang/rust#144156 (Check coroutine upvars in dtorck constraint) - rust-lang/rust#145091 (`NllRegionVariableOrigin` remove `from_forall`) - rust-lang/rust#145194 (Ignore coroutine witness type region args in auto trait confirmation) - rust-lang/rust#145225 (Fix macro infinite recursion test to not trigger warning about semicolon in expr) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-11Rollup merge of #145225 - joshtriplett:infinite-print-no-semi, r=lqdStuart Cook-8/+8
Fix macro infinite recursion test to not trigger warning about semicolon in expr The test cases for rust-lang/rust#41731 are about infinite macro recursion that incorporates `print!` and `println!`. However, they also included trailing semicolons despite expanding to expressions; that isn't what these particular test cases are designed to test. Eliminate the trailing semicolons, to simplify future work on removing this special case. Every *other* macro that expands to a semicolon in an expression is a test case for that specifically.
2025-08-11Rollup merge of #145194 - compiler-errors:coro-witness-re, r=lcnrStuart Cook-2/+29
Ignore coroutine witness type region args in auto trait confirmation ## The problem Consider code like: ``` async fn process<'a>() { Box::pin(process()).await; } fn require_send(_: impl Send) {} fn main() { require_send(process()); } ``` When proving that the coroutine `{coroutine@process}::<'?0>: Send`, we end up instantiating a nested goal `{witness@process}::<'?0>: Send` by synthesizing a witness type from the coroutine's args: Proving a coroutine witness type implements an auto trait requires looking up the coroutine's witness types. The witness types are a binder that look like `for<'r> { Pin<Box<{coroutine@process}::<'r>>> }`. We instantiate this binder with placeholders and prove `Send` on the witness types. This ends up eventually needing to prove something like `{coroutine@process}::<'!1>: Send`. Repeat this process, and we end up in an overflow during fulfillment, since fulfillment does not use freshening. This can be visualized with a trait stack that ends up looking like: * `{coroutine@process}::<'?0>: Send` * `{witness@process}::<'?0>: Send` * `Pin<Box<{coroutine@process}::<'!1>>>: Send` * `{coroutine@process}::<'!1>: Send` * ... * `{coroutine@process}::<'!2>: Send` * `{witness@process}::<'!2>: Send` * ... * overflow! The problem here specifically comes from the first step: synthesizing a witness type from the coroutine's args. ## Why wasn't this an issue before? Specifically, before 63f6845e570305a92eaf855897768617366164d6, this wasn't an issue because we were instead extracting the witness from the coroutine type itself. It turns out that given some `{coroutine@process}::<'?0>`, the witness type was actually something like `{witness@process}::<'erased>`! So why do we end up with a witness type with `'erased` in its args? This is due to the fact that opaque type inference erases all regions from the witness. This is actually explicitly part of opaque type inference -- changing this to actually visit the witness types actually replicates this overflow even with 63f6845e570305a92eaf855897768617366164d6 reverted: https://github.com/rust-lang/rust/blob/ca77504943887037504c7fc0b9bf06dab3910373/compiler/rustc_borrowck/src/type_check/opaque_types.rs#L303-L313 To better understand this difference and how it avoids a cycle, if you look at the trait stack before 63f6845e570305a92eaf855897768617366164d6, we end up with something like: * `{coroutine@process}::<'?0>: Send` * `{witness@process}::<'erased>: Send` **<-- THIS CHANGED** * `Pin<Box<{coroutine@process}::<'!1>>>: Send` * `{coroutine@process}::<'!1>: Send` * ... * `{coroutine@process}::<'erased>: Send` **<-- THIS CHANGED** * `{witness@process}::<'erased>: Send` **<-- THIS CHANGED** * coinductive cycle! :tada: ## So what's the fix? This hack replicates the behavior in opaque type inference to erase regions from the witness type, but instead erasing the regions during auto trait confirmation. This is kinda a hack, but is sound. It does not need to be replicated in the new trait solver, of course. --- I hope this explanation makes sense. We could beta backport this instead of the revert https://github.com/rust-lang/rust/pull/145193, but then I'd like to un-revert that on master in this PR along with landing this this hack. Thoughts? r? lcnr
2025-08-11Rollup merge of #145091 - lcnr:remove-from_forall, r=petrochenkovStuart Cook-29/+15
`NllRegionVariableOrigin` remove `from_forall` See added comment in the only place it was used. cc rust-lang/rust#144988 `@amandasystems,` going to merge that PR first.
2025-08-11Rollup merge of #144156 - compiler-errors:dtorck-upvars, r=lcnrStuart Cook-24/+150
Check coroutine upvars in dtorck constraint Fix rust-lang/rust#144155. This PR fixes an unsoundness where we were not considering coroutine upvars as drop-live if the coroutine interior types (witness types) had nothing which required drop. In the case that the coroutine does not have any interior types that need to be dropped, then we don't need to treat all of the upvars as use-live; instead, this PR uses the same logic as closures, and descends into the upvar types to collect anything that must be drop-live. The rest of this PR is reworking the comment to explain the behavior here. r? `@lcnr` or reassign 😸 --- Just some thoughts --- a proper fix for this whole situation would be to consider `TypingMode` in the `needs_drop` function, and just calling `coroutine_ty.needs_drop(tcx, typing_env)` in the dtorck constraint check. During MIR building, we should probably use a typing mode that stalls the local coroutines and considers them to be unconditionally drop, or perhaps just stall *all* coroutines in analysis mode. Then in borrowck mode, we can re-check `needs_drop` but descend into witness types properly. https://github.com/rust-lang/rust/pull/144158 implements this experimentally. This is a pretty involved fix, and conflicts with some in-flight changes (rust-lang/rust#144157) that I have around removing coroutine witnesses altogether. I'm happy to add a FIXME to rework this whole approach, but I don't want to block this quick fix since it's obviously more correct than the status-quo.
2025-08-11Rollup merge of #135331 - fmease:ban-assoc-ty-unbounds, r=lcnrStuart Cook-19/+37
Reject relaxed bounds inside associated type bounds (ATB) **Reject** relaxed bounds — most notably `?Sized` — inside associated type bounds `TraitRef<AssocTy: …>`. This was previously accepted without warning despite being incorrect: ATBs are *not* a place where we perform *sized elaboration*, meaning `TraitRef<AssocTy: …>` does *not* elaborate to `TraitRef<AssocTy: Sized + …>` if `…` doesn't contain `?Sized`. Therefore `?Sized` is meaningless. In no other (stable) place do we (intentionally) allow relaxed bounds where we don't also perform sized elab, this is highly inconsistent and confusing! Another point of comparison: For the desugared `$SelfTy: TraitRef, $SelfTy::AssocTy: …` we don't do sized elab either (and thus also don't allow relaxed bounds). Moreover — as I've alluded to back in https://github.com/rust-lang/rust/pull/135841#pullrequestreview-2619462717 — some later validation steps only happen during sized elaboration during HIR ty lowering[^1]. Namely, rejecting duplicates (e.g., `?Trait + ?Trait`) and ensuring that `Trait` in `?Trait` is equal to `Sized`[^2]. As you can probably guess, on stable/master we don't run these checks for ATBs (so we allow even more nonsensical bounds like `Iterator<Item: ?Copy>` despite T-types's ruling established in the FCP'ed rust-lang/rust#135841). This PR rectifies all of this. I cratered this back in 2025-01-10 with (allegedly) no regressions found ([report](https://github.com/rust-lang/rust/pull/135331#issuecomment-2585330783), [its analysis](https://github.com/rust-lang/rust/pull/135331#issuecomment-2585356422)). [However a contributor manually found two occurrences](https://github.com/rust-lang/rust/issues/135229#issuecomment-2581832852) of `TraitRef<AssocTy: ?Sized>` in small hobby projects (presumably via GH code search). I immediately sent downstream PRs: https://github.com/Gui-Yom/turbo-metrics/pull/14, https://github.com/ireina7/summon/pull/1 (however, the owners have showed no reaction so far). I'm leaning towards banning these forms **without a FCW** because a FCW isn't worth the maintenance cost[^3]. Note that associated type bounds were stabilized in 1.79.0 (released 2024-06-13 which is 13 months ago), so the proliferation of ATBs shouldn't be that high yet. If you think we should do another crater run since the last one was 6 months ago, I'm fine with that. Fixes rust-lang/rust#135229. [^1]: I consider this a flaw in the implementation and [I've already added a huge FIXME](https://github.com/rust-lang/rust/blob/82a02aefe07092c737c852daccebf49ca25507e3/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs#L195-L207). [^2]: To be more precise, if the internal flag `-Zexperimental-default-bounds` is provided other "default traits" (needs internal feature `lang_items`) are permitted as well (cc closely related internal feature: `more_maybe_bounds`). [^3]: Having to track this and adding an entire lint whose remnants would remain in the code base forever (we never *fully* remove lints).
2025-08-11doc: use `is_some_and` instead of `map_or(false, _)`Ada Alakbarova-1/+1
see https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
2025-08-11fix grammarTshepang Mbambo-1/+1
2025-08-11remove `from_forall`lcnr-29/+15
2025-08-11Merge pull request #2544 from rust-lang/tshepang-patch-1Tshepang Mbambo-1/+1
place link on the more suitable text
2025-08-11place link on the more suitable text Tshepang Mbambo-1/+1
Also, remove redundant word
2025-08-11Adjust `declare_interior_mutable_const` lint's categoryKirill Bulatov-1/+1
Per the root readme, `clippy::style` is a category with > code that should be written in a more idiomatic way description. The code this lint guards from may be much worse than badly styled: ```rs use std::sync::LazyLock; // `const` instead of `static` causes `dbg!` to be printed 10 times // instead of one. const LICENSE_FILE_NAME_REGEX: LazyLock<String> = LazyLock::new(|| { dbg!("I am large regex initialized in a lazy lock!"); format!("Hello {}", "World".to_string()) }); fn main() { for _ in 0..10 { let _ = LICENSE_FILE_NAME_REGEX.split(" "); } } ``` In large projects, it's unfortunate but sometimes possible to see style lints suppressed with ```toml [workspace.lints.clippy] style = { level = "allow", priority = -1 } ``` effectively turning off crucial checks for the code like above. To keep them, promote this lint to `clippy::suspicious`: > code that is most likely wrong or useless category that has the same, `warn` default level, thus not failing on false-positives which lead to https://github.com/rust-lang/rust-clippy/issues/5863
2025-08-11Merge pull request #20424 from rust-lang/rustc-pullLaurențiu Nicola-30526/+45243
Rustc pull update
2025-08-11Merge pull request #2543 from chenyukang/yukang-add-tip-for-english-writingTshepang Mbambo-1/+3
Add a tip for english writing
2025-08-11Auto merge of #145011 - Kobzol:bootstrap-doc, r=jieyouxubors-243/+514
Enforce in bootstrap that doc must have stage at least 1 Following with the bootstrap cleanups, this time around `doc` steps. Should be pretty straightforward, because the supporting infrastructure was already there. The only thing I found a bit fishy is using `Mode::ToolBootstrap` as a "catch-all" mode for non-rustc-private steps in `tool_doc!`, but I don't think that we need to distinguish the tools in some special way when documenting them, apart from supporting `rustc_private`. Before, `x doc` more or less defaulted to what we call stage 2 now. Now it is properly stage 1, so e.g. `x doc compiler` documents the compiler using the stage0/beta rust(do)c. r? `@jieyouxu` try-job: dist-aarch64-msvc
2025-08-11Merge ref '21a19c297d4f' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-30525/+45242
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 21a19c297d4f5a03501d92ca251bd7a17073c08a Filtered ref: 9a5c1fb93028e1a29a7598ce782efb0c5d7be534 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-11Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to 21a19c297d4f5a03501d92ca251bd7a17073c08a.
2025-08-11Auto merge of #145236 - Zalathar:rollup-1ggbztv, r=Zalatharbors-586/+2170
Rollup of 7 pull requests Successful merges: - rust-lang/rust#143949 (Constify remaining traits/impls for `const_ops`) - rust-lang/rust#144330 (document assumptions about `Clone` and `Eq` traits) - rust-lang/rust#144350 (std: sys: io: io_slice: Add UEFI types) - rust-lang/rust#144558 (Point at the `Fn()` or `FnMut()` bound that coerced a closure, which caused a move error) - rust-lang/rust#145149 (Make config method invoke inside parse use dwn_ctx) - rust-lang/rust#145227 (Tweak spans providing type context on errors when involving macros) - rust-lang/rust#145228 (Remove unnecessary parentheses in `assert!`s) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-11add a tip for english writingyukang-1/+3