about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-02-04Update `compiler-builtins` to 0.1.145Trevor Gross-6/+6
This includes [1] which is required for LLVM 20. [1]: https://github.com/rust-lang/compiler-builtins/pull/752
2025-02-04Auto merge of #136525 - matthiaskrgr:rollup-m8kqlek, r=matthiaskrgrbors-420/+630
Rollup of 6 pull requests Successful merges: - #134807 (fix(rustdoc): always use a channel when linking to doc.rust-lang.org) - #134814 (Add `kl` and `widekl` target features, and the feature gate) - #135836 (bootstrap: only build `crt{begin,end}.o` when compiling to MUSL) - #136022 (Port ui/simd tests to use the intrinsic macro) - #136309 (set rustc dylib on manually constructed rustc command) - #136462 (mir_build: Simplify `lower_pattern_range_endpoint`) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-04Rollup merge of #136462 - Zalathar:endpoint, r=oli-obkMatthias Krüger-39/+42
mir_build: Simplify `lower_pattern_range_endpoint` By accumulating ascriptions and inline-consts in separate vectors, we can streamline some previously-tricky code for dealing with range patterns.
2025-02-04Rollup merge of #136309 - onur-ozkan:133629, r=jieyouxuMatthias Krüger-1/+5
set rustc dylib on manually constructed rustc command Fixes #133629
2025-02-04Rollup merge of #136022 - vayunbiyani:port_tests, r=RalfJungMatthias Krüger-348/+518
Port ui/simd tests to use the intrinsic macro
2025-02-04Rollup merge of #135836 - ferrocene:ja-gh135782-build-crt-only-for-musl, ↵Matthias Krüger-2/+8
r=onur-ozkan bootstrap: only build `crt{begin,end}.o` when compiling to MUSL only MUSL needs those objects and trying to compile them to other targets, e.g. Windows or macOS, will produce C compilation errors check the target before shelling out to the C compiler and tweak `make_run` to skip the actual C compilation when the target is not MUSL fixes #135782 see the linked issue for additional context
2025-02-04Rollup merge of #134814 - sayantn:keylocker, r=oli-obkMatthias Krüger-0/+26
Add `kl` and `widekl` target features, and the feature gate This is an effort towards #134813. This PR adds the target-features and the feature gate to `rustc` <!-- ```@rustbot``` label O-x86_64 O-x86_32 A-target-feature r? compiler -->
2025-02-04Rollup merge of #134807 - poliorcetics:ab/push-skpynvsmwkll, r=camelidMatthias Krüger-30/+31
fix(rustdoc): always use a channel when linking to doc.rust-lang.org Closes #131971 I manually checked the resulting links One issue is that this will create `nightly/...` links in places that formerly linked to stable, is that ok ? (the `slice` and `array` links in the search help notably)
2025-02-04Auto merge of #136507 - matthiaskrgr:rollup-uzwv9mo, r=matthiaskrgrbors-340/+622
Rollup of 8 pull requests Successful merges: - #136289 (OnceCell & OnceLock docs: Using (un)initialized consistently) - #136299 (Ignore NLL boring locals in polonius diagnostics) - #136411 (Omit argument names from function pointers that do not have argument names) - #136430 (Use the type-level constant value `ty::Value` where needed) - #136476 (Remove generic `//@ ignore-{wasm,wasm32,emscripten}` in tests) - #136484 (Notes on types/traits used for in-memory query caching) - #136493 (platform-support: document CPU baseline for x86-32 targets) - #136498 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-03Auto merge of #136483 - marcoieni:dist-x86_64-msvc-windows-25, r=Kobzolbors-1/+1
ci: move dist-x86_64-msvc to windows 2025 try-job: dist-x86_64-msvc
2025-02-03Rollup merge of #136498 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 2 commits in fa312a343fbff01bc6cef393e326817f70719813..e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45 2025-02-03 15:02:07 UTC to 2025-02-01 17:33:39 UTC - Add missing word in ch17-04-streams.md (rust-lang/book#4218) - Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216) ## rust-lang/edition-guide 2 commits in 4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda..f56aecc3b036dff16404b525a83b00f911b9bbea 2025-02-03 17:14:16 UTC to 2025-01-31 17:44:00 UTC - Rustc{En,De}codable has been removed (rust-lang/edition-guide#353) - Remove rustfmt-overflow-delimited-expr (rust-lang/edition-guide#357) ## rust-lang/nomicon 3 commits in bc2298865544695c63454fc1f9f98a3dc22e9948..336f75835a6c0514852cc65aba9a698b699b13c8 2025-02-02 10:06:30 UTC to 2025-02-02 08:35:20 UTC - Improve grammar in exotic-sizes (rust-lang/nomicon#452) - other-reprs: Add details for n!=1 repr(packed) (rust-lang/nomicon#460) - Use `()` instead of `[u8; 0]` in opaque type (rust-lang/nomicon#456) ## rust-lang/reference 3 commits in 93b921c7d3213d38d920f7f905a3bec093d2217d..4249fb411dd27f945e2881eb0378044b94cee06f 2025-01-31 03:43:07 UTC to 2025-01-29 04:17:34 UTC - Add Spec Identifier Syntax to expressions.md and subchapters (rust-lang/reference#1591) - Exclude the test summary from the search index (rust-lang/reference#1723) - Spec inline assembly tests (rust-lang/reference#1648) ## rust-lang/rust-by-example 1 commits in 054259ed1bf01cdee4309ee764c7e103f6df3de5..743766929f1e53e72fab74394ae259bbfb4a7619 2025-02-02 19:53:31 UTC to 2025-02-02 19:53:31 UTC - Spanish translation to 1:2100 (rust-lang/rust-by-example#1910)
2025-02-03Rollup merge of #136493 - RalfJung:x86-platform-support, r=NoratriebMatthias Krüger-20/+20
platform-support: document CPU baseline for x86-32 targets Also fixes the footnote for i686-unknown-hurd-gnu (which has the bad case of the x87 issue since it uses a non-SSE baseline) and adds the missing footnote for i686-unknown-redox. Both of those targets break our usual pattern by not using the Pentium 4 baseline, but fixing that is a much larger change that I will not pursue (see [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/x86-32.20target.20names)). Cc ``@bjorn3``
2025-02-03Rollup merge of #136484 - Zalathar:query-cache-notes, r=jieyouxuMatthias Krüger-5/+42
Notes on types/traits used for in-memory query caching When the word "cache" appears in the context of the query system, it often isn't obvious whether that is referring to the in-memory query cache or the on-disk incremental cache. For these types, we can assure the reader that they are for in-memory caching.
2025-02-03Rollup merge of #136476 - jieyouxu:panic-panic-panic, r=lcnrMatthias Krüger-19/+7
Remove generic `//@ ignore-{wasm,wasm32,emscripten}` in tests Follow-up to #135926. In favor of capability-based guards `//@ needs-{unwind,subprocess}`. Resolves #135923. r? ``@ghost`` try-job: test-various
2025-02-03Rollup merge of #136430 - FedericoBruzzone:follow-up-136180, r=oli-obkMatthias Krüger-78/+79
Use the type-level constant value `ty::Value` where needed **Follow-up to #136180** ### Summary This PR refactors functions to accept a single type-level constant value `ty::Value` instead of separate `ty::ValTree` and `ty::Ty` parameters: - `valtree_to_const_value`: now takes `ty::Value` - `pretty_print_const_valtree`: now takes `ty::Value` - Uses `pretty_print_const_valtree` for formatting valtrees when `visit_const_operand` - Moves `try_to_raw_bytes` from `ty::Valtree` to `ty::Value` --- r? ``@lukas-code`` ``@oli-obk``
2025-02-03Rollup merge of #136411 - dtolnay:fnptr, r=notriddleMatthias Krüger-12/+34
Omit argument names from function pointers that do not have argument names This matches the style used for the vast majority of function pointer types in real-world code, in my experience. Prefixing `_: ` to every argument does not improve clarity. **Before:** <img src="https://github.com/user-attachments/assets/f07efa8b-d57e-4897-aa97-40db7d207862"> **After:** <img src="https://github.com/user-attachments/assets/8405e08b-d6d2-4904-bcc3-a3eb866cecf0">
2025-02-03Rollup merge of #136299 - lqd:polonius-next-episode-9, r=jackh726Matthias Krüger-152/+376
Ignore NLL boring locals in polonius diagnostics Another easy one ``@jackh726`` (the diff is inflated by blessed test expectations don't worry :) NLLs don't compute liveness for boring locals, and therefore cannot find them in causes explaining borrows. In polonius, we don't have this liveness optimization (we may be able to do something partially similar in the future, e.g. for function parameters and the like), so we do encounter these in diagnostics even though we don't want to. This PR: - restructures the polonius context into per-phase data, in spirit as you requested in an earlier review - stores the locals NLLs would consider boring into the errors/diagnostics data - ignores these if a boring local is found when trying to explain borrows This PR fixes around 80 cases of diagnostics differences between `-Zpolonius=next` and NLLs. I've also added explicit revisions to a few polonius tests (both for the in-tree implementation as well as the datalog implementation -- even if we'll eventually remove them). I didn't do this for all the "dead" expectations that were removed from #136112 for that same reason, it's fine. I'll soon/eventually add explicit revisions where they're needed: there's only a handful of tests left to fix. r? ``@jackh726``
2025-02-03Rollup merge of #136289 - Pyr0de:oncecell-docs, r=tgross35Matthias Krüger-54/+64
OnceCell & OnceLock docs: Using (un)initialized consistently Changed * `set` / `initialize` / `full` to `initialized state` * `uninitialize` / `empty` to `uninitialized state` * `f` to `f()` * Added explaination of `uninitialized state` & `initialized state` [OnceCell Docs](https://doc.rust-lang.org/nightly/std/cell/struct.OnceCell.html) [OnceLock Docs](https://doc.rust-lang.org/nightly/std/sync/struct.OnceLock.html) Fixes #85716 ``@rustbot`` label +A-docs
2025-02-03Auto merge of #136146 - RalfJung:x86-abi, r=workingjubileebors-60/+161
Explicitly choose x86 softfloat/hardfloat ABI Part of https://github.com/rust-lang/rust/pull/135408: Instead of choosing this based on the target features listed in the target spec, make that choice explicit. All built-in targets are being updated here; custom (JSON-defined) x86 (32bit and 64bit) softfloat targets need to explicitly set `rustc-abi` to `x86-softfloat`.
2025-02-03platform-support: document CPU baseline for x86-32 targetsRalf Jung-20/+20
2025-02-03Move `try_to_raw_bytes` from `ty::Valtree` to `ty::Value`FedericoBruzzone-38/+36
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-02-03Update booksrustbot-0/+0
2025-02-03Auto merge of #136481 - jieyouxu:rollup-w0lnnqb, r=jieyouxubors-143/+251
Rollup of 8 pull requests Successful merges: - #136356 (Docs for f16 and f128: correct a typo and add details) - #136404 (Remove a footgun-y feature / relic of the past from the compiletest DSL) - #136432 (LTA: Actually check where-clauses for well-formedness at the def site) - #136438 (miri: improve error when offset_from preconditions are violated) - #136441 ([`compiletest`-related cleanups 1/7] Cleanup `is_rustdoc` logic and remove a useless path join in rustdoc-json runtest logic) - #136455 (Remove some `Clone` bounds and derives.) - #136464 (Remove hook calling via `TyCtxtAt`.) - #136467 (override default config profile on tarballs) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-03patch RfL jobRalf Jung-2/+2
2025-02-03add rustc_abi to control ABI decisions LLVM does not have flags for, and use ↵Ralf Jung-58/+159
it for x86 softfloat
2025-02-03platform-support docs: fix x87 errata footnotesRalf Jung-5/+5
2025-02-03tests: remove redundant `//@ ignore-{wasm,wasm32,emscripten}`许杰友 Jieyou Xu (Joe)-19/+7
2025-02-03Auto merge of #136352 - lqd:ensure-stacks, r=compiler-errorsbors-6/+12
Add a couple of missing `ensure_sufficient_stacks` r? `@saethlin` I hope you didn't spend time on this already. (I couldn't sleep, opened `check_tail_calls`, there was a single call where it could happen, might as well fix it) This PR adds a couple of missing `ensure_sufficient_stack`s: - one in `check_tail_calls` that prevented the #135709 backport on some targets. - after that was fixed, the test still didn't pass starting at 4MB, so I also added one in `check_unsafety` and that made it pass. I didn't add an `rmake` test purposefully limiting the min stack size on `issue-74564-if-expr-stack-overflow.rs`, but we could if we wanted to. On `apple-aarch64-darwin`, this is enough to make `RUST_MIN_STACK=$((1024*1024*3)) ./x test tests/ui --test-args tests/ui/issues/issue-74564-if-expr-stack-overflow.rs` pass for me locally, and it does stack overflow otherwise.
2025-02-03Refactor using the type-level constant value `ty::Value`FedericoBruzzone-59/+62
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-02-03OnceCell & OnceLock docs: Using (un)initialized consistentlyPyrode-54/+64
2025-02-03Notes on types/traits used for in-memory query cachingZalathar-5/+42
When the word "cache" appears in the context of the query system, it often isn't obvious whether that is referring to the in-memory query cache or the on-disk incremental cache. For these types, we can assure the reader that they are for in-memory caching.
2025-02-03ci: move dist-x86_64-msvc to windows 2025MarcoIeni-1/+1
2025-02-03Rollup merge of #136467 - onur-ozkan:override-default-profile-on-tarballs, ↵许杰友 Jieyou Xu (Joe)-1/+8
r=jieyouxu override default config profile on tarballs This is the same logic used in the Python script https://github.com/rust-lang/rust/blob/613bdd49978298648ed05ace086bd1ecad54b44a/src/bootstrap/bootstrap.py#L1273-L1274
2025-02-03Rollup merge of #136464 - nnethercote:rm-TyCtxtAt-for-hooks, r=oli-obk许杰友 Jieyou Xu (Joe)-38/+21
Remove hook calling via `TyCtxtAt`. All hooks receive a `TyCtxtAt` argument. Currently hooks can be called through `TyCtxtAt` or `TyCtxt`. In the latter case, a `TyCtxtAt` is constructed with a dummy span and passed to the hook. However, in practice hooks are never called through `TyCtxtAt`, and always receive a dummy span. (I confirmed this via code inspection, and double-checked it by temporarily making the `TyCtxtAt` code path panic and running all the tests.) This commit removes all the `TyCtxtAt` machinery for hooks. All hooks now receive `TyCtxt` instead of `TyCtxtAt`. There are two existing hooks that use `TyCtxtAt::span`: `const_caller_location_provider` and `try_destructure_mir_constant_for_user_output`. For both hooks the span is always a dummy span, probably unintentionally. This dummy span use is now explicit. If a non-dummy span is needed for these two hooks it would be easy to add it as an extra argument because hooks are less constrained than queries. r? `@oli-obk`
2025-02-03Rollup merge of #136455 - nnethercote:less-Clone, r=compiler-errors许杰友 Jieyou Xu (Joe)-24/+24
Remove some `Clone` bounds and derives. r? `@cjgillot`
2025-02-03Rollup merge of #136441 - jieyouxu:cleanup-is-rustdoc, r=compiler-errors许杰友 Jieyou Xu (Joe)-5/+2
[`compiletest`-related cleanups 1/7] Cleanup `is_rustdoc` logic and remove a useless path join in rustdoc-json runtest logic Reference for overall changes: https://github.com/rust-lang/rust/pull/136437 Part **1** of **7** of the *`compiletest`-related cleanups* PR series. ### Summary - Don't match on path when we already have test suite names. - Remove a useless path join. r? bootstrap (or compiler)
2025-02-03Rollup merge of #136438 - RalfJung:offset_from_ub_errors, r=oli-obk许杰友 Jieyou Xu (Joe)-19/+81
miri: improve error when offset_from preconditions are violated Fixes https://github.com/rust-lang/miri/issues/4143
2025-02-03Rollup merge of #136432 - fmease:lta-fix-def-site-checks, r=compiler-errors许杰友 Jieyou Xu (Joe)-11/+78
LTA: Actually check where-clauses for well-formedness at the def site All of the added tests used to wrongfully pass. r? oli-obk or types/compiler or reassign
2025-02-03Rollup merge of #136404 - fmease:rm-compiletest-relic-of-the-past, ↵许杰友 Jieyou Xu (Joe)-38/+30
r=Noratrieb,jieyouxu Remove a footgun-y feature / relic of the past from the compiletest DSL The compiletest DSL still features a historical remnant from the time when its directives were merely prefixed with `//` instead of `//`@`` when unknown directive names weren't rejected since they could just as well be part of prose: As an "optimization", it stops looking for directives once it stumbles upon a line which starts with either `fn` or `mod`. This is super footgun-y as it obviously leads to any seeming compiletest directives below `fn` and `mod` items getting completely ignored. See #136403 for a practical example. As well the assembly test updated in this PR. ~~Blocked on #136403.~~ (merged)
2025-02-03Rollup merge of #136356 - pthariensflame:patch-1, r=tgross35许杰友 Jieyou Xu (Joe)-7/+7
Docs for f16 and f128: correct a typo and add details CC: #116909; corrects and expands #124750.
2025-02-03Auto merge of #136413 - EnzymeAD:fix-autodiff-comptime-regression, r=oli-obkbors-10/+10
fix autodiff compile time regression Tries to fix the regression from https://github.com/rust-lang/rust/pull/133429 Tracking: - https://github.com/rust-lang/rust/issues/124509
2025-02-03Auto merge of #133138 - azhogin:azhogin/target-modifiers, r=davidtwco,saethlinbors-24/+666
Target modifiers (special marked options) are recorded in metainfo Target modifiers (special marked options) are recorded in metainfo and compared to be equal in different linked crates. PR for this RFC: https://github.com/rust-lang/rfcs/pull/3716 Option may be marked as `TARGET_MODIFIER`, example: `regparm: Option<u32> = (None, parse_opt_number, [TRACKED TARGET_MODIFIER]`. If an TARGET_MODIFIER-marked option has non-default value, it will be recorded in crate metainfo as a `Vec<TargetModifier>`: ``` pub struct TargetModifier { pub opt: OptionsTargetModifiers, pub value_name: String, } ``` OptionsTargetModifiers is a macro-generated enum. Option value code (for comparison) is generated using `Debug` trait. Error example: ``` error: mixing `-Zregparm` will cause an ABI mismatch in crate `incompatible_regparm` --> $DIR/incompatible_regparm.rs:10:1 | LL | #![crate_type = "lib"] | ^ | = help: the `-Zregparm` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely = note: `-Zregparm=1` in this crate is incompatible with `-Zregparm=2` in dependency `wrong_regparm` = help: set `-Zregparm=2` in this crate or `-Zregparm=1` in `wrong_regparm` = help: if you are sure this will not cause problems, use `-Cunsafe-allow-abi-mismatch=regparm` to silence this error error: aborting due to 1 previous error ``` `-Cunsafe-allow-abi-mismatch=regparm,reg-struct-return` to disable list of flags.
2025-02-03override default config profile on tarballsonur-ozkan-1/+8
This is the same logic used in the Python script https://github.com/rust-lang/rust/blob/613bdd49978298648ed05ace086bd1ecad54b44a/src/bootstrap/bootstrap.py#L1273-L1274 Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-03Remove hook calling via `TyCtxtAt`.Nicholas Nethercote-38/+21
All hooks receive a `TyCtxtAt` argument. Currently hooks can be called through `TyCtxtAt` or `TyCtxt`. In the latter case, a `TyCtxtAt` is constructed with a dummy span and passed to the hook. However, in practice hooks are never called through `TyCtxtAt`, and always receive a dummy span. (I confirmed this via code inspection, and double-checked it by temporarily making the `TyCtxtAt` code path panic and running all the tests.) This commit removes all the `TyCtxtAt` machinery for hooks. All hooks now receive `TyCtxt` instead of `TyCtxtAt`. There are two existing hooks that use `TyCtxtAt::span`: `const_caller_location_provider` and `try_destructure_mir_constant_for_user_output`. For both hooks the span is always a dummy span, probably unintentionally. This dummy span use is now explicit. If a non-dummy span is needed for these two hooks it would be easy to add it as an extra argument because hooks are less constrained than queries.
2025-02-03Remove a footgun-y feature / relic of the past from the compiletest DSLLeón Orell Valerian Liehr-38/+30
2025-02-03Simplify the pattern unpeeling in `lower_pattern_range_endpoint`Zalathar-26/+25
2025-02-03Return range endpoint ascriptions/consts via a `&mut Vec`Zalathar-12/+19
2025-02-02Docs for f16 and f128: correct a typo and add detailsLaine Taffin Altman-7/+7
2025-02-03LTA: Check where-clauses for well-formedness at the def siteLeón Orell Valerian Liehr-11/+78
2025-02-03Flatten the option check in `lower_pattern_range_endpoint`Zalathar-31/+28