about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-03Rollup merge of #143379 - jieyouxu:backport-accepted, r=apirainoGuillaume Gomez-19/+90
Post {beta,stable}-accepted notifications to compiler/bootstrap backport zulip channels on `{beta,stable}-accepted` label application The first commit slightly reorganizes `triagebot.toml` (no functional changes) with some dividing sections, because I found it hard to find the actual sections. The second and third commit configures triagebot to post > PR #`{number}` has been **accepted** for **{beta,stable}** backport. to compiler/bootstrap backport threads respectively, when https://github.com/rust-lang/rust/labels/beta-accepted and https://github.com/rust-lang/rust/labels/stable-accepted labels are applied. Best reviewed commit-by-commit. cc `@Kobzol` r? `@apiraino`
2025-07-03Rollup merge of #143369 - bjorn3:cleanup_metadata_loading, r=lcnrGuillaume Gomez-95/+134
Various refactorings to the metadata loader
2025-07-03Rollup merge of #143364 - fee1-dead-contrib:push-pzymzusnzlso, r=workingjubileeGuillaume Gomez-1/+1
don't include `.md` in title its been bugging me
2025-07-03Rollup merge of #141831 - lolbinarycat:rustdoc-extern-reexport-135092, ↵Guillaume Gomez-13/+52
r=GuillaumeGomez rustdoc: fix attrs of locally reexported foreign items fixes rust-lang/rust#135092 also tweaks a few outdated/misleading comments. r? `@GuillaumeGomez`
2025-07-03Post {beta,stable}-accepted message to bootstrap backport threadsJieyou Xu-0/+14
2025-07-03Post {beta,stable}-accepted message to compiler backport threadsJieyou Xu-0/+14
2025-07-03[NFC] Re-organize `triagebot.toml`Jieyou Xu-19/+62
Add some dividing sections, as it was hard to quickly identify which section is which.
2025-07-03Auto merge of #143363 - jdonszelmann:rollup-7cv1kql, r=jdonszelmannbors-518/+951
Rollup of 6 pull requests Successful merges: - rust-lang/rust#134006 (setup typos check in CI) - rust-lang/rust#142876 (Port `#[target_feature]` to new attribute parsing infrastructure) - rust-lang/rust#143038 (avoid suggesting traits from private dependencies) - rust-lang/rust#143083 (Fix rustdoc not correctly showing attributes on re-exports) - rust-lang/rust#143283 (document optional jobs) - rust-lang/rust#143329 (minicore: use core's `diagnostic::on_unimplemented` messages) Failed merges: - rust-lang/rust#143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-03Make most CrateLocator fields privatebjorn3-27/+29
This ensures they don't get out of sync
2025-07-03Have a separate code path for -Zdual-proc-macrobjorn3-41/+56
This makes it clearer when the locator and when crate_rejections is updated
2025-07-03Pass CrateRejections separately from CrateLocatorbjorn3-63/+87
This allows all CrateLocator methods to take &self.
2025-07-03Deduplicate getting the path of a lib candidatebjorn3-6/+4
2025-07-03don't include `.md` in titleDeadbeef-1/+1
2025-07-03Rollup merge of #143329 - folkertdev:minicore-diagnostic-on-unimplemented, ↵Jana Dönszelmann-21/+67
r=jieyouxu minicore: use core's `diagnostic::on_unimplemented` messages Without these attributes, the error message is different. Keeping the diagnostics up-to-date seems related to https://github.com/rust-lang/rust/issues/137531. The modified test files are reported in https://github.com/rust-lang/rust/issues/143319 as failing for `--target=riscv64gc-unknown-linux-gnu`. Using `minicore` for them makes it easier to troubleshoot this sort of issue. r? ``@jieyouxu``
2025-07-03Rollup merge of #143283 - marcoieni:document-optional, r=jieyouxuJana Dönszelmann-0/+7
document optional jobs
2025-07-03Rollup merge of #143083 - JonathanBrouwer:rustdoc-fix, r=jdonszelmannJana Dönszelmann-1/+15
Fix rustdoc not correctly showing attributes on re-exports Fixes attributes not being shown correctly in rustdoc on re-exports Does this need to be backported to beta? r? ``@jdonszelmann``
2025-07-03Rollup merge of #143038 - Qelxiros:142676-private-dependency-traits, r=tgross35Jana Dönszelmann-11/+98
avoid suggesting traits from private dependencies fixes rust-lang/rust#142676 fixes rust-lang/rust#138191 r? ``@tgross35``
2025-07-03Rollup merge of #142876 - JonathanBrouwer:target_feature_parser, r=oli-obkJana Dönszelmann-310/+438
Port `#[target_feature]` to new attribute parsing infrastructure Ports `target_feature` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? ``@jdonszelmann``
2025-07-03Rollup merge of #134006 - klensy:typos, r=nnethercoteJana Dönszelmann-175/+326
setup typos check in CI This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying? Also includes commits with actual typo fixes. MCP: https://github.com/rust-lang/compiler-team/issues/817 typos check currently turned for: * ./compiler * ./library * ./src/bootstrap * ./src/librustdoc After merging, PRs which enables checks for other crates (tools) can be implemented too. Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr. Check typos: `python x.py test tidy --extra-checks=spellcheck` Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo) Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.
2025-07-03Auto merge of #142910 - yotamofek:pr/rustdoc/markdown-lazy-to-string, ↵bors-86/+83
r=GuillaumeGomez Lazy-ify some markdown rendering Seems to have a positive effect in my local perf runs 😍 r? `@GuillaumeGomez` if you're interested, otherwise feel free to reassign (would also love a perf run)
2025-07-03minicore: use core's `diagnostic::on_unimplemented` messagesFolkert de Vries-21/+67
2025-07-03setup CI and tidy to use typos for spellchecking and fix few typosklensy-175/+326
2025-07-03Auto merge of #143294 - ChrisDenton:rename-mingw, r=Kobzolbors-81/+80
Rename `mingw-*` CI jobs to `pr-*` The name `mingw` confuses people because these CI jobs now do much more than just cross-compile to mingw. This is basically a find/replace. I chose the name `pr-` because it's job is to do general PR checks,
2025-07-03Port `#[target_feature]` to the new attribute parsing infrastructureJonathan Brouwer-310/+438
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-03Auto merge of #143350 - matthiaskrgr:rollup-zcuvkve, r=matthiaskrgrbors-325/+716
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143192 (Improve CSS for source code block line numbers) - rust-lang/rust#143251 (bootstrap: add build.tidy-extra-checks option) - rust-lang/rust#143273 (Make the enum check work for negative discriminants) - rust-lang/rust#143292 (Explicitly handle all nodes in `generics_of` when computing parent) - rust-lang/rust#143316 (Add bootstrap check snapshot tests) - rust-lang/rust#143321 (byte-addresses memory -> byte-addressed memory) - rust-lang/rust#143324 (interpret: move the native call preparation logic into Miri) - rust-lang/rust#143325 (Use non-global interner in `test_string_interning` in bootstrap) - rust-lang/rust#143327 (miri: improve errors for type validity assertion failures) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-03Rollup merge of #143327 - RalfJung:miri-type-validity-error, r=oli-obkMatthias Krüger-107/+82
miri: improve errors for type validity assertion failures Miri has pretty nice errors for type validity violations, printing which field in the type the problem occurs at and so on. However, we don't see these errors when using e.g. `mem::zeroed` as that uses `assert_zero_valid` to bail out before Miri can detect the UB. Similar to what we did with `@saethlin's` UB checks, I think we should disable such language UB checks in Miri so that we can get better error messages. If we go for this we should probably say this in the intrinsic docs as well so that people don't think they can rely on these intrinsics catching anything. Furthermore, I slightly changed `MaybeUninit::assume_init` so that the `.value` field does not show up in error messages any more. `@rust-lang/miri` what do you think?
2025-07-03Rollup merge of #143325 - Kobzol:bootstrap-interner, r=clubby789Matthias Krüger-4/+7
Use non-global interner in `test_string_interning` in bootstrap Just a small cleanup that we found on our GSoC call. CC `@Shourya742`
2025-07-03Rollup merge of #143324 - RalfJung:native-call-prep, r=oli-obkMatthias Krüger-61/+67
interpret: move the native call preparation logic into Miri `@nia-e` has to do a bunch of changes to this logic for her native call ptrace work, and it's getting annoying that the logic is split between Miri and rustc. So this moves the logic to Miri, keeping just the generic traversal part in rustc. It is unfortunate that this means we have to expose `get_alloc_raw`/`get_alloc_raw_mut`... I hope the function name is scary enough to reduce the risk of misuse. r? `@oli-obk`
2025-07-03Rollup merge of #143321 - hkBst:typo-1, r=compiler-errorsMatthias Krüger-1/+1
byte-addresses memory -> byte-addressed memory Small typo fix
2025-07-03Rollup merge of #143316 - Kobzol:bootstrap-check-tests, r=jieyouxuMatthias Krüger-63/+373
Add bootstrap check snapshot tests Split off from https://github.com/rust-lang/rust/pull/143048, so that we get a baseline of how check behaved before we make changes to it. Note that the output of the check snapshot tests is suboptimal in many places, as we're missing information about stages and the build compiler. That will be changed in https://github.com/rust-lang/rust/pull/143048. r? `@jieyouxu`
2025-07-03Rollup merge of #143292 - compiler-errors:explicit-generic, r=oli-obkMatthias Krüger-5/+16
Explicitly handle all nodes in `generics_of` when computing parent If we, for example, forget to feed `generics_of` then it'll silently fall back to empty generics. Make this a bit more explicit.
2025-07-03Rollup merge of #143273 - 1c3t3a:enum-check-negative, r=SparrowLiiMatthias Krüger-4/+93
Make the enum check work for negative discriminants The discriminant check was not working correctly for negative numbers. This change fixes that by masking out the relevant bits correctly. Fixes rust-lang/rust#143218.
2025-07-03Rollup merge of #143251 - lolbinarycat:bootstrap-toml-tidy-extra-checks, ↵Matthias Krüger-2/+22
r=Kobzol bootstrap: add build.tidy-extra-checks option split off from rust-lang/rust#142924 r? `@Kobzol`
2025-07-03Rollup merge of #143192 - GuillaumeGomez:code-line-number, r=lolbinaryMatthias Krüger-78/+55
Improve CSS for source code block line numbers Extract some changes from https://github.com/rust-lang/rust/pull/137229 to make the PR smaller (thanks `@yotamofek` for the suggestion!). r? notriddle
2025-07-02avoid suggesting traits from private dependenciesJeremy Smart-32/+28
2025-07-02Auto merge of #143338 - matthiaskrgr:rollup-ykaxh04, r=matthiaskrgrbors-974/+1532
Rollup of 11 pull requests Successful merges: - rust-lang/rust#131923 (Derive `Copy` and `Hash` for `IntErrorKind`) - rust-lang/rust#138340 (Remove some unsized tuple impls now that we don't support unsizing tuples anymore) - rust-lang/rust#141219 (Change `{Box,Arc,Rc,Weak}::into_raw` to only work with `A = Global`) - rust-lang/rust#142212 (bootstrap: validate `rust.codegen-backends` & `target.<triple>.codegen-backends`) - rust-lang/rust#142237 (Detect more cases of unused_parens around types) - rust-lang/rust#142964 (Attribute rework: a parser for single attributes without arguments) - rust-lang/rust#143070 (Rewrite `macro_rules!` parser to not use the MBE engine itself) - rust-lang/rust#143235 (Assemble const bounds via normal item bounds in old solver too) - rust-lang/rust#143261 (Feed `explicit_predicates_of` instead of `predicates_of`) - rust-lang/rust#143276 (loop match: handle opaque patterns) - rust-lang/rust#143306 (Add `track_caller` attributes to trace origin of Clippy lints) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl try-job: test-various
2025-07-02Auto merge of #143337 - matthiaskrgr:rollup-lqwhe0i, r=matthiaskrgrbors-132/+306
Rollup of 9 pull requests Successful merges: - rust-lang/rust#141847 (Explain `TOCTOU` on the top of `std::fs`, and reference it in functions) - rust-lang/rust#142138 (Add `Vec::into_chunks`) - rust-lang/rust#142321 (Expose elf abi on ppc64 targets) - rust-lang/rust#142886 (ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`) - rust-lang/rust#143194 (fix bitcast of single-element SIMD vectors) - rust-lang/rust#143231 (Suggest use another lifetime specifier instead of underscore lifetime) - rust-lang/rust#143232 ([COMPILETEST-UNTANGLE 3/N] Use "directives" consistently within compiletest) - rust-lang/rust#143258 (Don't recompute `DisambiguatorState` for every RPITIT in trait definition) - rust-lang/rust#143274 (ci: support optional jobs) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-02Rollup merge of #143306 - samueltardieu:track-clippy-lints-emission, ↵Matthias Krüger-0/+60
r=petrochenkov Add `track_caller` attributes to trace origin of Clippy lints This allows the use of `-Z track-diagnostics` to see the origin of Clippy lints emission, as is already the case for lints coming from rustc.
2025-07-02Rollup merge of #143276 - folkertdev:loop-match-opaque-pattern, r=NadrierilMatthias Krüger-156/+270
loop match: handle opaque patterns tracking issue https://github.com/rust-lang/rust/issues/132306 fixes https://github.com/rust-lang/rust/issues/143203 I believe the `Opaque` comes up because the range pattern is invalid? Because we do handle float patterns already so those should be fine. r? `@Nadrieril`
2025-07-02Rollup merge of #143261 - compiler-errors:explicit-pred, r=oli-obkMatthias Krüger-3/+1
Feed `explicit_predicates_of` instead of `predicates_of` Tiny nitpick, just avoiding needing to mark the `predicates_of` query as feedable since it's derived from `explicit_predicates_of`.
2025-07-02Rollup merge of #143235 - compiler-errors:const-item-bound, r=oli-obkMatthias Krüger-1/+85
Assemble const bounds via normal item bounds in old solver too Fixes the first example in https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/elaboration.20of.20const.20bounds.3F/with/526378135 The code duplication here is not that nice, but it's at least very localized. cc `@davidtwco` r? oli-obk
2025-07-02Rollup merge of #143070 - joshtriplett:macro-rules-parse, r=petrochenkovMatthias Krüger-217/+73
Rewrite `macro_rules!` parser to not use the MBE engine itself The `macro_rules!` parser was written to match the series of rules using the macros-by-example (MBE) engine and a hand-written equivalent of the left-hand side of a MBE macro. This was complex to read, difficult to extend, and produced confusing error messages. Because it was using the MBE engine, any parse failure would be reported as if some macro was being applied to the `macro_rules!` invocation itself; for instance, errors would talk about "macro invocation", "macro arguments", and "macro call", when they were actually about the macro *definition*. And in practice, the `macro_rules!` parser only used the MBE engine to extract the left-hand side and right-hand side of each rule as a token tree, and then parsed the rest using a separate parser. Rewrite it to parse the series of rules using a simple loop, instead. This makes it more extensible in the future, and improves error messages. For instance, omitting a semicolon between rules will result in "expected `;`" and "unexpected token", rather than the confusing "no rules expected this token in macro call". This work was greatly aided by pair programming with Vincenzo Palazzo (`@vincenzopalazzo)` and Eric Holk (`@eholk).` For review, I recommend reading the two commits separately.
2025-07-02Rollup merge of #142964 - GrigorenkoPV:attributes/argless, r=oli-obkMatthias Krüger-132/+91
Attribute rework: a parser for single attributes without arguments Part of rust-lang/rust#131229 r? `@jdonszelmann` I think code (with comments) speaks for itself. The only subtlety: now `#[cold]`, `#[no_mangle]`, & `#[track_caller]` do not get thrown away when malformed (i.e. have arguments). This doesn't matter too much (I think), because an error gets emitted either way, so the compilation will not finish.
2025-07-02Rollup merge of #142237 - benschulz:unused-parens-fn, r=fee1-deadMatthias Krüger-83/+596
Detect more cases of unused_parens around types With this change, more unused parentheses around bounds and types nested within bounds are detected.
2025-07-02Rollup merge of #142212 - GrigorenkoPV:codegens, r=KobzolMatthias Krüger-36/+29
bootstrap: validate `rust.codegen-backends` & `target.<triple>.codegen-backends` As per https://github.com/rust-lang/rust/issues/142184#issuecomment-2954124009. Closes rust-lang/rust#142184.
2025-07-02Rollup merge of #141219 - Amanieu:leak_alloc, r=joboetMatthias Krüger-316/+321
Change `{Box,Arc,Rc,Weak}::into_raw` to only work with `A = Global` Also applies to `Vec::into_raw_parts`. The expectation is that you can round-trip these methods with `from_raw`, but this is only true when using the global allocator. With custom allocators you should instead be using `into_raw_with_allocator` and `from_raw_in`. The implementation of `Box::leak` is changed to use `Box::into_raw_with_allocator` and explicitly leak the allocator (which was already the existing behavior). This is because, for `leak` to be safe, the allocator must not free its underlying backing store. The `Allocator` trait only guarantees that allocated memory remains valid until the allocator is dropped.
2025-07-02Rollup merge of #138340 - oli-obk:one-size-fits-all, r=m-ou-seMatthias Krüger-29/+5
Remove some unsized tuple impls now that we don't support unsizing tuples anymore Since https://github.com/rust-lang/rust/pull/137728 there is no sound way to create unsized tuples anymore. While we can't remove them from the language (tried here: https://github.com/rust-lang/rust/pull/138093) due to people using `PhantomData<(T, U)>` where `U: ?Sized` (they'd have to use `(PhantomData<T>, PhantomData<U>)` now), we can remove the impls from libcore I believe. r? libs I guess?
2025-07-02Rollup merge of #131923 - ranger-ross:impl-copy-hash-interrorkind, r=tgross35Matthias Krüger-1/+1
Derive `Copy` and `Hash` for `IntErrorKind` This PR derives `Copy` and `Hash` for `IntErrorKind` to make it easier to work with. (see #131826) I think an argument could be made to also derive `PartialOrd` + `Ord` as well given that other error kinds in the std like [`io::ErrorKind`](https://doc.rust-lang.org/src/std/io/error.rs.html#212-428) do this. Granted these seem much less useful for errors. Fixes https://github.com/rust-lang/rust/issues/131826
2025-07-02Rollup merge of #143274 - marcoieni:optional-jobs, r=KobzolMatthias Krüger-6/+43
ci: support optional jobs try-job: optional-mingw-check-1
2025-07-02Rollup merge of #143258 - compiler-errors:disambiguator-state, r=oli-obkMatthias Krüger-46/+47
Don't recompute `DisambiguatorState` for every RPITIT in trait definition The `associated_type_for_impl_trait_in_trait` currently needs to rerun the `RPITVisitor` for every RPITIT to compute its disambiguator. Instead of synthesizing all of the RPITITs def ids one at a time in different queries, just synthesize them inside of the `associated_types_for_impl_traits_in_associated_fn` query. There we can just share the same `DisambiguatorState` for all the RPITITs in one function signature. r? ``````@Zoxc`````` or ``````@oli-obk`````` cc rust-lang/rust#140453