about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-07Improve make::struct_ field_list whitespaceA4-Tacks-36/+39
Example --- **Before this PR**: ```rust struct Variant{ field: u32 } ``` **After this PR**: ```rust struct Variant { field: u32 } ```
2025-09-07Auto merge of #146289 - cjgillot:gvn-aggregate, r=dianqkbors-30/+90
GVN: Allow reusing aggregates if LHS is not a simple local. This resolves a FIXME in the code. I don't see a reason not to allow this.
2025-09-07Ensure indirect is first projection in try_as_place.Camille GILLOT-0/+5
2025-09-07Introduce PlaceContext::may_observe_address.Camille GILLOT-8/+23
2025-09-07tiny clean-upAda Alakbarova-4/+3
2025-09-07extract to a separate fileAda Alakbarova-116/+126
2025-09-07optimization: Don't include ASCII characters in Unicode tablesKarl Meakin-247/+320
The ASCII subset of Unicode is fixed and will never change, so we don't need to generate tables for it with every new Unicode version. This saves a few bytes of static data and speeds up `char::is_control` and `char::is_grapheme_extended` on ASCII inputs. Since the table lookup functions exported from the `unicode` module will give nonsensical errors on ASCII input (and in fact will panic in debug mode), I had to add some private wrapper methods to `char` which check for ASCII-ness first.
2025-09-07move target-specific definitions into constantsFolkert de Vries-38/+36
2025-09-07move `build_c_file` and `build_rust_file` into `SupportedArchitectureTest`Folkert de Vries-143/+143
2025-09-07remove `trait IntrinsicDefinition`Folkert de Vries-54/+28
2025-09-07move `print_result_c` into the traitFolkert de Vries-83/+75
2025-09-07move `print_result_c` into the inner intrinsic typeFolkert de Vries-22/+30
2025-09-07move more constants into `SupportedArchitectureTest`Folkert de Vries-28/+53
2025-09-07move platform headers into `SupportedArchitectureTest`Folkert de Vries-2/+5
2025-09-07move `compare_outputs` implementation into `SupportedArchitectureTest` ↵Folkert de Vries-40/+47
definition
2025-09-07update Cargo.lockFolkert de Vries-65/+152
2025-09-07Auto merge of #146216 - ↵bors-328/+539
LorrensP-2158466:miri-float-nondet-foreign-items-take2, r=RalfJung Miri: non-deterministic floating point operations in foreign_items Take 2 of rust-lang/rust#143906. The last 2 commits are what changed compared to the original pr. Verified the tests using (fish shell): ```fish env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests -- f32 f64 ``` r? `@RalfJung`
2025-09-07Fix `read_zero_byte_vec` suggests wrongly inside `let` stmt (#15582)dswij-10/+109
Closes rust-lang/rust-clippy#15575 changelog: [`read_zero_byte_vec`] fix wrong suggestions inside `let` stmt
2025-09-07Auto merge of #146292 - matthiaskrgr:rollup-bkjs887, r=matthiaskrgrbors-153/+38
Rollup of 2 pull requests Successful merges: - rust-lang/rust#146254 (Use `Itertools::all_equal_value()` where applicable) - rust-lang/rust#146290 (Revert "Add LSX accelerated implementation for source file analysis") r? `@ghost` `@rustbot` modify labels: rollup
2025-09-07Rollup merge of #146290 - heiher:r-src-analysis-lsx, r=lqdMatthias Krüger-107/+3
Revert "Add LSX accelerated implementation for source file analysis" This reverts commit 5b43244ac59119870c9e0f6b642340ab88355b23 to fix native build failures on LoongArch. Link: https://github.com/rust-lang/rust/pull/145963#issuecomment-3263195096 Link: https://github.com/rust-lang/rust/pull/145963#issuecomment-3263420700
2025-09-07Rollup merge of #146254 - yotamofek:pr/itertools-all-equal-value, r=cjgillotMatthias Krüger-46/+35
Use `Itertools::all_equal_value()` where applicable Just a small cleanup. We already have `itertools` as a dep in these crates, so might as well use another of its features. Makes the code simpler IMHO :)
2025-09-07Auto merge of #146271 - niacdoial:improperctypes-refactor1, r=tgross35bors-1002/+1143
lint ImproperCTypes: refactor linting architecture (part 1) This is the first PR in an effort to split rust-lang/rust#134697 into individually-mergeable parts. This one focuses on properly packaging the lint and its tests, as well as properly separate the "linting" and "type-checking" code. There is exactly one user-visible change: the safety of `Option<Box<FFISafePointee>>` is now the same in `extern` blocks and function definitions: it is safe. r? `@tgross35` because you are already looking at the original
2025-09-07feat(std): emulate flock for solaris via fcntlWeihang Lo-0/+70
Upstream Solaris flock emulation to libstd from cargo. This is borrowed from https://github.com/rust-lang/cargo/blob/3b379fcc541b39321a7758552d37e5e0cc4277b9/src/cargo/util/flock.rs#L502-L536 which was implemented by an Oracle employee. The code has been in cargo since 2022-12. Python's `fcntl.flock` emulates like this as well: https://github.com/python/cpython/blob/c919d02edecfe9d75fe374756fb8aa1db8d95f55/Modules/fcntlmodule.c#L337-L400 We did the same thing in https://github.com/rust-lang/rust/blob/0d0f4eac8b98133e5da6d3604d86a8f3b5a67844/compiler/rustc_data_structures/src/flock/unix.rs#L13-L39
2025-09-07Revert "Add LSX accelerated implementation for source file analysis"WANG Rui-107/+3
This reverts commit 5b43244ac59119870c9e0f6b642340ab88355b23 to fix native build failures on LoongArch.
2025-09-07Allow simplifying aggregates if LHS is not a simple local.Camille GILLOT-30/+90
2025-09-07Auto merge of #146285 - matthiaskrgr:rollup-oaokoo3, r=matthiaskrgrbors-890/+55
Rollup of 4 pull requests Successful merges: - rust-lang/rust#146200 (Simplify rustdoc-gui tester by calling directly browser-ui-test) - rust-lang/rust#146236 (gpu offload: change suspicious map into filter) - rust-lang/rust#146240 (DynamicConfig: use canonical clone impl) - rust-lang/rust#146251 (rustc_middle: clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-07split `any` in two partsAda Alakbarova-4/+4
2025-09-07extend the let-chainAda Alakbarova-54/+53
removes one level of nesting
2025-09-06Rollup merge of #146251 - hkBst:clippy-fix-8, r=cjgillotMatthias Krüger-20/+14
rustc_middle: clippy fixes Fixes for: ```text warning: bound is defined in more than one place warning: empty line after doc comment ```
2025-09-06Rollup merge of #146240 - hkBst:query-1, r=cjgillotMatthias Krüger-1/+1
DynamicConfig: use canonical clone impl Fixes clippy warning: ```text warning: non-canonical implementation of `clone` on a `Copy` type --> compiler/rustc_query_impl/src/lib.rs:60:29 | 60 | fn clone(&self) -> Self { | _____________________________^ 61 | | DynamicConfig { dynamic: self.dynamic } 62 | | } | |_____^ help: change this to: `{ *self }` ```
2025-09-06Rollup merge of #146236 - hkBst:gpu-1, r=ZuseZ4Matthias Krüger-1/+1
gpu offload: change suspicious map into filter Fixes clippy warning: ```text warning: this call to `map()` won't have an effect on the call to `count()` --> compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs:194:25 | 194 | let num_ptr_types = types | _________________________^ 195 | | .iter() 196 | | .map(|&x| matches!(cx.type_kind(x), rustc_codegen_ssa::common::TypeKind::Pointer)) 197 | | .count(); | |________________^ | = help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_map = note: `-W clippy::suspicious-map` implied by `-W clippy::suspicious` = help: to override `-W clippy::suspicious` add `#[allow(clippy::suspicious_map)]` ```
2025-09-06Rollup merge of #146200 - GuillaumeGomez:simplify-rustdoc-gui-tests, ↵Matthias Krüger-868/+39
r=lolbinarycat Simplify rustdoc-gui tester by calling directly browser-ui-test The output and handling of `browser-ui-test` is now mostly the same as we did manually, so no need to keep our wrapper anymore. Lot of code removed! \o/ r? `@lolbinarycat`
2025-09-06Auto merge of #146282 - tgross35:rollup-0n5tjnm, r=tgross35bors-239/+446
Rollup of 5 pull requests Successful merges: - rust-lang/rust#139524 (Add socket extensions for cygwin) - rust-lang/rust#145940 (single buffer for exponent fmt of integers) - rust-lang/rust#146206 (identity uses are ok, even if there are no defining uses) - rust-lang/rust#146272 (Update comment for `-Werror` on LLVM builds) - rust-lang/rust#146280 (Make `LetChainsPolicy` public for rustfmt usage) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-06ImproperCTypes: redo state trackingniacdoial-138/+226
No changes should be visible by rustc users This is just some architecture changes to the type checking to facilitate FFI-safety decisions that depend on how the type is used (the change here is not complete, there are still bits of "legacy" state passing for this, but since this is a retconned commit, I can tell you those bits will disappear before the end of the commit chain) (there is at least one bit where the decision making code is weird, but that this is because we do not want to change the lint's behaviour this early in the chain)
2025-09-06ImproperCTypes: re-separate linting and checkingniacdoial-224/+292
no visible changes to rust users, just making the inner architecture of the ImproperCTypes lints more sensible, with a clean separation between the struct (now singular) that interacts with the linting system and the struct (now singular) that visits the types to check FFI-safety
2025-09-06ImproperCTypes: more pre-emptive cleanupniacdoial-56/+31
Mainly, we realise that the non-null assumption on a Box<_> argument does not depend on what side of the FFI boundary the function is on. And anyway, this is not the way to deal with this assumption being maybe violated.
2025-09-06ImproperCTypes: move code and tests into proper directoriesniacdoial-949/+959
2025-09-06Change stdlib float tests to account for miri nondet floats.LorrensP-2158466-54/+53
2025-09-06Implement nondet behaviour and change/add tests.LorrensP-2158466-169/+375
2025-09-06Rollup merge of #146280 - mohe2015:public-for-rustfmt-forks, r=lqdTrevor Gross-1/+3
Make `LetChainsPolicy` public for rustfmt usage Related to https://github.com/rust-lang/rust/pull/138511. To call `Parser::parse_expr_cond` from [rustfmt forks for custom macro formatting](https://github.com/tucant/rustfmt/blob/30c83df9e1db10007bdd16dafce8a86b404329b2/src/parse/macros/html.rs#L57) you need to pass this enum so it would be nice if it could be public. Thank you.
2025-09-06Rollup merge of #146272 - rperier:rustc_llvm_werror_remove_commment_llvm22, ↵Trevor Gross-4/+4
r=tgross35 Update comment for `-Werror` on LLVM builds cc rust-lang/rust#109712 see https://github.com/rust-lang/rust/issues/109712#issuecomment-3257474643
2025-09-06Rollup merge of #146206 - lcnr:fix-non-defining-uses, r=BoxyUwUTrevor Gross-1/+71
identity uses are ok, even if there are no defining uses fix rust-lang/rust#146191 I've tried moving the "is this an identity use" check to `fn clone_and_resolve_opaque_types` and this would allow the following code to compile as it now ignores `Opaque<'!a> = Opaque<'!a>` while they previously resulted in errors https://github.com/rust-lang/rust/blob/71289c378d0a406a4f537fe4001282d19362931f/tests/ui/type-alias-impl-trait/hkl_forbidden.rs#L42-L46 The closure signature gets inferred to `for<'a> fn(&'a ()) -> Inner<'a>`. The closure then has a defining use `Inner<'a_latbound> = &'a_latebound ()` while the parent function has a non-defining `Inner<'!a> = Inner<'!a>`. By eagerly discarding identity uses we don't error on the non-defining use in the parent. r? `@BoxyUwU`
2025-09-06Rollup merge of #145940 - pascaldekloe:int-exp-tune, r=tgross35Trevor Gross-176/+237
single buffer for exponent fmt of integers No need for fragmented buffers when formatting. ``` orig.txt: fmt::write_i128_exp 143.39ns/iter +/- 0.32 orig.txt: fmt::write_i64_exp 68.72ns/iter +/- 0.03 new.txt: fmt::write_i128_exp 138.29ns/iter +/- 0.50 new.txt: fmt::write_i64_exp 58.93ns/iter +/- 4.62 ``` This patch fully eliminates unsafe pointer use (after rust-lang/rust#135265 and rust-lang/rust#136594). r? libs
2025-09-06Rollup merge of #139524 - Berrysoft:cygwin-socket-ext, r=tgross35Trevor Gross-57/+131
Add socket extensions for cygwin r? `@joboet` * Abstract name uds addr * quickack * passcred
2025-09-06Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzolbors-78/+177
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites ## Summary Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`. | New test suites | Explanation | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. | | `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. | This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](https://github.com/rust-lang/compiler-team/issues/847). Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`). Fixes rust-lang/rust#134109. ## Remarks - I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability. - The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see https://github.com/rust-lang/rust/pull/130642). --- try-job: aarch64-msvc-1 try-job: test-various try-job: x86_64-gnu-debug try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: dist-various-1
2025-09-06Move timers into execute_*_work_itembjorn3-27/+20
2025-09-06Remove want_summary argument from prepare_thinbjorn3-37/+16
It is always false nowadays. ThinLTO summary writing is instead done by llvm_optimize.
2025-09-06Remove thin_link_data method from ThinBufferMethodsbjorn3-13/+8
It is only used within cg_llvm.
2025-09-06Simplify rustdoc-gui tester by calling directly `browser-ui-test`Guillaume Gomez-419/+13
2025-09-06Update `browser-ui-test` version to `0.22.0`Guillaume Gomez-449/+26