about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-07Apply `--cfg windows_raw_dylib` for bootstrap tools tooJieyou Xu-1/+1
This is already applied for rustc/std tools. This is needed to make `windows` crates avoid trying to depend on a generated `windows.0.xx.0.lib`.
2025-03-07Make synthetic RPITIT assoc ty name handling more rigorous.Nicholas Nethercote-3/+3
Currently it relies on special treatment of `kw::Empty`, which is really easy to get wrong. This commit makes the special case clearer in the type system by using `Option`. It's a bit clumsy, but the synthetic name handling itself is a bit clumsy; better to make it explicit than sneak it in. Fixes #133426.
2025-03-07Fix a typo in the crashtest output.Nicholas Nethercote-1/+1
2025-03-07Show interpreter backtrace error on Ctrl+CStypox-1/+5
See https://github.com/rust-lang/rust/pull/111769
2025-03-07Rollup merge of #138111 - estebank:use-dfv, r=nnethercoteMatthias Krüger-2/+2
Use `default_field_values` for `rustc_errors::Context`, `rustc_session::config::NextSolverConfig` and `rustc_session::config::ErrorOutputType` Wanted to see where `#![feature(default_field_values)]` could be used in the codebase. These three seemed like no-brainers. There are a bunch of more places where we could remove manual `Default` impls, but they `derive` other traits that rely on `syn`, which [doesn't yet support `default_field_values`](https://github.com/dtolnay/syn/issues/1774).
2025-03-07Rollup merge of #138107 - yotamofek:pr/rustdoc/clippy, r=GuillaumeGomezMatthias Krüger-49/+45
`librustdoc`: clippy fixes First commit is all machine-generated fixes, next two are some more lints fixed by hand/misc. cleanups Inspired by the redundant `.and_then()` added in https://github.com/rust-lang/rust/pull/137320 , and [this comment](https://github.com/rust-lang/rust/pull/138090#discussion_r1983111856) r? ```@GuillaumeGomez```
2025-03-07Add post-merge analysis CI workflowJakub Beránek-10/+283
2025-03-07Move `visit_id` calls.Nicholas Nethercote-1/+1
In `walk_item`, we call `visit_id` on every item kind. For most of them we do it directly in `walk_item`. But for `ItemKind::Mod`, `ItemKind::Enum`, and `ItemKind::Use` we instead do it in the `walk_*` function called (via the `visit_*` function) from `walk_item`. I can see no reason for this inconsistency, so this commit makes those three cases like all the other cases, moving the `visit_id` calls into `walk_item`. This also avoids the need for a few `HirId` arguments.
2025-03-07Merge pull request #19308 from Veykril/push-rnrxutwlvmlyLukas Wirth-23/+1174
Move loaded project MSRV back to 1.78, show notification for the warning
2025-03-07Pop up a notification for the MSRV project loading warningLukas Wirth-16/+29
2025-03-07Move project MSRV back to 1.78Lukas Wirth-7/+1145
2025-03-07Refactor relevance scoring to use a named constant BASE_SCORETongjun Gao-3/+5
Replace magic number with a named constant for improved readability and maintainability of the scoring logic
2025-03-07use target compiler on llvm-bitcode-linkeronur-ozkan-4/+4
The build compiler is already resolved inside the `ToolBuild` step, so we should pass only the target compilers for `Mode::ToolRustc` tools. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-07Fix logical error in relevance scoring implementationTongjun Gao-3/+3
2025-03-07Merge pull request #4222 from rust-lang/rustup-2025-03-07Ben Kimock-213/+431
Automatic Rustup
2025-03-07Merge from rustcThe Miri Cronjob Bot-212/+430
2025-03-07Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-07Merge pull request #4221 from saethlin/nextest-parallelismBen Kimock-2/+1
Update documentation about nextest
2025-03-07Auto merge of #138127 - compiler-errors:rollup-kcarqrz, r=compiler-errorsbors-233/+220
Rollup of 17 pull requests Successful merges: - #137827 (Add timestamp to unstable feature usage metrics) - #138041 (bootstrap and compiletest: Use `size_of_val` from the prelude instead of imported) - #138046 (trim channel value in `get_closest_merge_commit`) - #138053 (Increase the max. custom try jobs requested to `20`) - #138061 (triagebot: add a `compiler_leads` ad-hoc group) - #138064 (Remove - from xtensa targets cpu names) - #138075 (Use final path segment for diagnostic) - #138078 (Reduce the noise of bootstrap changelog warnings in --dry-run mode) - #138081 (Move `yield` expressions behind their own feature gate) - #138090 (`librustdoc`: flatten nested ifs) - #138092 (Re-add `DynSend` and `DynSync` impls for `TyCtxt`) - #138094 (a small borrowck cleanup) - #138098 (Stabilize feature `const_copy_from_slice`) - #138103 (Git ignore citool's target directory) - #138105 (Fix broken link to Miri intrinsics in documentation) - #138108 (Mention me (WaffleLapkin) when changes to `rustc_codegen_ssa` occur) - #138117 ([llvm/PassWrapper] use `size_t` when building arg strings) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-07Merge pull request #4218 from saethlin/tier-2-sysrootsBen Kimock-0/+1
Fix tier 2 sysroots job
2025-03-06Update documentation about nextestBen Kimock-2/+1
2025-03-06Fix tier 2 sysroots jobBen Kimock-0/+1
2025-03-06Auto merge of #138114 - compiler-errors:rollup-7xr4b69, r=compiler-errorsbors-117/+270
Rollup of 25 pull requests Successful merges: - #135733 (Implement `&pin const self` and `&pin mut self` sugars) - #135895 (Document workings of successors more clearly) - #136922 (Pattern types: Avoid having to handle an Option for range ends in the type system or the HIR) - #137303 (Remove `MaybeForgetReturn` suggestion) - #137327 (Undeprecate env::home_dir) - #137358 (Match Ergonomics 2024: add context and examples to the unstable book) - #137534 ([rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden)) - #137565 (Try to point of macro expansion from resolver and method errors if it involves macro var) - #137637 (Check dyn flavor before registering upcast goal on wide pointer cast in MIR typeck) - #137643 (Add DWARF test case for non-C-like `repr128` enums) - #137744 (Re-add `Clone`-derive on `Thir`) - #137758 (fix usage of ty decl macro fragments in attributes) - #137764 (Ensure that negative auto impls are always applicable) - #137772 (Fix char count in `Display` for `ByteStr`) - #137798 (ci: use ubuntu 24 on arm large runner) - #137802 (miri native-call support: all previously exposed provenance is accessible to the callee) - #137805 (adjust Layout debug printing to match the internal field name) - #137808 (Do not require that unsafe fields lack drop glue) - #137820 (Clarify why InhabitedPredicate::instantiate_opt exists) - #137825 (Provide more context on resolve error caused from incorrect RTN) - #137834 (rustc_fluent_macro: use CARGO_CRATE_NAME instead of CARGO_PKG_NAME) - #137868 (Add minimal platform support documentation for powerpc-unknown-linux-gnuspe) - #137910 (Improve error message for `AsyncFn` trait failure for RPIT) - #137920 (interpret/provenance_map: consistently use range_is_empty) - #138038 (Update `compiler-builtins` to 0.1.151) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-07Mark `rust-analyzer.showSyntaxTree` config option as requiring server restartChayim Refael Friedman-0/+1
We register the provider when we start the server. It confused me why I set the option and it didn't work, so probably better to have it hint people.
2025-03-06Fix rustfmtSantiago Pastorino-0/+5
2025-03-06Fix clippySantiago Pastorino-5/+44
2025-03-06Rollup merge of #138090 - yotamofek:pr/rustdoc/flatten-ifs, r=GuillaumeGomezMichael Goulet-220/+203
`librustdoc`: flatten nested ifs Some minor cosmetic improvements (IMHO) found while working on something else. But reviewed with [no whitespace](https://github.com/rust-lang/rust/pull/138090/files?diff=unified&w=1).
2025-03-06Rollup merge of #138078 - moxian:rember-warns, r=KobzolMichael Goulet-6/+7
Reduce the noise of bootstrap changelog warnings in --dry-run mode Presently x.py displays "There have been changes to x.py since you last updated:" note only once when run normally, but on every invocation when run with `--dry-run`. The disparity is not exactly intentonal, but just a historical accident. It was made to be printed once in https://github.com/rust-lang/rust/pull/117815 via storing `.last-warned-change-id` on disk in `{config.out}/bootstrap` (i.e. `build/bootstrap`) directory. But that didn't quite work for `--dry-run`, since `{config.out}/bootsrap` points to `build/tmp-dry-run/bootstrap` which *isn't* created in dry-run mode, so file creation fails. This got fixed in https://github.com/rust-lang/rust/pull/118789 and now `--dry-run` does not save `.last-warned-change-id` at all. (Nor does it read it, since it cannot know to read from non-dry-run location) This PR simply stops displaying the changelog altogether in --dry-run mode. <details> <summary>previous attempt (outdated)</summary> This PR takes a different approach, and instead of not-writing the stamp in `--dry-run` mode it instead tries harder to yes-write it, and, specifically, creates `build/tmp-dry-run/bootstrap` directory to do so. If neccessary (i.e. if there are changes newer than the `change-id` stamp of config.toml to warn about). Note that `build/tmp-dry-run/` was *already* being created, so making an extra `boostrap` sub-folder should not meaningfully pollute the build dir. </details> (Apologies for the, perhaps, excessively wordy PR, I'm new to this)
2025-03-06Rollup merge of #138053 - Kobzol:more-try-jobs, r=marcoieniMichael Goulet-2/+6
Increase the max. custom try jobs requested to `20` Requested [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Increase.20try-job.20limit). r? ````@marcoieni````
2025-03-06Rollup merge of #138046 - onur-ozkan:trim-include-str, r=jieyouxuMichael Goulet-1/+1
trim channel value in `get_closest_merge_commit` This was a silly bug which caused `git_upstream_merge_base` to never work because it was `nightly\n` not `nightly`.
2025-03-06Rollup merge of #138041 - ↵Michael Goulet-4/+3
thaliaarchi:use-prelude-size-of.boostrap-compiletest, r=jieyouxu bootstrap and compiletest: Use `size_of_val` from the prelude instead of imported Use `std::mem::size_of_val` from the prelude instead of importing or qualifying it. This function was added to all preludes in Rust 1.80. r? ``@jieyouxu``
2025-03-06Add second precondition for `skip_search`.Markus Reiter-28/+89
2025-03-06Allow optimizing out `panic_bounds_check` in Unicode checks.Markus Reiter-14/+31
2025-03-06Auto merge of #136831 - ehuss:update-stdarch, r=Amanieubors-9/+15
Update stdarch Updates stdarch - core_arch: Add LoongArch basic intrinsics: https://github.com/rust-lang/stdarch/pull/1688 - New ARM intrinsic generator: https://github.com/rust-lang/stdarch/pull/1693 - Fix the bug in CMPINT intrinsics with IMM3=7: https://github.com/rust-lang/stdarch/pull/1694 - Expand feature detection on AArch64 Darwin: https://github.com/rust-lang/stdarch/pull/1695 - Tidying x86 `as_*` functions: https://github.com/rust-lang/stdarch/pull/1696 - Fix typo and prettify comment: https://github.com/rust-lang/stdarch/pull/1697 - add is_s390x_feature_detected: https://github.com/rust-lang/stdarch/pull/1699 - add vec_add for s390x: https://github.com/rust-lang/stdarch/pull/1703 - s390x: add vec_sub, vec_mul, vec_min, vec_max, vec_abs and vec_splats: https://github.com/rust-lang/stdarch/pull/1704 - Fix build and CLI behaviour for stdarch-gen-arm. https://github.com/rust-lang/stdarch/pull/1705 - Fix some test naming, and refactor stdarch-verify in general: https://github.com/rust-lang/stdarch/pull/1707 - Update all stdarch crates to Rust 2024: https://github.com/rust-lang/stdarch/pull/1710 - Add keylocker (kl and widekl) intrinsics and runtime feature detection: https://github.com/rust-lang/stdarch/pull/1706 - S390x vector bitwise operations: https://github.com/rust-lang/stdarch/pull/1709 - Update CI to FreeBSD 13.4: https://github.com/rust-lang/stdarch/pull/1715 - Update wasm sub sat intrinsics for LLVM 20: https://github.com/rust-lang/stdarch/pull/1719 - powerpc: use more target-independent llvm intrinsics (min, max, round, countlz): https://github.com/rust-lang/stdarch/pull/1713 - S390x float rounding: https://github.com/rust-lang/stdarch/pull/1712 - mark riscv intrinsics as safe: https://github.com/rust-lang/stdarch/pull/1717 - change redundant transmutations of sign to cast_unsigned: https://github.com/rust-lang/stdarch/pull/1711 - Fix - AArch64 Big Endian Intrinsics: https://github.com/rust-lang/stdarch/pull/1708 - mark x86 intrinsics as safe: https://github.com/rust-lang/stdarch/pull/1714 - AArch64: Add NEON fp16 intrinsics: https://github.com/rust-lang/stdarch/pull/1726 - wasm: use simd_as for float to integer conversions: https://github.com/rust-lang/stdarch/pull/1724 - nvptx: use simd_fmin and simd_fmax for minnum and maxnum: https://github.com/rust-lang/stdarch/pull/1725 - powerpc: use simd_ceil and simd_floor: https://github.com/rust-lang/stdarch/pull/1723 - Changed altivec.rs to new intrinsic declaration: https://github.com/rust-lang/stdarch/pull/1722 - Remove some allow(unsafe_op_in_unsafe_fn)s and use target_feature 1.1 in examples: https://github.com/rust-lang/stdarch/pull/1727 - fix - neon type signed unsigned conversions: https://github.com/rust-lang/stdarch/pull/1729 - s390x_is_feature_detected!: detect more features: https://github.com/rust-lang/stdarch/pull/1720 - Fix doctests failing due to unused_unsafe: https://github.com/rust-lang/stdarch/pull/1731 - fix compilation on armebv7r-none-eabi: https://github.com/rust-lang/stdarch/pull/1733 - wasm: update for rintf intrinsic rename: https://github.com/rust-lang/stdarch/pull/1721 - powerpc: use the simd_fma intrinsic for vec_madd: https://github.com/rust-lang/stdarch/pull/1734 - powerpc: use llvm.fshl for vec_rl: https://github.com/rust-lang/stdarch/pull/1735 - s390x: add more intrinsics: https://github.com/rust-lang/stdarch/pull/1728 - make _mm256_zero{upper,all} safe: https://github.com/rust-lang/stdarch/pull/1736 - fix unnecessary unsafe error in doctest: https://github.com/rust-lang/stdarch/pull/1739 - Feat - Aarch64 FEAT_FAMINMAX: https://github.com/rust-lang/stdarch/pull/1732 - feat - FEAT_LUT neon instrinsics: https://github.com/rust-lang/stdarch/pull/1741
2025-03-06Update stdarchEric Huss-9/+15
2025-03-06Warn the user when a rename will change the meaning of the programChayim Refael Friedman-59/+509
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it. We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06Use correct crate for trait env in `render_const_scalar()`Chayim Refael Friedman-5/+7
2025-03-06Pass the target crate in `HirFormatter`Chayim Refael Friedman-499/+824
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-06Normalize projections in evaluated const display and layout calculationChayim Refael Friedman-0/+39
2025-03-06Rollup merge of #137868 - taiki-e:powerpcspe-doc, r=workingjubileeMichael Goulet-3/+26
Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per https://github.com/rust-lang/rust/pull/137860#issuecomment-2692358259, add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc ```@glaubitz``` cc ```@BKPepe``` r? workingjubilee ```@rustbot``` label +O-PowerPC
2025-03-06Rollup merge of #137802 - RalfJung:miri-native-call-exposed, r=oli-obkMichael Goulet-54/+120
miri native-call support: all previously exposed provenance is accessible to the callee When Miri invokes a native C function, the memory C can access needs to be "prepared": to avoid false positives, we need to consider all that memory initialized, and we need to consider it to have arbitrary provenance. So far we did this for all pointers passed to C, but not for pointers that were exposed already before the native call. This PR adjusts the logic so that we now "prepare" all memory that has ever been exposed. This fixes cases such as: - cast a pointer to integer, send that integer to C, and access the memory there (`test_pass_ptr_as_int`) - send a pointer to some memory to C, which stores it somewhere; then in Rust store another pointer in that memory, and access that via C (`test_pass_ptr_via_previously_shared_mem`) r? `````@oli-obk`````
2025-03-06Rollup merge of #137798 - marcoieni:ubuntu-24-large-runner-arm, r=KobzolMichael Goulet-1/+1
ci: use ubuntu 24 on arm large runner try-job: dist-aarch64-linux
2025-03-06Rollup merge of #137534 - xizheyin:issue-137342, r=GuillaumeGomezMichael Goulet-2/+20
[rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden) Part of #137342 ![image](https://github.com/user-attachments/assets/68b4649a-a64a-43b2-8a73-6ac92b486e9e)
2025-03-06Rollup merge of #137358 - dianne:new-match-ergonomics-examples, r=NadrierilMichael Goulet-6/+47
Match Ergonomics 2024: add context and examples to the unstable book The examples here are pretty limited and don't illustrate the differences between the two feature gates, but my hope is that they get the general idea across. I can try and add some more nuance or more comprehensive examples too if that would help. Hopefully the doctest isn't too sneaky. I wanted to make the bindings' types explicit, and the most readable way I could think of was to use a helper. ~~Unfortunately it looks like the "run this code" button doesn't work yet, but I made sure the examples are cross-edition, so that should resolve on its own once playground's nightly updates (or if playground's default becomes edition 2024, or if the edition in the markdown gets forwarded to playground).~~ It looks like the default edition on playground is now 2024, so the run button works! There's no output, but having a button to show that it compiles is nice, I think. Relevant tracking issue: #123076 r? ``````@Nadrieril``````
2025-03-06Rollup merge of #136922 - oli-obk:pattern-types-option-ends, r=BoxyUwUMichael Goulet-8/+3
Pattern types: Avoid having to handle an Option for range ends in the type system or the HIR Instead, 1. during hir_ty_lowering, we now generate constants for the min/max when the range doesn't have a start/end specified. 2. in a later commit we generate those constants during ast lowering, simplifying everything further by not having to handle the range end inclusivity anymore in the type system (and thus avoiding any issues of `0..5` being different from `0..=4` I think it makes all the type system code simpler, and the cost of the extra `ConstKind::Value` processing seems negligible. r? `@BoxyUwU` cc `@joshtriplett` `@scottmcm`
2025-03-06Rollup merge of #135733 - frank-king:feature/pin-self-receiver, ↵Michael Goulet-43/+53
r=oli-obk,traviscross Implement `&pin const self` and `&pin mut self` sugars This PR implements part of #130494. It introduces the sugars `&pin const self` and `&pin mut self` for `self: Pin<&Self>` and `self: Pin<&mut Self>`.
2025-03-06Auto merge of #138039 - onur-ozkan:handle-forced-compiler-on-tools, r=jieyouxubors-86/+145
handle forced compiler and revert #137476 Fixes https://github.com/rust-lang/rust/issues/138004 I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra` try-job: dist-powerpc64le-linux
2025-03-06Manual, post-`clippy --fix` cleanupsYotam Ofek-23/+18
2025-03-06Implement `Ord` by-hand instead of `PartialOrd` for `Link`Yotam Ofek-6/+12
2025-03-06`x clippy src/librustdoc --fix`Yotam Ofek-29/+24