about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-04-14Documentation and finishing touchesmejrs-79/+215
2025-04-10Parse condition options into a structmejrs-165/+168
2025-04-10Write the format string parserand split it from conditions parsermejrs-360/+613
2025-04-09Move errorsmejrs-77/+89
2025-04-09Auto merge of #139581 - matthiaskrgr:rollup-d6hph16, r=matthiaskrgrbors-879/+1230
Rollup of 7 pull requests Successful merges: - #138869 (Try not to use verbatim paths in `Command::current_dir`) - #138993 (Make `cfg_match!` a semitransparent macro) - #139099 (Promise `array::from_fn` is generated in order of increasing indices) - #139364 (Make the compiler suggest actual paths instead of visible paths if the visible paths are through any doc hidden path.) - #139468 (Don't call `Span::with_parent` on the good path in `has_stashed_diagnostic`) - #139481 (Add job summary links to post-merge report) - #139573 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-09Rollup merge of #139573 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-827/+824
Miri subtree update r? `@ghost`
2025-04-09Rollup merge of #139481 - Kobzol:post-merge-links, r=marcoieniMatthias Krüger-11/+153
Add job summary links to post-merge report This should make it much easier to investigate the individual job test/duration changes. The GitHub API handling is a bit crude, but I didn't want to include octocrab, because it more than doubles the current number of dependencies of `citool`... Can be tested with: ```bash $ cargo run --manifest-path src/ci/citool/Cargo.toml post-merge-report bad13a970a136389187dd1cf2f2fc737a8bea5fc 1e008dd5d83e782ad37fc9cf6824733f824cc8cd ``` r? ```@marcoieni```
2025-04-09Rollup merge of #139468 - compiler-errors:has_stashed_diagnostic, r=oli-obkMatthias Krüger-26/+44
Don't call `Span::with_parent` on the good path in `has_stashed_diagnostic` More unnecessary incurred span tracking avoided by not calling `span.with_parent(None)`. This is useless on its own but makes it much easier to fix other "span tracking on the good path" issues in the future. r? oli-obk
2025-04-09Rollup merge of #139364 - Kohei316:feat/doc-hidden-suggestion, r=nnethercoteMatthias Krüger-2/+59
Make the compiler suggest actual paths instead of visible paths if the visible paths are through any doc hidden path. close #127011 Currently, when emitting a diagnostic about a valid trait, the compiler suggestes using visible paths of the trait even if they are through a doc hidden path. This PR updates the compiler to suggest actual paths in these cases.
2025-04-09Rollup merge of #139099 - scottmcm:from_fn_docs, r=AmanieuMatthias Krüger-6/+27
Promise `array::from_fn` is generated in order of increasing indices Fixes #139061 I agree this needs to be documented because of the `FnMut`, either with a guarantee or to explicitly disclaim one. I'm pretty sure this will be non-controversial (like the other "well sure you *could* do it in a different order, but why?" things were), but I couldn't find any previous libs-api decision on it so it's seemingly a new promise that will need FCP. Basically, yes, it would be plausible to fill in the reverse order, but there's no obvious way we could ever know that that might even be a good idea, so forward seems like an easy thing to promise. We could always add a `from_fn_rev` or something later if there's ever a strong enough need, but it seems unlikely. Let's just do the obvious thing so it matches what `[gen(0), gen(1), …, gen(N-1)]` does.
2025-04-09Rollup merge of #138993 - CAD97:cfg_match_semitransparent, r=dtolnayMatthias Krüger-3/+4
Make `cfg_match!` a semitransparent macro IIUC this is preferred when (potentially) stabilizing `macro` items, to avoid potentially utilizing def-site hygiene instead of mixed-site. Tracking issue: #115585
2025-04-09Rollup merge of #138869 - ChrisDenton:command-curdir, r=tgross35Matthias Krüger-4/+119
Try not to use verbatim paths in `Command::current_dir` If possible, we should try not to use verbatim paths in `Command::current_dir`. It might work but it might also break code in the subprocess that assume the current directory isn't verbatim (including Windows APIs). cc ``@ehuss`` Side note: we now have a lot of ad-hoc fixes like this spread about the place. It'd be good to make a proper `WindowsPath` type that handles all this in one place. But that's a bigger job for another PR.
2025-04-09Auto merge of #139327 - cjgillot:gvn-place, r=oli-obkbors-55/+206
Allow GVN to produce places and not just locals. That may be too big of a hammer, as we may introduce new deref projections (possible UB footgun + probably not good for perf). The second commit opts out of introducing projections that don't have a stable offset, which is probably what we want. Hence no new Deref and no new Index projections. Fixes https://github.com/rust-lang/rust/issues/138936 cc `@scottmcm` `@dianqk`
2025-04-09update lockfileRalf Jung-26/+35
2025-04-09Auto merge of #139552 - matthiaskrgr:rollup-b194mk8, r=matthiaskrgrbors-113/+207
Rollup of 10 pull requests Successful merges: - #139494 (Restrict some queries by def-kind more) - #139496 (Revert r-a changes of rust-lang/rust#139455) - #139506 (add missing word in doc comment (part 2)) - #139515 (Improve presentation of closure signature mismatch from `Fn` trait goal) - #139520 (compiletest maintenance: sort deps and drop dep on `anyhow`) - #139523 (Rustc dev guide subtree update) - #139526 (Fix deprecation note for std::intrinsics) - #139528 (compiletest: Remove the `--logfile` flag) - #139541 (Instantiate higher-ranked transmute goal w/ placeholders before emitting sub-obligations) - #139547 (Update library tracking issue template to set S-tracking-unimplemented) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-09Auto merge of #139555 - petrochenkov:errkind-ann, r=jieyouxubors-928/+930
UI tests: add missing diagnostic kinds where possible The subset of https://github.com/rust-lang/rust/pull/139427 that only adds diagnostic kinds to line annotations, without changing any other things in annotations or compiletest. After this only non-viral `NOTE`s and `HELP`s should be missing. r? `@jieyouxu`
2025-04-09Avoid verbatim paths in Command::current_dirChris Denton-4/+83
If possible, we should try not to use verbatim paths in Command::current_dir. It might work but it might also break code (including some Windows APIs) that assume the current directory isn't verbatim.
2025-04-08Auto merge of #139536 - matthiaskrgr:rollup-j6goald, r=matthiaskrgrbors-303/+529
Rollup of 7 pull requests Successful merges: - #139476 (rm `RegionInferenceContext::var_infos`) - #139485 (compiletest: Stricter parsing for diagnostic kinds) - #139491 (Update books) - #139500 (document panic behavior of Vec::resize and Vec::resize_with) - #139501 (Fix stack overflow in exhaustiveness due to recursive HIR opaque hidden types) - #139504 (add missing word in doc comment) - #139509 (clean: remove Deref<Target=RegionKind> impl for Region and use `.kind()`) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-928/+930
2025-04-08Rollup merge of #139547 - joshtriplett:library-tracking-issue-template, ↵Matthias Krüger-1/+3
r=Amanieu Update library tracking issue template to set S-tracking-unimplemented This will help people notice the `S-tracking-*` labels, and if the tracking issue *is* implemented, they can change the label. Discussed in a `@rust-lang/libs-api` meeting. r? `@Amanieu`
2025-04-08Rollup merge of #139541 - compiler-errors:transmute, r=lcnrMatthias Krüger-3/+21
Instantiate higher-ranked transmute goal w/ placeholders before emitting sub-obligations This avoids an ICE where we weren't keeping track of bound variables correctly in the `Freeze` obligations we emit for transmute goals. We could use `rebind` instead on that goal, but I think it's better just to instantiate the binder. Fixes #139538 r? `@lcnr` or reassign
2025-04-08Rollup merge of #139528 - Zalathar:no-logfile, r=jieyouxuMatthias Krüger-6/+1
compiletest: Remove the `--logfile` flag This flag is deprecated in libtest (#134283), and there's no evidence in-tree of this flag actually being passed to compiletest. For detailed information about test results, bootstrap parses JSON output from compiletest instead (#108659). As part of my experimental work on removing the libtest dependency from compiletest, it's useful to be able to disconnect libtest functionality that isn't needed.
2025-04-08Rollup merge of #139526 - smanilov:issue-139505, r=RalfJungMatthias Krüger-3/+3
Fix deprecation note for std::intrinsics Also checked the rest of the mentions of std::mem in the changed file and they look good to me. Fixes #139505
2025-04-08Rollup merge of #139523 - BoxyUwU:rgd-push, r=jieyouxuMatthias Krüger-7/+13
Rustc dev guide subtree update r? `@jieyouxu`
2025-04-08Rollup merge of #139520 - jieyouxu:compiletest-maintenance-1, r=lqdMatthias Krüger-15/+14
compiletest maintenance: sort deps and drop dep on `anyhow` Two changes: 1. Sort compiletest deps alphabetically because it was annoying me (harder to quickly glance what deps compiletest is using). 2. Drop dependency on `anyhow`. There's only one usage of `anyhow`, which is for `with_context` on sth that would immediately panic anyway.
2025-04-08Rollup merge of #139515 - compiler-errors:sig-mismatch, r=lcnrMatthias Krüger-44/+70
Improve presentation of closure signature mismatch from `Fn` trait goal Flip the order of "expected" and "found" since that wasn't correct. Don't present the arguments as a tuple, since it leaves a trailing comma. Instead, just use `fn(arg, arg)`. Finally, be better with binders since we were just skipping binders. r? oli-obk or reassign
2025-04-08Rollup merge of #139506 - tshepang:patch-6, r=jieyouxuMatthias Krüger-1/+1
add missing word in doc comment (part 2)
2025-04-08Rollup merge of #139496 - Skgland:139455-went-too-far, r=VeykrilMatthias Krüger-7/+38
Revert r-a changes of rust-lang/rust#139455 I discovered https://github.com/rust-lang/rust/issues/132735#issuecomment-2784205477 that I might have done too much in rust-lang/rust#132735 by also removing support in r-a. So this reverts the commit with the changes to r-a. r? RalfJung
2025-04-08Rollup merge of #139494 - compiler-errors:restrict-queries, r=oli-obkMatthias Krüger-26/+43
Restrict some queries by def-kind more Random cleanup. I prefer things to assert more so as to catch bugs :) r? oli-obk
2025-04-08Instantiate higher-ranked transmute goalMichael Goulet-3/+21
2025-04-08Rollup merge of #139509 - xizheyin:issue-139359, r=lcnrMatthias Krüger-127/+117
clean: remove Deref<Target=RegionKind> impl for Region and use `.kind()` Closes #139359 r? `@lcnr`
2025-04-08Rollup merge of #139504 - tshepang:patch-5, r=jieyouxuMatthias Krüger-6/+6
add missing word in doc comment
2025-04-08Rollup merge of #139501 - compiler-errors:suppress-stack-overflow, r=lcnrMatthias Krüger-5/+224
Fix stack overflow in exhaustiveness due to recursive HIR opaque hidden types This fixes several spicy non-trivial recursive opaque definitions inferred from HIR typeck, ensuring that they don't cause stack overflows in exhaustiveness code, which currently reveals opaques manually in a way that is not overflow aware (as opposed to something like the normalizer folders). These should eventually be outright rejected, but today (some) non-trivial recursive opaque definitions are accepted, and changing that requires an FCP, so for now just make sure we don't stack overflow :^) Fixes https://github.com/rust-lang/rust/issues/139402 r? lcnr
2025-04-08Rollup merge of #139500 - jogru0:117437, r=tgross35Matthias Krüger-0/+8
document panic behavior of Vec::resize and Vec::resize_with This adds panic documentation to ´Vec::resize´ and ´Vec::resize_with´. Fixes #117437.
2025-04-08Rollup merge of #139491 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/reference 12 commits in e95ebdfee02514d93f79ec92ae310a804e87f01f..46435cd4eba11b66acaa42c01da5c80ad88aee4b 2025-04-07 14:21:21 UTC to 2025-03-25 20:13:17 UTC - Update book.toml fix the authors field (rust-lang/reference#1780) - Update precedence table for borrow operators (rust-lang/reference#1776) - Add the ability for rules to be specified in link definitions (rust-lang/reference#1775) - Rework trait parameter patterns (rust-lang/reference#1771) - Fix header rules (rust-lang/reference#1770) - Add test wrappers (rust-lang/reference#1774) - Update tools to Rust 2024 (rust-lang/reference#1773) - Define byte (rust-lang/reference#1772) - Fix CSS for new footnote style (rust-lang/reference#1777) - do not reference LLVM in our definition of UB (rust-lang/reference#1750) - Tweak reference for precise capturing in traits (rust-lang/reference#1769) - Add edition admonitions (rust-lang/reference#1764) ## rust-lang/rust-by-example 2 commits in 6f69823c28ae8d929d6c815181c73d3e99ef16d3..0d7964d5b22cf920237ef1282d869564b4883b88 2025-04-07 11:19:31 UTC to 2025-03-29 02:25:52 UTC - Rename count to index for clarity (rust-lang/rust-by-example#1920) - Fixing grammar in panic section (rust-lang/rust-by-example#1916)
2025-04-08Rollup merge of #139485 - petrochenkov:errkind-light, r=oli-obk,jieyouxuMatthias Krüger-151/+166
compiletest: Stricter parsing for diagnostic kinds Non-controversial parts of https://github.com/rust-lang/rust/pull/139427 not requiring many changes in the test suite. r? ``@jieyouxu``
2025-04-08Rollup merge of #139476 - lcnr:rm-var_infos, r=compiler-errorsMatthias Krüger-14/+8
rm `RegionInferenceContext::var_infos` we already track this info in the `definitions` field r? types
2025-04-08Auto merge of #138499 - lcnr:borrowck-typeck_root, r=oli-obkbors-368/+490
borrowck typeck children together with their root This introduces new cycle errors, even with `feature(inline_const_pat)` removed, see the `non-structural-match-types-cycle-err.rs` test. The new cycle error happens as the layout of `async`-blocks relies on their `optimized_mir`. As that now depends on `mir_borrowck` of its typeck parent, computing the layout of an `async`-block during MIR building, e.g. when evaluating a named `const` pattern. I think there's currently no way to have a named const pattern whose type references an async block while being allowed? cc `@oli-obk` `@RalfJung` I cannot think of other cases where we currently rely on the MIR of a typeck children while borrowchecking their parent. The crater run came back without any breakage. My work here will prevent any future features which rely on this as we'll get locked into borrowchecking them together as I continue to work on https://github.com/rust-lang/types-team/issues/129, cc `@rust-lang/types.` r? compiler-errors
2025-04-08Update library tracking issue template to set S-tracking-unimplementedJosh Triplett-1/+3
This will help people notice the `S-tracking-*` labels, and if the tracking issue *is* implemented, they can change the label.
2025-04-08compiletest: Remove the `--logfile` flagZalathar-6/+1
This flag is deprecated in libtest, and there's no evidence in-tree of this flag actually being passed to compiletest. (For detailed information about test results, bootstrap parses JSON output from compiletest instead.)
2025-04-08Auto merge of #139525 - Zalathar:rollup-5t5xsrw, r=Zalatharbors-184/+1003
Rollup of 10 pull requests Successful merges: - #138676 (Implement overflow for infinite implied lifetime bounds) - #139024 (Make error message for missing fields with `..` and without `..` more consistent) - #139098 (Tell LLVM about impossible niche tags) - #139124 (compiler: report error when trait object type param reference self) - #139321 (Update to new rinja version (askama)) - #139346 (Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`) - #139386 (make it possible to use stage0 libtest on compiletest) - #139421 (Fix trait upcasting to dyn type with no principal when there are projections) - #139464 (Allow for reparsing failure when reparsing a pasted metavar.) - #139490 (Update some comment/docs related to "extern intrinsic" removal) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-08Fix deprecation note for std::intrinsicsStan Manilov-3/+3
Also checked the rest of the mentions of std::mem in the changed file and they look good to me.
2025-04-08Rollup merge of #139490 - RalfJung:unstable-intrinsics-docs, r=oli-obkStuart Cook-88/+14
Update some comment/docs related to "extern intrinsic" removal Follow-up to https://github.com/rust-lang/rust/pull/139455. r? `@oli-obk`
2025-04-08Rollup merge of #139464 - nnethercote:fix-139248-AND-fix-139445, r=petrochenkovStuart Cook-4/+93
Allow for reparsing failure when reparsing a pasted metavar. Fix some metavar reparsing issues. Fixes #139248 and #139445. r? `@petrochenkov`
2025-04-08Rollup merge of #139421 - compiler-errors:upcast-no-principal-with-proj, ↵Stuart Cook-14/+37
r=oli-obk Fix trait upcasting to dyn type with no principal when there are projections #126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of #114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any). With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe82563146325674b8d437f9f9f6e703703, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch. This does not need an FCP because this should've been covered by the FCP in #126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸 Fixes #139418 r? ````@oli-obk```` (or anyone)
2025-04-08Rollup merge of #139386 - onur-ozkan:configurable-compiletest-libtest, ↵Stuart Cook-9/+91
r=jieyouxu,kobzol make it possible to use stage0 libtest on compiletest With https://github.com/rust-lang/rust/pull/119899, building the library tree will require a stage 1 compiler. This is because `compiletest` is defined as a `ToolStd` (since https://github.com/rust-lang/rust/pull/68019) in order to use the in-tree library. As a result, https://github.com/rust-lang/rust/pull/119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling `compiletest` each time. This PR allows switching `ToolStd` to `ToolBootstrap` with a simple boolean option in `bootstrap.toml` to allow `compiletest` to use the stage 0 `libtest` instead. The changes under `src/ci` are clearly intended to make sure that `compiletest` doesn't break during future bootstrap beta bumps.
2025-04-08Rollup merge of #139346 - ↵Stuart Cook-1/+93
compiler-errors:non-lifetime-binder-diag-hir-wf-check, r=oli-obk Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check` See comment inline. Fixes #139330 r? oli-obk
2025-04-08Rollup merge of #139321 - GuillaumeGomez:update-rinja, ↵Stuart Cook-30/+81
r=notriddle,lolbinarycat,yotamofek Update to new rinja version (askama) Askama maintenance was handed over to rinja maintainers so new `rinja` release is actually `askama`. More information [here](https://blog.guillaume-gomez.fr/articles/2025-03-19+Askama+and+Rinja+merge). r? ``@notriddle``
2025-04-08Rollup merge of #139124 - xtexx:gh-139082, r=compiler-errorsStuart Cook-0/+46
compiler: report error when trait object type param reference self Fixes #139082. Emits an error when `Self` is found in the projection bounds of a trait object. In type aliases, `Self` has no meaning, so `type A = &'static dyn B` where `trait B = Fn() -> Self` will expands to `type A = &'static Fn() -> Self` which is illegal, causing the region solver to bail out when hitting the uninferred Self. r? ````@compiler-errors```` ````@fee1-dead````
2025-04-08Rollup merge of #139098 - scottmcm:assert-impossible-tags, r=WaffleLapkinStuart Cook-20/+487
Tell LLVM about impossible niche tags I was trying to find a better way of emitting discriminant calculations, but sadly had no luck. So here's a fairly small PR with the bits that did seem worth bothering: 1. As the [`TagEncoding::Niche` docs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/enum.TagEncoding.html#variant.Niche) describe, it's possible to end up with a dead value in the input that's not already communicated via the range parameter attribute nor the range load metadata attribute. So this adds an `llvm.assume` in non-debug mode to tell LLVM about that. (That way it can tell that the sides of the `select` have disjoint possible values.) 2. I'd written a bunch more tests, or at least made them parameterized, in the process of trying things out, so this checks in those tests to hopefully help future people not trip on the same weird edge cases, like when the tag type is `i8` but yet there's still a variant index and discriminant of `258` which doesn't fit in that tag type because the enum is really weird.