about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-01-05Update tidybjorn3-6/+3
2025-01-05Merge commit '918acafef682d0d0ca30b47de4768210417ff362' into ↵bjorn3-249/+120
sync_cg_clif-2025-01-05
2025-01-05Fix rustc test suitebjorn3-0/+2
2025-01-05Rustup to rustc 1.86.0-nightly (1891c2866 2025-01-04)bjorn3-1/+1
2025-01-05Sync from rust 1891c28669863bf7ed3ef8f43f2d3fa546f34861bjorn3-2/+2
2025-01-05Auto merge of #135109 - rust-lang:cargo_update, r=tgross35bors-53/+55
Weekly `cargo update` Automation to keep dependencies in `Cargo.lock` current. The following is the output from `cargo update`: ```txt compiler & tools dependencies: Locking 4 packages to latest compatible versions Updating bstr v1.11.1 -> v1.11.3 Updating spdx v0.10.7 -> v0.10.8 Updating syn v2.0.93 -> v2.0.94 Updating tempfile v3.14.0 -> v3.15.0 note: pass `--verbose` to see 35 unchanged dependencies behind latest library dependencies: Locking 0 packages to latest compatible versions note: pass `--verbose` to see 3 unchanged dependencies behind latest rustbook dependencies: Locking 5 packages to latest compatible versions Updating bstr v1.11.1 -> v1.11.3 Updating cc v1.2.6 -> v1.2.7 Updating syn v2.0.93 -> v2.0.94 Updating tempfile v3.14.0 -> v3.15.0 Updating winnow v0.6.20 -> v0.6.22 ```
2025-01-05Auto merge of #135074 - wzssyqa:mips-mti, r=oli-obkbors-4/+120
Target: Add mips mti baremetal support Do the same thing as gcc, which use the vendor `mti` to mark the toolchain as MIPS32r2 default. We support both big endian and little endian flavor: mips-mti-none-elf mipsel-mti-none-elf
2025-01-05Update src/doc/rustc/src/platform-support/mips-mti-none-elf.mdYunQiang Su-1/+1
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2025-01-05fix testsYunQiang Su-3/+3
2025-01-05Auto merge of #135113 - workingjubilee:rollup-yy6nxel, r=workingjubileebors-59/+149
Rollup of 4 pull requests Successful merges: - #134925 (deny usage of special FileCheck prefixes as revision names) - #134996 (Add UWP (msvc) target support page) - #135104 (do not in-place-iterate over flatmap/flatten) - #135110 (library: fix adler{ -> 2}.debug) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-04Rollup merge of #135110 - matthiaskrgr:adler, r=workingjubileeJubilee-1/+1
library: fix adler{ -> 2}.debug Fixes ``` Checking stage0 library artifacts {alloc, core, panic_abort, panic_unwind, proc_macro, std, sysroot, test, unwind} (x86_64-unknown-linux-gnu) warning: profile package spec `adler` in profile `release` did not match any packages Did you mean `adler2`? ``` r? `@bjorn3`
2025-01-04Rollup merge of #135104 - the8472:disable-in-place-iter-for-flatten, ↵Jubilee-51/+22
r=Mark-Simulacrum do not in-place-iterate over flatmap/flatten The implementation is unsound when a partially consumed iterator has some elements buffered in the front/back parts and cloning the Iterator removes the capacity from the backing vec::IntoIter. This is a fix for #135103 that removes the specialization trait impls without removing some supporting parts. I've kept it small so it can be easily backported. I'll either remove the remaining parts or think of a way to recover the optimization in a separate PR.
2025-01-04Rollup merge of #134996 - bdbai:uwp-support, r=jieyouxu,ChrisDentonJubilee-7/+61
Add UWP (msvc) target support page - Added Platform Support page for `x86_64-uwp-windows-msvc`, `i686-uwp-windows-msvc`, `thumbv7a-uwp-windows-msvc` and `aarch64-uwp-windows-msvc` - Adding myself as a maintainer - Removing the ticks for `thumbv7a-pc-windows-msvc` and `thumbv7a-uwp-windows-msvc` as they do not currently build due to #134565 and https://github.com/rust-lang/backtrace-rs/pull/685 - Fixed a few minor issues to let most of the UWP targets compile - Happy new year to all! r? jieyouxu
2025-01-04Rollup merge of #134925 - DavisRayM:130982-deny-special-filecheck-prefixes, ↵Jubilee-0/+65
r=jieyouxu deny usage of special FileCheck prefixes as revision names Adds a check that ensures special FileCheck prefixes are not used as revision names. Fix #130982
2025-01-05library: fix adler{-> 2}.debugMatthias Krüger-1/+1
Fixes ``` Checking stage0 library artifacts {alloc, core, panic_abort, panic_unwind, proc_macro, std, sysroot, test, unwind} (x86_64-unknown-linux-gnu) warning: profile package spec `adler` in profile `release` did not match any packages Did you mean `adler2`? ```
2025-01-05cargo updategithub-actions-53/+55
compiler & tools dependencies: Locking 4 packages to latest compatible versions Updating bstr v1.11.1 -> v1.11.3 Updating spdx v0.10.7 -> v0.10.8 Updating syn v2.0.93 -> v2.0.94 Updating tempfile v3.14.0 -> v3.15.0 note: pass `--verbose` to see 35 unchanged dependencies behind latest library dependencies: Locking 0 packages to latest compatible versions note: pass `--verbose` to see 3 unchanged dependencies behind latest rustbook dependencies: Locking 5 packages to latest compatible versions Updating bstr v1.11.1 -> v1.11.3 Updating cc v1.2.6 -> v1.2.7 Updating syn v2.0.93 -> v2.0.94 Updating tempfile v3.14.0 -> v3.15.0 Updating winnow v0.6.20 -> v0.6.22
2025-01-04Auto merge of #133990 - Walnut356:static_const, r=workingjubileebors-17/+50
[Debuginfo] Force enum `DISCR_*` to `static const u64` to allow for inspection via LLDB see [here](https://rust-lang.zulipchat.com/#narrow/channel/317568-t-compiler.2Fwg-debugging/topic/Revamping.20Debuginfo/near/486614878) for more info. This change mainly helps `*-msvc` debugged with LLDB. Currently, LLDB cannot inspect `static` struct fields, so the intended visualization for enums is only borderline functional, and niche enums with ranges of discriminant cannot be determined at all . LLDB *can* inspect `static const` values (though for whatever reason, non-enum/non-u64 consts don't work). This change adds the `LLVMRustDIBuilderCreateQualifiedType` to the rust FFI layer to wrap the discr type with a `const` modifier, as well as forcing all generated integer enum `DISCR_*` values to be u64's. Those values will only ever be used by debugger visualizers anyway, so it shouldn't be a huge deal, but I left a fixme comment for it just in case.. The `tag` also still properly reflects the discriminant type, so no information is lost.
2025-01-04Auto merge of #135101 - workingjubilee:rollup-owp3czl, r=workingjubileebors-234/+401
Rollup of 6 pull requests Successful merges: - #135046 (turn rustc_box into an intrinsic) - #135061 (crashes: add latest batch of tests) - #135070 (std: sync to dep versions of backtrace) - #135088 (Force code generation in assembly generation smoke-tests) - #135091 (Bump backtrace to 0.3.75) - #135094 (bootstrap: If dir_is_empty fails, show the non-existent directory path) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-04add regression test for unsound Flatten/FlatMap specializationThe 8472-0/+14
2025-01-04do not in-place-iterate over flatmap/flattenThe 8472-51/+8
The implementation is unsound when a partially consumed iterator has some elements buffered in the front/back parts and cloning the Iterator removes the capacity from the backing vec::IntoIter.
2025-01-04Auto merge of #135096 - jieyouxu:fix-doc-submodule-handling, r=onur-ozkanbors-15/+23
bootstrap: correctly handle doc paths within submodules Fixes #135041 by passing the correct submodule path when requiring submodules. This PR changes `is_path_in_submodule` to `submodule_path_of`. `submodule_path_of` returns the path of the containing submodule when given a path nested inside a submodule we handle, and `None` otherwise. I tested this manually locally by unregistering the `src/tools/cargo` submodule, then running `./x doc src/tools/cargo/src/doc`. This command fails on master with ``` thread 'main' panicked at src/bootstrap/src/utils/helpers.rs:441:5: std::fs::read_dir(dir) failed with No such file or directory (os error 2) ``` since the require submodule fails as `src/tools/cargo/src/doc` is not a known submodule. Now we use the submodule path if such a nested-in-submodule-path is passed, and thus running this command with cargo submodule unregistered still succeeds: ``` Rustbook (x86_64-unknown-linux-gnu) - cargo Doc path: /home/joe/repos/rust/build/x86_64-unknown-linux-gnu/doc/cargo/index.html Build completed successfully in 0:00:11 ``` r? `@onur-ozkan`
2025-01-04Rollup merge of #135094 - joshtriplett:bootstrap-show-nonexistent-dir, ↵Jubilee-1/+1
r=jieyouxu bootstrap: If dir_is_empty fails, show the non-existent directory path This should help when trying to debug issues.
2025-01-04Rollup merge of #135091 - workingjubilee:backtrace-0.3.75, r=workingjubileeJubilee-0/+0
Bump backtrace to 0.3.75 I prefer when we can ship the same version of backtrace on crates.io, and this will be the next published version. Compare: https://github.com/rust-lang/backtrace-rs/compare/4d7906b...0.3.75 Mostly internal-to-backtrace changes, plus a tiny code size win. r? `@ghost`
2025-01-04Rollup merge of #135088 - maurer:force-asm, r=nikicJubilee-0/+4
Force code generation in assembly generation smoke-tests In llvm/llvm-project@7b23f413d1f76532825e470b523e971818d453ca , `.text` started being suppressed from LLVM assembly in cases where it wasn't strictly necessary. Currently, the sample functions in these two tests are frequently decided to be IR-only functions, resulting in no code generation, so LLVM drops the `.text` directive. Adding `#[no_mangle]` forces these tests back to their original intent - assembly code is generated, and so a `.text` directive is generated as well. `@rustbot` label: +llvm-main r? `@workingjubilee` I'll attach a buildbot link once it finishes consuming this PR
2025-01-04Rollup merge of #135070 - klensy:backtrace-deps, r=workingjubileeJubilee-25/+14
std: sync to dep versions of backtrace Minor versions from backtrace desynced with std (they still differs in patch numbers, but still better): https://github.com/rust-lang/backtrace-rs/blob/4d7906bb24ae91ee6587127020d360f5298f9e7e/Cargo.toml#L44-L48 There is hidden bug here, let's see if CI can find it. cc `@workingjubilee`
2025-01-04Rollup merge of #135061 - matthiaskrgr:crashes_jan, r=lqdJubilee-0/+184
crashes: add latest batch of tests try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
2025-01-04Rollup merge of #135046 - RalfJung:rustc_box_intrinsic, r=compiler-errorsJubilee-208/+198
turn rustc_box into an intrinsic I am not entirely sure why this was made a special magic attribute, but an intrinsic seems like a more natural way to add magic expressions to the language.
2025-01-04Auto merge of #133955 - bjorn3:cc_pass_arch_only, r=ChrisDentonbors-8/+3
Pass the arch rather than full target name to windows_registry::find_tool The full target name can be anything with custom target specs. Passing just the arch wasn't possible before cc 1.2, but is now thanks to https://github.com/rust-lang/cc-rs/pull/1285. try-job: i686-msvc
2025-01-04bootstrap: make `is_path_in_submodule` return optional submodule path instead许杰友 Jieyou Xu (Joe)-15/+23
2025-01-04crashes: add latest batch of testsMatthias Krüger-0/+184
2025-01-04Auto merge of #135031 - RalfJung:intrinsics-without-body, r=oli-obkbors-175/+272
rustc_intrinsic: support functions without body We synthesize a HIR body `loop {}` but such bodyless intrinsics. Most of the diff is due to turning `ItemKind::Fn` into a brace (named-field) enum variant, because it carries a `bool`-typed field now. This is to remember whether the function has a body. MIR building panics to avoid ever translating the fake `loop {}` body, and the intrinsic logic uses the lack of a body to implicitly mark that intrinsic as must-be-overridden. I first tried actually having no body rather than generating the fake body, but there's a *lot* of code that assumes that all function items have HIR and MIR, so this didn't work very well. Then I noticed that even `rustc_intrinsic_must_be_overridden` intrinsics have MIR generated (they are filled with an `Unreachable` terminator) so I guess I am not the first to discover this. ;) r? `@oli-obk`
2025-01-04rustc_intrinsic: support functions without body; they are implicitly marked ↵Ralf Jung-68/+118
as must-be-overridden
2025-01-04turn hir::ItemKind::Fn into a named-field variantRalf Jung-111/+158
2025-01-04Auto merge of #135095 - matthiaskrgr:rollup-tmgxckq, r=matthiaskrgrbors-86/+270
Rollup of 7 pull requests Successful merges: - #133964 (core: implement `bool::select_unpredictable`) - #135001 (Allow using self-contained LLD in bootstrap) - #135055 (Report impl method has stricter requirements even when RPITIT inference gets in the way) - #135064 (const-in-pattern: test that the PartialEq impl does not need to be const) - #135066 (bootstrap: support `./x check run-make-support`) - #135069 (remove unused function params) - #135084 (Update carrying_mul_add test to tolerate `nuw`) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-04Rollup merge of #135084 - maurer:nuw, r=nikicMatthias Krüger-2/+2
Update carrying_mul_add test to tolerate `nuw` LLVM 20 adds nuw to GEP operations in this code, tolerate them. `@rustbot` label: +llvm-main r? `@durin42`
2025-01-04Rollup merge of #135069 - matthiaskrgr:param_rec_usage, r=jieyouxuMatthias Krüger-25/+14
remove unused function params
2025-01-04Rollup merge of #135066 - jieyouxu:check-run-make-support, r=clubby789Matthias Krüger-0/+6
bootstrap: support `./x check run-make-support` Mostly for working on `src/tools/run-make-support` locally.
2025-01-04Rollup merge of #135064 - RalfJung:const-in-pat-partial-eq-not-const, ↵Matthias Krüger-0/+58
r=compiler-errors const-in-pattern: test that the PartialEq impl does not need to be const Fixes https://github.com/rust-lang/rust/issues/119398 by adding a test. `@compiler-errors` is there some place in the code where we could add a comment saying "as a backcompat hack, here we only require `PartialEq` and not `const PartialEq`"? r? `@compiler-errors`
2025-01-04Rollup merge of #135055 - compiler-errors:rpitit-infer-in-stricter-impl, ↵Matthias Krüger-54/+90
r=estebank Report impl method has stricter requirements even when RPITIT inference gets in the way See the comment I added in the code. Fixes #122506.
2025-01-04Rollup merge of #135001 - Kobzol:bootstrap-mcp-510, r=onur-ozkanMatthias Krüger-2/+14
Allow using self-contained LLD in bootstrap In https://github.com/rust-lang/rust/pull/116278, I added a `"self-contained"` mode to the `rust.use-lld` bootstrap option, which was designed for using the built-in LLD for linking compiler artifacts. However, this was later reverted in https://github.com/rust-lang/rust/pull/118810. This PR brings the old logic back, which switches LLD in bootstrap from `-fuse-ld=lld` to [MCP510](https://github.com/rust-lang/compiler-team/issues/510)'s way of passing linker flags to enable LLD (both external and self-contained). So this does two changes: 1) Goes from `-fuse-ld=lld` to MCP510 2) Actually makes it possible to use the self-contained LLD to compile compiler artifacts Regarding the second commit: Since https://github.com/rust-lang/rust/pull/86113, we have been passing `-fuse-ld=lld` as a target flag to all tests when `use-lld = true` is enabled. This kind of worked for all tests, since it was just a linker argument, which has bypassed any compiler checks, and probably resulted only in some warning if the given target linker didn't actually support LLD. However, after the first commit, some tests actually start failing with this approach: ``` error: linker flavor `gnu-lld-cc` is incompatible with the current target | = note: compatible flavors are: llbc, ptx ``` So the second commit removes the passing of LLD flags as target flags to tests. I don't think that it's a good idea to pass specific compiler flags to all tests unconditionally, tbh. The doctest command from #86113 doesn't go through compiletest anymore, and doctests should be quite a lot faster since https://github.com/rust-lang/rust/pull/126245 in general. CC `@the8472` If someone has a beefy machine, it would be nice to test whether this doesn't regress test execution speed. How to do that: 1) Enable `rust.use-lld = true` and `rust.lld = true` in `config.toml` 2) Benchmark `./x test tests/ui --force-rerun` between `master` and this PR Once this is tested in the wild, I would like to make the self-contained LLD the default in CI, hopefully to make CI builds faster. r? `@onur-ozkan`
2025-01-04Rollup merge of #133964 - joboet:select_unpredictable, r=tgross35Matthias Krüger-3/+86
core: implement `bool::select_unpredictable` Tracking issue: #133962 ACP: https://github.com/rust-lang/libs-team/issues/468
2025-01-04bootstrap: If dir_is_empty fails, show the non-existent directory pathJosh Triplett-1/+1
This should help when trying to debug issues.
2025-01-04Auto merge of #135067 - ChrisDenton:cc, r=jieyouxubors-4/+4
Bump cc in the compiler Changelog: - Regenerate target info ([#1342](https://github.com/rust-lang/cc-rs/pull/1342)) - Allow using Visual Studio target names in `find_tool` ([#1335](https://github.com/rust-lang/cc-rs/pull/1335)) - Fix `is_flag_supported` on msvc ([#1336](https://github.com/rust-lang/cc-rs/pull/1336))
2025-01-04Auto merge of #135057 - compiler-errors:project-unconstrained, r=oli-obkbors-304/+269
Project to `TyKind::Error` when there are unconstrained non-lifetime (ty/const) impl params It splits the `enforce_impl_params_are_constrained` function into lifetime/non-lifetime, and queryfies the latter. We can then use the result of the latter query (`Result<(), ErrorGuaranteed>`) to intercept projection and constrain the projected type to `TyKind::Error`, which ensures that we leak no ty or const vars to places that don't expect them, like `normalize_erasing_regions`. The reason we split `enforce_impl_params_are_constrained` into two parts is because we only error for *lifetimes* if the lifetime ends up showing up in any of the associated types of the impl (e.g. we allow `impl<'a> Foo { type Assoc = (); }`). However, in order to compute the `type_of` query for the anonymous associated type of an RPITIT, we need to do trait solving (in `query collect_return_position_impl_trait_in_trait_tys`). That would induce cycles. Luckily, it turns out for lifetimes we don't even care about if they're unconstrained, since they're erased in all contexts that we are trying to fix ICEs. So it's sufficient to keep this check separated out of the query. I think this is a bit less invasive of an approach compared to #127973. The major difference between this PR and that PR is that we queryify the check instead of merging it into the `explicit_predicates_of` query, and we use the result to taint just projection goals, rather than trait goals too. This doesn't require a lot of new tracking in `ItemCtxt` and `GenericPredicates`, and it also seems to not require any other changes to typeck like that PR did. Fixes #123141 Fixes #125874 Fixes #126942 Fixes #127804 Fixes #130967 r? oli-obk
2025-01-03Bump backtrace to 0.3.75Jubilee Young-0/+0
I prefer when we can ship the same version of backtrace on crates.io, and this will be the next published version. Compare: https://github.com/rust-lang/backtrace-rs/compare/4d7906b...0.3.75 Mostly internal-to-backtrace changes, plus a tiny code size win.
2025-01-04Auto merge of #135089 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7..fd784878cfa843e3e29a6654ecf564c62fae6735 2024-12-31 20:51:21 +0000 to 2025-01-03 20:06:26 +0000 - chore: bump gix-lock to remove thiserror@1 from `cargo` (rust-lang/cargo#15012) - refactor(manifest): Clean up field -&gt; env var handling (rust-lang/cargo#15008) - chore(deps): update rust crate thiserror to v2 (rust-lang/cargo#14998) - test(git): Clean up shallow fetch tests (rust-lang/cargo#15002) - fix(schema): Correct and update the JSON Schema (rust-lang/cargo#15000) - chore(deps): update rust crate itertools to 0.14.0 (rust-lang/cargo#14996) - fix: env table config can't trigger rebuild with `rerun-if-env-changed`. (rust-lang/cargo#14756) - chore(deps): update alpine docker tag to v3.21 (rust-lang/cargo#14995) - fix(package): check dirtiness of symlinks source files (rust-lang/cargo#14981)
2025-01-03Update cargoWeihang Lo-0/+0
2025-01-03Auto merge of #135086 - matthiaskrgr:rollup-3sfnc1w, r=matthiaskrgrbors-509/+780
Rollup of 7 pull requests Successful merges: - #133420 (Switch rtems target to panic unwind) - #134965 (Make Boxy UwU) - #135007 (Some type-outlives computation tweaks) - #135036 (run-make-support: adjust assertion printing, add some basic sanity checks) - #135043 (rustdoc: treat `allowed_through_unstable_modules` as deprecation) - #135044 (Improve infer (`_`) suggestions in `const`s and `static`s) - #135058 (refactor bootstrap path resolution) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-03Force code generation in assembly generation smoke-testsMatthew Maurer-0/+4
In llvm/llvm-project@7b23f413d1f76532825e470b523e971818d453ca , `.text` started being suppressed from LLVM assembly in cases where it wasn't strictly necessary. Currently, the sample functions in these two tests are frequently decided to be IR-only functions, resulting in no code generation, so LLVM drops the `.text` directive. Adding `#[no_mangle]` forces these tests back to their original intent - assembly code is generated, and so a `.text` directive is generated as well.
2025-01-03Rollup merge of #135058 - onur-ozkan:path-resolution, r=jieyouxuMatthias Krüger-27/+76
refactor bootstrap path resolution Previously we removed paths as soon as we found the first intersection, which made it impossible to find other intersecting paths (and that is the reason of https://github.com/rust-lang/rust/issues/135022). This patch changes that by marking the intersecting paths instead, so we can collect them all and remove them together when needed. Which means, `x build compiler` would compile anything that ends or starts with `"compiler"` instead of picking the first matching `Step` from `builder::get_step_descriptions`. Fixes https://github.com/rust-lang/rust/issues/135022