about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-07Merge ref '6bcdcc73bd11' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-7810/+11364
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd Filtered ref: 6cc4ce79e1f8dc0ec5a2e18049b9c1a51dee3221 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-07Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd.
2025-08-07Reimplement `print_region` in `type_name.rs`.Nicholas Nethercote-6/+83
Broken by #144776; this is reachable after all. Fixes #144994. The commit also adds a lot more cases to the `type-name-basic.rs`, because it's currently very anaemic. This includes some cases where region omission does very badly; these are marked with FIXME.
2025-08-07Auto merge of #115746 - tgross35:unnamed-threads-panic-message, r=cuviperbors-169/+318
Print thread ID in panic message `panic!` does not print any identifying information for threads that are unnamed. However, in many cases, the thread ID can be determined. This changes the panic message from something like this: thread '<unnamed>' panicked at src/main.rs:3:5: explicit panic To something like this: thread '<unnamed>' (12345) panicked at src/main.rs:3:5: explicit panic Stack overflow messages are updated as well. This change applies to both named and unnamed threads. The ID printed is the OS integer thread ID rather than the Rust thread ID, which should also be what debuggers print. try-job: aarch64-apple try-job: aarch64-gnu try-job: dist-apple-various try-job: dist-various-* try-job: dist-x86_64-freebsd try-job: dist-x86_64-illumos try-job: dist-x86_64-netbsd try-job: dist-x86_64-solaris try-job: test-various try-job: x86_64-gnu try-job: x86_64-mingw-1 try-job: x86_64-msvc-1
2025-08-06explicit tail call tests with indirect operands in LLVM, small test for ↵ash-2/+64
indexing into a function table as described by RFC 3407
2025-08-06Print thread ID in panic message if thread name is unknownTrevor Gross-168/+311
`panic!` does not print any identifying information for threads that are unnamed. However, in many cases, the thread ID can be determined. This changes the panic message from something like this: thread '<unnamed>' panicked at src/main.rs:3:5: explicit panic To something like this: thread '<unnamed>' (0xff9bf) panicked at src/main.rs:3:5: explicit panic Stack overflow messages are updated as well. This change applies to both named and unnamed threads. The ID printed is the OS integer thread ID rather than the Rust thread ID, which should also be what debuggers print.
2025-08-06Add normalization for thread IDs in panic messagesTrevor Gross-1/+7
So we don't need to add normalization to every test that includes a panic message, add a global normalization to compiletest.
2025-08-06Auto merge of #145020 - GuillaumeGomez:rollup-5prs9kw, r=GuillaumeGomezbors-497/+1049
Rollup of 15 pull requests Successful merges: - rust-lang/rust#144195 (Parser: Recover from attributes applied to types and generic args) - rust-lang/rust#144794 (Port `#[coroutine]` to the new attribute system) - rust-lang/rust#144835 (Anonymize binders in tail call sig) - rust-lang/rust#144861 (Stabilize `panic_payload_as_str` feature) - rust-lang/rust#144917 (Enforce tail call type is related to body return type in borrowck) - rust-lang/rust#144948 (we only merge candidates for trait and normalizes-to goals) - rust-lang/rust#144956 (Gate const trait syntax) - rust-lang/rust#144970 (rustdoc: fix caching of intra-doc links on reexports) - rust-lang/rust#144972 (add code example showing that file_prefix treats dotfiles as the name of a file, not an extension) - rust-lang/rust#144975 (`File::set_times`: Update documentation and example to support setting timestamps on directories) - rust-lang/rust#144977 (Fortify generic param default checks) - rust-lang/rust#144996 (simplifycfg: Mark as changed when start is modified in collapse goto chain) - rust-lang/rust#144998 (mir: Do not modify NonUse in `super_projection_elem`) - rust-lang/rust#145000 (Remove unneeded `stage` parameter when setting up stdlib Cargo) - rust-lang/rust#145008 (Fix rustdoc scrape examples crash) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-07Optimize `char::is_alphanumeric`Karl Meakin-1/+5
Avoid an unnecessary call to `unicode::Alphabetic` when `self` is an ASCII digit (ie `0..=9`).
2025-08-07Update booksrustbot-0/+0
2025-08-06Add support for shortening `Instance` and use itEsteban Küber-199/+192
Replace ad-hoc type path shortening logic for recursive mono instantiation errors to use `tcx.short_string()` instead.
2025-08-06Merge pull request #2538 from lolbinarycat/patch-6Tshepang Mbambo-0/+4
Link from "Overview of the compiler § Queries" to the Queries chapter
2025-08-06Make link relative an link to md not htmllolbinarycat-1/+1
2025-08-06Changes to the tests for the `#[should_panic]` portJonathan Brouwer-63/+94
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-06Port `#[should_panic]` to the new attribute parsing infrastructureJonathan Brouwer-38/+78
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-06Rollup merge of #145008 - GuillaumeGomez:fix-rustdoc-scrape-examples-crash, ↵Guillaume Gomez-4/+41
r=fmease Fix rustdoc scrape examples crash Fixes rust-lang/rust#144752. The regression was introduced in https://github.com/rust-lang/rust/pull/144600. Although I don't understand why it is an issue currently, this allows to bypass the failure for now until we can figure out what's wrong as it's currently blocking new `bevy`'s release. cc `@alice-i-cecile` r? `@fmease`
2025-08-06Rollup merge of #145000 - Kobzol:std-cargo-stage, r=jieyouxuGuillaume Gomez-13/+9
Remove unneeded `stage` parameter when setting up stdlib Cargo The standard library can't be built using a compiler that has a lower stage than 1 anymore, so the condition was useless (you can test that with e.g. `x doc std --stage 0`, which is broken - I aim to forbid doing that soon). Found this while doing an unrelated cleanup. r? `@jieyouxu`
2025-08-06Rollup merge of #144998 - dianqk:visit-no-use-proj, r=cjgillotGuillaume Gomez-14/+20
mir: Do not modify NonUse in `super_projection_elem` Split from rust-lang/rust#142771. r? cjgillot
2025-08-06Rollup merge of #144996 - dianqk:simplifycfg-collapse_goto_chain-changed, ↵Guillaume Gomez-0/+1
r=cjgillot simplifycfg: Mark as changed when start is modified in collapse goto chain Split from rust-lang/rust#142771. r? cjgillot
2025-08-06Rollup merge of #144977 - fmease:fortify-param-default-checks, r=compiler-errorsGuillaume Gomez-285/+297
Fortify generic param default checks * Hard-reject instead of lint-reject type param defaults in generic assoc consts (GACs) (feature: `generic_const_items`). * In https://github.com/rust-lang/rust/pull/113522, I explicitly handled the free const item case and forgot about the assoc const one. * This led rustc to assume the default of emitting the deny-by-default lint `invalid_type_param_default`. * GCIs are unstable, thus we're not bound by backward compat * Hard-reject instead of lint-reject type param defaults in foreign items. * We already hard-reject generic params on foreign items, so this isn't a breaking change. * There's no reason why we need to lint-reject. * Refactor the way we determine where generic param defaults are allowed: * Don't default to emitting lint `invalid_type_param_defaults` for nodes that aren't explicitly handled but instead panic. * This would've caught my GAC oversight from above much earlier via fuzzing * Prevents us from accidentally stabilizing more invalid type param defaults in the future * Streamline the phrasing of the diagnostic
2025-08-06Rollup merge of #144975 - joshtriplett:file-times-dir, r=jhprattGuillaume Gomez-1/+6
`File::set_times`: Update documentation and example to support setting timestamps on directories Inspired by https://github.com/rust-lang/rust/issues/123883 .
2025-08-06Rollup merge of #144972 - the8472:file-prefix-docs, r=joshtriplettGuillaume Gomez-0/+2
add code example showing that file_prefix treats dotfiles as the name of a file, not an extension This came up in a libs-api meeting while we were reviewing rust-lang/rust#144870
2025-08-06Rollup merge of #144970 - lolbinarycat:rustdoc-macro-wrong-link-144965, ↵Guillaume Gomez-2/+60
r=GuillaumeGomez rustdoc: fix caching of intra-doc links on reexports previously two reexports of the same item would share a set of intra-doc links, which would cause problems if they had two different links with the same text. this was fixed by using the reexport defid as the key, if it is available. fixes https://github.com/rust-lang/rust/issues/144965
2025-08-06Rollup merge of #144956 - fmease:gate-const-trait-syntax, r=BoxyUwUGuillaume Gomez-3/+29
Gate const trait syntax Missed this during my review of rust-lang/rust#143879, huge apologies! Fixes [after beta backport] https://github.com/rust-lang/rust/issues/144958. cc ``@fee1-dead`` r? ``@BoxyUwU`` or anyone
2025-08-06Rollup merge of #144948 - lcnr:change-candidate-handling, r=compiler-errorsGuillaume Gomez-69/+48
we only merge candidates for trait and normalizes-to goals so change `fn try_merge_responses` to `fn try_merge_candidates` and just use candidates everywhere. Potentially slightly faster than the alternative :3 r? ``@compiler-errors`` ``@BoxyUwU``
2025-08-06Rollup merge of #144917 - compiler-errors:tail-call-linked-lifetimes, r=lcnrGuillaume Gomez-56/+80
Enforce tail call type is related to body return type in borrowck Like all call terminators, tail call terminators instantiate the binder of the callee signature with region variables and equate the arg operand types with that signature's args to ensure that the call is valid. However, unlike normal call terminators, we were forgetting to also relate the return type of the call terminator to anything. In the case of tail call terminators, the correct thing is to relate it to the return type of the caller function (or in other words, the return local `_0`). This meant that if the caller's return type had some lifetime constraint, then that constraint wouldn't flow through the signature and affect the args. This is what's happening in the example test I committed: ```rust fn link(x: &str) -> &'static str { become passthrough(x); } fn passthrough<T>(t: T) -> T { t } fn main() { let x = String::from("hello, world"); let s = link(&x); drop(x); println!("{s}"); } ``` Specifically, the type `x` is `'?0 str`, where `'?0` is some *universal* arg. The type of `passthrough` is `fn(&'?1 str) -> &'?1 str`. Equating the args sets `'?0 = '?1`. However, we need to also equate the return type `&'?1 str` to `&'static str` so that we eventually require that `'?0 = 'static`, which is a borrowck error! ----- Look at the first commit for the functional change, and the second commit is just a refactor because we don't need to pass `Option<BasicBlock>` to `check_call_dest`, but just whether or not the terminator is expected to be diverging (i.e. if the return type is `!`). Fixes rust-lang/rust#144916
2025-08-06Rollup merge of #144861 - Kivooeo:payload-as-str-stabilization, r=ChrisDentonGuillaume Gomez-3/+1
Stabilize `panic_payload_as_str` feature Closes [tracking issue](https://github.com/rust-lang/rust/issues/125175). Part of https://github.com/rust-lang/rust/issues/116005. FCP ended more than year ago in tracking issue, I'm not sure if we should rerun it.
2025-08-06Rollup merge of #144835 - compiler-errors:tail-call-sig-binder, r=WaffleLapkinGuillaume Gomez-1/+18
Anonymize binders in tail call sig See the comment for explanation Fixes rust-lang/rust#144826 r? WaffleLapkin
2025-08-06Rollup merge of #144794 - scrabsha:push-noqrrttovmwy, r=jdonszelmannGuillaume Gomez-23/+42
Port `#[coroutine]` to the new attribute system Related to https://github.com/rust-lang/rust/issues/131229#issue-2565886367. r? `````@jdonszelmann`````
2025-08-06Rollup merge of #144195 - Kivooeo:bad-attr, r=fmease,compiler-errorsGuillaume Gomez-23/+395
Parser: Recover from attributes applied to types and generic args r? compiler Add clearer error messages for invalid attribute usage in types or generic types fixes rust-lang/rust#135017 fixes rust-lang/rust#144132
2025-08-06Auto merge of #144509 - cuviper:relnotes-1.89.0, r=BoxyUwUbors-0/+137
Add release notes for 1.89.0 r? `@BoxyUwU` cc `@rust-lang/release` `@rustbot` ping relnotes-interest-group
2025-08-06lower bindings in the order they're writtendianne-65/+128
2025-08-06base drop order on the first sub-branchdianne-55/+49
2025-08-06Explicitly disable vector feature on s390x baseline of bad-reg testPaul Murphy-1/+1
If the baseline s390x cpu is changed to a newer variant, such as z13, the vector feature may be enabled by default. When rust is packaged on fedora 38 and newer, it is set to z13. Explicitly disable vector support on the baseline test for consistent results across s390x cpus.
2025-08-06make rustc_public types derive `Hash`AlexanderPortland-32/+42
2025-08-06don't schedule unnecessary drops when lowering or-patternsdianne-28/+29
This avoids scheduling drops and immediately unscheduling them. Drops for guard bindings/temporaries are still scheduled and unscheduled as before.
2025-08-06Reword documentation for `set_times` to clarify directory handlingJosh Triplett-2/+3
2025-08-06Move some TypeVisitable/TypeFoldable impls to rustc_type_irFlorian Diebold-1/+20
2025-08-06Fix ICEbjorn3-3/+6
2025-08-06Link from "Overview of the compiler § Queries" to the Queries chapterlolbinarycat-0/+4
There's already a link in the other direction, so this seems fairly logical.
2025-08-06Revert "Preserve the .debug_gdb_scripts section"bjorn3-2/+1
This reverts commit 868bdde25b030e0b71a29a5dbc04a891036e702e.
2025-08-06Revert "Preserve the .debug_gdb_scripts section"bjorn3-72/+60
This reverts commit 868bdde25b030e0b71a29a5dbc04a891036e702e.
2025-08-06Revert "Embed GDB pretty printers in rlibs and dylibs"bjorn3-23/+33
This reverts commit b4d923cea0509933b1fb859930cb20784251f9be.
2025-08-06Optimize `needless_bool` lint (#15423)Alejandra González-11/+10
Two optimizations have been done when checking for the context in which to apply the lint: - Checking for the mere presence of comments does not require building a `String` with the comment to then check if it is empty and discard it. - Checking for the presence of comment can be done after we have checked that we do have a `if` construct that we intend to lint instead of for every expression. changelog: none r? blyxyas
2025-08-06Optimize `needless_bool` lintSamuel Tardieu-11/+10
Two optimizations have been done when checking for the context in which to apply the lint: - Checking for the mere presence of comments does not require building a `String` with the comment to then check if it is empty and discard it. - Checking for the presence of comment can be done after we have checked that we do have a `if` construct that we intend to lint instead of for every expression.
2025-08-07In extract_module.rs, generate ast::Module instead of StringHmikihiro-66/+126
2025-08-06Allow function argument mismatch suggestion to be multilineSasha Pourcelot-20/+58
2025-08-06Bump tmp from 0.2.3 to 0.2.4 in /editors/codedependabot[bot]-3/+3
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06Optimize `incompatible_msrv` lint (#15422)Alejandra González-13/+12
This limits repeated lookups in pre-checks (to determine if a MSRV should be checked), especially when those require locking up an interner: - The `core` crate is looked up once when creating the lint, instead of comparing the crate name with `sym::core` at every check. - `span.ctxt().outer_expn_data()` is lookup up only once. changelog: none r? blyxyas
2025-08-06Auto merge of #145003 - Kobzol:rollup-kgb216b, r=Kobzolbors-107/+260
Rollup of 12 pull requests Successful merges: - rust-lang/rust#144552 (Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - rust-lang/rust#144676 (Add documentation for unstable_feature_bound) - rust-lang/rust#144836 (Change visibility of Args new function) - rust-lang/rust#144910 (Add regression tests for seemingly fixed issues) - rust-lang/rust#144913 ([rustdoc] Fix wrong `i` tooltip icon) - rust-lang/rust#144924 (compiletest: add hint for when a ui test produces no errors) - rust-lang/rust#144926 (Correct the use of `must_use` on btree::IterMut) - rust-lang/rust#144928 (Drop `rust-version` from `rustc_thread_pool`) - rust-lang/rust#144945 (Autolabel PRs that change explicit tail call tests as `F-explicit_tail_calls`) - rust-lang/rust#144954 (run-make: Allow blessing snapshot files that don't exist yet) - rust-lang/rust#144971 (num: Rename `isolate_most_least_significant_one` functions) - rust-lang/rust#144978 (Fix some doc links for intrinsics) r? `@ghost` `@rustbot` modify labels: rollup