about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-01-29Add new output-formatGuillaume Gomez-12/+105
2025-01-29Auto merge of #136225 - fmease:rollup-fm7m744, r=fmeasebors-391/+559
Rollup of 7 pull requests Successful merges: - #135625 ([cfg_match] Document the use of expressions.) - #135902 (Do not consider child bound assumptions for rigid alias) - #135943 (Rename `Piece::String` to `Piece::Lit`) - #136104 (Add mermaid graphs of NLL regions and SCCs to polonius MIR dump) - #136143 (Update books) - #136147 (ABI-required target features: warn when they are missing in base CPU) - #136164 (Refactor FnKind variant to hold &Fn) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-29Rollup merge of #136164 - celinval:chores-fnkind, r=oli-obkLeón Orell Valerian Liehr-91/+93
Refactor FnKind variant to hold &Fn Pulling the change suggested in #128045 to reduce the impact of changing `Fn` item. r? `@oli-obk`
2025-01-29Rollup merge of #136147 - RalfJung:required-target-features-check-not-add, ↵León Orell Valerian Liehr-140/+91
r=workingjubilee ABI-required target features: warn when they are missing in base CPU Part of https://github.com/rust-lang/rust/pull/135408: instead of adding ABI-required features to the target we build for LLVM, check that they are already there. Crucially we check this after applying `-Ctarget-cpu` and `-Ctarget-feature`, by reading `sess.unstable_target_features`. This means we can tweak the ABI target feature check without changing the behavior for any existing user; they will get warnings but the target features behave as before. The test changes here show that we are un-doing the "add all required target features" part. Without the full #135408, there is no way to take a way an ABI-required target feature with `-Ctarget-cpu`, so we cannot yet test that part. Cc ``@workingjubilee``
2025-01-29Rollup merge of #136143 - rustbot:docs-update, r=ehussLeón Orell Valerian Liehr-0/+0
Update books ## rust-lang/book 3 commits in 82a4a49789bc96db1a1b2a210b4c5ed7c9ef0c0d..fa312a343fbff01bc6cef393e326817f70719813 2025-01-22 17:14:29 UTC to 2025-01-22 15:09:26 UTC - chore: reformat src with dprint (rust-lang/book#4211) - Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209) - Document that `use` is also for `precise capturing` (rust-lang/book#4210) ## rust-lang/edition-guide 1 commits in d56e0f3a0656b7702ca466d4b191e16c28262b82..4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda 2025-01-21 21:39:56 UTC to 2025-01-21 21:39:56 UTC - Add alternatives for static-mut-refs (rust-lang/edition-guide#354) ## rust-lang/nomicon 3 commits in 625b200e5b33a5af35589db0bc454203a3d46d20..bc2298865544695c63454fc1f9f98a3dc22e9948 2025-01-23 19:01:24 UTC to 2025-01-20 14:37:52 UTC - corrected grammatical error. (rust-lang/nomicon#477) - Remove `#![start]` attribute (rust-lang/nomicon#478) - Update guidance on uninitialized fields to use &raw mut instead of addr_of_mut! (rust-lang/nomicon#476) ## rust-lang/reference 10 commits in 293af991003772bdccf2d6b980182d84dd055942..93b921c7d3213d38d920f7f905a3bec093d2217d 2025-01-25 21:59:01 UTC to 2025-01-14 17:28:04 UTC - distinct 'static' items never overlap (rust-lang/reference#1657) - Change `'_static` to `'static` as an invalid lifetime parameter name (rust-lang/reference#1721) - reword reference about inert attributes (rust-lang/reference#1719) - Provide a better error message for broken links in mdbook-spec (rust-lang/reference#1716) - Remove unstable vectorcall (rust-lang/reference#1717) - Move the function pointer example (rust-lang/reference#1718) - references and Box must be non-null (rust-lang/reference#1715) - Fix filename for theme customization (rust-lang/reference#1711) - Add Identifier Syntax to Several Chapters (rust-lang/reference#1597) - move r[rules] to the left of the main body, using a grid (rust-lang/reference#1710)
2025-01-29Rollup merge of #136104 - lqd:polonius-debugger-episode-2, r=matthewjasperLeón Orell Valerian Liehr-5/+136
Add mermaid graphs of NLL regions and SCCs to polonius MIR dump This PR expands the polonius MIR dump again with a couple of mermaid charts ported from the graphviz version: - the NLL region graph - and the NLL SCCs I still have done zero visual design on this until now, but [here's](https://gistpreview.github.io/?fbbf900fed2ad21108c7ca0353456398) how it looks (i.e. still bad) just to give an idea of the result. r? `````@matthewjasper````` (feel free to reassign) or anyone
2025-01-29Rollup merge of #135943 - hkBst:opt_imports, r=estebankLeón Orell Valerian Liehr-38/+33
Rename `Piece::String` to `Piece::Lit` This renames Piece::String to Piece::Lit to avoid shadowing std::string::String and removes "pub use Piece::*;".
2025-01-29Rollup merge of #135902 - compiler-errors:item-non-self-bound-in-new-solver, ↵León Orell Valerian Liehr-117/+195
r=lcnr Do not consider child bound assumptions for rigid alias r? lcnr See first commit for the important details. For second commit, I also stacked a somewhat opinionated name change, though I can separate that if needed. Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/149
2025-01-29Rollup merge of #135625 - c410-f3r:cfg-match-foo-bar-baz, r=tgross35,jhprattLeón Orell Valerian Liehr-0/+11
[cfg_match] Document the use of expressions. cc #115585 Adds documentation to this new feature introduced in #133720.
2025-01-29Auto merge of #136011 - compiler-errors:query-norm-vaniquishes-us, r=jackh726bors-36/+36
Revert #135914: Remove usages of `QueryNormalizer` in the compiler Reverts #135914. r? jackh726
2025-01-28Auto merge of #136209 - flip1995:clippy-subtree-update, r=Manishearthbors-795/+5679
Clippy subtree update r? `@Manishearth` Quite a bit late, as I was on vacation and then we had an issue in MacOS CI after the sync.
2025-01-28Auto merge of #136203 - matthiaskrgr:rollup-1k0f44l, r=matthiaskrgrbors-167/+561
Rollup of 9 pull requests Successful merges: - #135869 (Make docs for AtomicUsize::from_mut platform-independent) - #135892 (-Znext-solver: "normalize" signature before checking it mentions self in `deduce_closure_signature`) - #136055 (Implement MIR const trait stability checks) - #136066 (Pass spans to `perform_locally_in_new_solver`) - #136071 ([Clippy] Add vec_reserve & vecdeque_reserve diagnostic items) - #136124 (Arbitrary self types v2: explain test.) - #136149 (Flip the `rustc-rayon`/`indexmap` dependency order) - #136173 (Update comments and sort target_arch in c_char_definition) - #136178 (Update username in build helper example) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-28Refactor FnKind variant to hold &FnCelina G. Val-91/+93
2025-01-28Make item self/non-self bound naming less whackMichael Goulet-101/+92
2025-01-28Do not assume child bound assumptions for rigid aliasMichael Goulet-18/+105
2025-01-28Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵Philipp Krones-795/+5679
clippy-subtree-update
2025-01-28parse_format optimize import useMarijn Schouten-38/+33
2025-01-28Rustup (#14080)Philipp Krones-724/+639
r? @ghost changelog: none
2025-01-28Bump nightly version -> 2025-01-28Philipp Krones-2/+2
2025-01-28Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-883/+5796
2025-01-28Auto merge of #135832 - Kobzol:rustdoc-lto, r=onur-ozkanbors-9/+29
Apply LTO config to rustdoc Before, the LTO configuration from `config.toml` was not applied to `rustdoc`. This provides a small perf. and binary size [win](https://github.com/rust-lang/rust/pull/112049#issuecomment-2605131041) for doc builds. Since this is configured with Cargo profiles and not rustflags, it should not break tool build cache (https://github.com/rust-lang/rust/pull/131155). I tried to run `x test miri`, `x test rustdoc` and `x test miri` and nothing was rebuilt. r? `@onur-ozkan`
2025-01-28Rollup merge of #136178 - Noratrieb:alivename, r=pietroalbiniMatthias Krüger-2/+2
Update username in build helper example no typos have been made in the process of creating this pull request r? pietroalbini
2025-01-28Rollup merge of #136173 - taiki-e:c-char, r=tgross35Matthias Krüger-7/+9
Update comments and sort target_arch in c_char_definition Follow-up to https://github.com/rust-lang/rust/pull/132975. - Clang's wrong default on MSP430 has been fixed in https://github.com/llvm/llvm-project/pull/115964, and will be included in LLVM 20, which will be used soon. - Add a reference on Xtensa's default (from https://github.com/rust-lang/rust/pull/132975#issuecomment-2484645240). - Fix link for Windows's default. - Add a link to the discussion on L4Re (https://github.com/rust-lang/rust/pull/132975#issuecomment-2484645240) - Sort `target_arch`. (now match with `target_arch`s in comments) r? `@tgross35`
2025-01-28Rollup merge of #136149 - cuviper:rustc-rayon-indexmap, r=compiler-errorsMatthias Krüger-5/+5
Flip the `rustc-rayon`/`indexmap` dependency order [`rustc-rayon v0.5.1`](https://github.com/rust-lang/rustc-rayon/pull/14) added `indexmap` implementations that will allow `indexmap` to drop its own "internal-only" implementations. (This is separate from `indexmap`'s implementation for normal `rayon`.)
2025-01-28Rollup merge of #136124 - adetaylor:test-comment, r=compiler-errorsMatthias Krüger-1/+23
Arbitrary self types v2: explain test. The purpose of this test wasn't obvious, as ```@traviscross``` noted. Add a comment. Confession: although this test was added to demonstrate this particular corner-case, I can no longer reproduce the original problem, even if I adjust `rustc` to do the "wrong" thing. I have spent several hours trying to adjust the case to trigger the "faulty" behavior with no success. This test may therefore not be as useful as it originally was. But it still seems worthwhile retaining as a regression test that we don't break things in these quirky circumstances. Ideally we'd find a new test which tests this behavior but I've failed to come up with one. r? ```@traviscross```
2025-01-28Rollup merge of #136071 - wowinter13:clippy-add-diagnostic-items, r=flip1995Matthias Krüger-0/+4
[Clippy] Add vec_reserve & vecdeque_reserve diagnostic items I’m currently working on reviving this lint (https://github.com/rust-lang/rust-clippy/pull/10157), and there was [a comment](https://github.com/rust-lang/rust-clippy/pull/10157#discussion_r1091591057) from ``@flip1995`` regarding the necessity of adding new diagnostic items.
2025-01-28Rollup merge of #136066 - compiler-errors:local-spans, r=lcnrMatthias Krüger-20/+34
Pass spans to `perform_locally_in_new_solver` Nothing changes yet, but we may be able to use these spans in the future once we start dealing w the response region constraints better. r? lcnr
2025-01-28Rollup merge of #136055 - fee1-dead-contrib:push-ovmyztlkptmk, r=RalfJungMatthias Krüger-120/+348
Implement MIR const trait stability checks Addresses https://github.com/rust-lang/project-const-traits/issues/16 cc ``@rust-lang/project-const-traits`` r? ``@RalfJung``
2025-01-28Rollup merge of #135892 - BoxyUwU:next_solver_deduce_sig_normalized, r=lcnrMatthias Krüger-11/+135
-Znext-solver: "normalize" signature before checking it mentions self in `deduce_closure_signature` Fixes rust-lang/trait-system-refactor-initiative#138 r? ``@lcnr`` Tbh I wrote so much comments I don't feel like writing it all again but as a description.
2025-01-28Rollup merge of #135869 - hkBst:patch-12, r=NoratriebMatthias Krüger-1/+1
Make docs for AtomicUsize::from_mut platform-independent fixes #133342
2025-01-28Auto merge of #136185 - matthiaskrgr:rollup-zqzy6wb, r=matthiaskrgrbors-1993/+2374
Rollup of 8 pull requests Successful merges: - #133151 (Trim extra whitespace in fn ptr suggestion span) - #133829 (Implement `AtomicT::update` & `AtomicT::try_update`) - #135367 (Enable `unreachable_pub` lint in `alloc`) - #135748 (Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸) - #135805 (Add missing allocator safety in alloc crate) - #135886 (Document purpose of closure in from_fn.rs more clearly) - #135961 (Fix 2/4 tests skipped by opt-dist) - #136012 (Document powf and powi values that are always 1.0) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-28"normalize" signature before checking mentions selfBoxy-11/+135
2025-01-28Rollup merge of #136012 - hkBst:patch-22, r=workingjubilee,tgross35Matthias Krüger-6/+44
Document powf and powi values that are always 1.0 fixes bug #90429
2025-01-28Rollup merge of #135961 - saethlin:skip-less-in-opt-dist, r=jieyouxuMatthias Krüger-14/+11
Fix 2/4 tests skipped by opt-dist The linker errors were because this one test, strangely, wants itself compiled with `-Ctarget-features=+crt-static`, and yet it looks like the runner image is simply missing static libraries for libc and libm. Eyeballing the output of ``` rustc +nightly --target=x86_64-pc-windows-msvc -O tests/codegen/vec-shrink-panik.rs --emit=llvm-ir ``` suggests that vec-shrink-panik should pass on Windows. And it's quite disturbing that such a test would have failed only on Windows to start with. Exactly why that was would require some advanced digging, but it looks clean now.
2025-01-28Rollup merge of #135886 - hkBst:patch-14, r=workingjubileeMatthias Krüger-2/+2
Document purpose of closure in from_fn.rs more clearly partial fix for #135087 together with https://github.com/rust-lang/rust/pull/135895
2025-01-28Rollup merge of #135805 - DiuDiu777:master, r=NoratriebMatthias Krüger-2/+5
Add missing allocator safety in alloc crate ### PR Description In the previous PR [#135009](https://github.com/rust-lang/rust/pull/135009), PR [#134496](https://github.com/rust-lang/rust/pull/134496), some incomplete API documentation issues have been fixed. Based on these changes, other inconsistencies related to the allocator have also been identified, including: - `Box::from_non_null` - `Box::from_non_null_in` - `Weak::from_raw`
2025-01-28Rollup merge of #135748 - compiler-errors:len-2, r=RalfJung,oli-obkMatthias Krüger-1704/+1591
Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸 Change `Rvalue::RawRef` to take a `RawRefKind` instead of just a `Mutability`. Then introduce `RawRefKind::FakeForPtrMetadata` and use that for lowering index bounds checking to a `PtrMetadata`. This new `RawRefKind::FakeForPtrMetadata` acts like a shallow fake borrow in borrowck, which mimics the semantics of the old `Rvalue::Len` operation we're replacing. We can then use this `RawRefKind` instead of using a span desugaring hack in CTFE. cc ``@scottmcm`` ``@RalfJung``
2025-01-28Rollup merge of #135367 - Urgau:unreach_pub-std-3, r=NoratriebMatthias Krüger-210/+251
Enable `unreachable_pub` lint in `alloc` This PR enables the [`unreachable_pub`](https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub) lint as warn in the `alloc` crate. Most of changes are in the btree implementation and in tests. *The diff was mostly generated with `./x.py fix --stage 1 library/alloc/ -- --broken-code`, as well as manual edits for code in macros and in tests.* Continuation of #134286 and #135366 r? libs
2025-01-28Rollup merge of #133829 - GrigorenkoPV:fetch_update_infallible, r=NoratriebMatthias Krüger-3/+374
Implement `AtomicT::update` & `AtomicT::try_update` ACP accepted in https://github.com/rust-lang/libs-team/issues/490 ``@rustbot`` label +T-libs-api
2025-01-28Rollup merge of #133151 - tyrone-wu:trim-fn-ptr-whitespace, r=compiler-errorsMatthias Krüger-52/+96
Trim extra whitespace in fn ptr suggestion span Trim extra whitespace when suggesting removal of invalid qualifiers when parsing function pointer type. Fixes: #133083 --- I made a comment about the format of the diagnostic error message in https://github.com/rust-lang/rust/issues/133083#issuecomment-2480047875. I think the `.label` may be a little redundant if the diagnostic only highlights the bad qualifier instead of the entire `TyKind::BareFn` span. If it makes sense, I can include it in this PR.
2025-01-28Fix platform-specific doc string for AtomicUsize::from_mut to be ↵Marijn Schouten-1/+1
platform-independent
2025-01-28exclude some directories from `Lintcheck` CI (#14084)Philipp Krones-1/+7
Currently, the CI pipeline triggers `Lintcheck` for all PRs. However, this check takes significant amount of time and seems unnecessary for some certain directories that are frequently updated. r? flip1995 changelog: none
2025-01-28exclude specific directories from `Lintcheck`lapla-cogito-1/+7
2025-01-28Update username in build helper examplenora-2/+2
2025-01-28Auto merge of #133929 - saethlin:remove-inline-in-all-cgus, r=nnethercotebors-367/+187
Remove -Zinline-in-all-cgus and clean up tests/codegen-units/ Implementation of https://github.com/rust-lang/compiler-team/issues/814 I've taken some liberties with cleaning up the CGU partitioning tests, because that's the only place this flag was used and also mattered. I've often fought a lot with the contents of `tests/codegen-units` and it has never been clear to me when a test failure indicates a problem with my changes as opposed to a test just needing to be manually blessed. Hopefully the combination of the new README, new comments, and using `-Zprint-mono-items=lazy` in the partitioning tests improves that. I've also deleted some of the `tests/run-make/sepcomp` tests. I think all the "sepcomp" tests have been obviated for years by better-designed (less flaky, clearer failures) test suites, but here I'm just deleting the ones I'm confident in.
2025-01-28Add new lint `doc_overindented_list_items` (#13711)Catherine Flores-52/+219
Add a new lint `doc_overindented_list_items` to detect and fix list items in docs that are overindented. For example, ```rs /// - first line /// second line fn foo() {} ``` this would be fixed to: ```rs /// - first line /// second line fn foo() {} ``` This lint improves readabiliy and consistency in doc. --- - \[x] Followed [lint naming conventions][lint_naming] - \[x] Added passing UI tests (including committed `.stderr` file) - \[x] `cargo test` passes locally - \[x] Executed `cargo dev update_lints` - \[x] Added lint documentation - \[x] Run `cargo dev fmt` [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints changelog: [`doc_overindented_list_items`]: Added a new lint that detects overindented list items in docs fixes: #13601
2025-01-28Document powf and powi calls that always return 1.0Marijn Schouten-6/+44
2025-01-28Add new lint `doc_overindented_list_items`Yutaro Ohno-52/+219
Add a new lint `doc_overindented_list_items` to detect and fix list items in docs that are overindented. For example, ```rs /// - first line /// second line fn foo() {} ``` this would be fixed to: ```rs /// - first line /// second line fn foo() {} ``` This lint improves readabiliy and consistency in doc.
2025-01-28proper applicability for `obfuscated_if_else` (#14061)Catherine Flores-4/+30
fix #14034 The currect implementation of `obfuscated_if_else` sometimes makes incorrect suggestions when the original code have side effects (see the example in the above issue). I think this can be fixed by changing the applicability depending on whether it can have side effects or not. changelog: [`obfuscated_if_else`]: change applicability when the original code can have side effects
2025-01-28Auto merge of #134290 - tgross35:windows-i128-callconv, r=bjorn3,wesleywiserbors-57/+116
Windows x86: Change i128 to return via the vector ABI Clang and GCC both return `i128` in xmm0 on windows-msvc and windows-gnu. Currently, Rust returns the type on the stack. Add a calling convention adjustment so we also return scalar `i128`s using the vector ABI, which makes our `i128` compatible with C. In the future, Clang may change to return `i128` on the stack for its `-msvc` targets (more at [1]). If this happens, the change here will need to be adjusted to only affect MinGW. Link: https://github.com/rust-lang/rust/issues/134288 (does not fix) [1] try-job: x86_64-msvc try-job: x86_64-msvc-ext1 try-job: x86_64-mingw-1 try-job: x86_64-mingw-2