about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-04Avoid `Rc` in `BodyWithBorrowckFacts`.Nicholas Nethercote-7/+4
It can own these two fields.
2024-10-04Use `Box` instead of `Rc` for `polonius_output`.Nicholas Nethercote-7/+9
Refcounting isn't needed.
2024-10-04Use `Rc` less in `MirBorrowckCtxt`.Nicholas Nethercote-25/+17
The `regioncx` and `borrow_set` fields can be references instead of `Rc`. They use the existing `'a` lifetime. This avoids some heap allocations and is a bit simpler.
2024-10-03Auto merge of #131145 - ↵bors-15/+14
ismailarilik:handle_potential_query_instability_lint_for_rustc_metadata, r=compiler-errors Handle `rustc_metadata` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_metadata/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_metadata/src/lib.rs#L3) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-03Auto merge of #131205 - flip1995:clippy-subtree-update, r=Manishearthbors-848/+2484
Clippy subtree update r? `@Manishearth`
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-848/+2484
clippy-subtree-update
2024-10-03Auto merge of #131196 - matthiaskrgr:rollup-3it3zqp, r=matthiaskrgrbors-38/+44
Rollup of 3 pull requests Successful merges: - #130419 (Streamline `HirCollector`) - #131163 (Add `get_line` confusable to `Stdin::read_line()`) - #131173 (Fix `target_abi` in SOLID targets) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-03Auto merge of #13492 - flip1995:rustup, r=flip1995bors-33/+23
Rustup r? `@ghost` changelog: none
2024-10-03Bump nightly version -> 2024-10-03Philipp Krones-1/+1
2024-10-03Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-865/+2531
2024-10-03Rollup merge of #131173 - madsmtm:target-info-solid_asp3-abi, r=lcnrMatthias Krüger-0/+2
Fix `target_abi` in SOLID targets The `armv7a-kmc-solid_asp3-eabi` and `armv7a-kmc-solid_asp3-eabihf` targets clearly have the ABI in their name, so it should also be exposed in Rust's `target_abi` cfg variable. CC target maintainer `@kawadakk.`
2024-10-03Rollup merge of #131163 - JakenHerman:master, r=NadrierilMatthias Krüger-1/+17
Add `get_line` confusable to `Stdin::read_line()` This pull request resolves https://github.com/rust-lang/rust/issues/131091 --- I've updated tests for `tests/ui/attributes/rustc_confusables_std_cases` in order to verify this change is working as intended. Before I submitted this pull request, I had a pull request to my local fork. If you're interested in seeing the conversation on that PR, go to https://github.com/JakenHerman/rust/pull/1. --- **Testing**: Run `./x.py test tests/ui/attributes/rustc_confusables_std_cases.rs`
2024-10-03Rollup merge of #130419 - nnethercote:streamline-HirCollector, r=GuillaumeGomezMatthias Krüger-37/+25
Streamline `HirCollector` r? `@GuillaumeGomez`
2024-10-03Auto merge of #128711 - clarfonthey:default-iters-hash, r=dtolnaybors-0/+80
impl `Default` for `HashMap`/`HashSet` iterators that don't already have it This is a follow-up to #128261 that isn't included in that PR because it depends on: * [x] rust-lang/hashbrown#542 (`Default`) * [x] `hashbrown` release containing above It also wasn't included in #128261 initially and should have its own FCP, since these are also insta-stable. Changes added: * `Default for hash_map::{Iter, IterMut, IntoIter, IntoKeys, IntoValues, Keys, Values, ValuesMut}` * `Default for hash_set::{Iter, IntoIter}` Changes that were added before FCP, but are being deferred to later: * `Clone for hash_map::{IntoIter, IntoKeys, IntoValues} where K: Clone, V: Clone` * `Clone for hash_set::IntoIter where K: Clone`
2024-10-03Auto merge of #131185 - workingjubilee:rollup-wkcqe2j, r=workingjubileebors-41/+488
Rollup of 3 pull requests Successful merges: - #126930 (Add unstable support for outputting file checksums for use in cargo) - #130725 (Parser: better error messages for ``@`` in struct patterns) - #131166 (Fix `target_vendor` for `aarch64-nintendo-switch-freestanding`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-03Handle `rustc_metadata` cases of `rustc::potential_query_instability` lintismailarilik-15/+14
2024-10-02Rollup merge of #131166 - madsmtm:target-info-switch-vendor, r=jieyouxuJubilee-0/+1
Fix `target_vendor` for `aarch64-nintendo-switch-freestanding` Previously set to `target_vendor = "unknown"`, but Nintendo is clearly the vendor of the Switch, and is also reflected in the target name itself. CC target maintainers `@leo60228` and `@jam1garner`
2024-10-02Rollup merge of #130725 - GrigorenkoPV:@-in-struct-patterns, r=NadrierilJubilee-13/+150
Parser: better error messages for `@` in struct patterns
2024-10-02Rollup merge of #126930 - Xaeroxe:file-checksum-hint, r=chenyukangJubilee-28/+337
Add unstable support for outputting file checksums for use in cargo Adds an unstable option that appends file checksums and expected lengths to the end of the dep-info file such that `cargo` can read and use these values as an alternative to file mtimes. This PR powers the changes made in this cargo PR https://github.com/rust-lang/cargo/pull/14137 Here's the tracking issue for the cargo feature https://github.com/rust-lang/cargo/issues/14136.
2024-10-02Add `get_line` confusable to `Stdin::read_line()`Jaken Herman-1/+17
Add tests for addition of `#[rustc_confusables("get_line")]`
2024-10-02impl Default for Hash{Map,Set} iterators that don't already have itltdk-0/+80
2024-10-03Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviperbors-139/+536
std: make `thread::current` available in all `thread_local!` destructors ... and thereby allow the panic runtime to always print the right thread name. This works by modifying the TLS destructor system to schedule a runtime cleanup function after all other TLS destructors registered by `std` have run. Unfortunately, this doesn't affect foreign TLS destructors, `thread::current` will still panic there. Additionally, the thread ID returned by `current_id` will now always be available, even inside the global allocator, and will not change during the lifetime of one thread (this was previously the case with key-based TLS). The mechanisms I added for this (`local_pointer` and `thread_cleanup`) will also allow finally fixing #111272 by moving the signal stack to a similar runtime-cleanup TLS variable.
2024-10-03Auto merge of #131148 - Urgau:hashbrown-0.15, r=Amanieubors-130/+70
Update hashbrown to 0.15 and adjust some methods This PR updates `hashbrown` to 0.15 in the standard library and adjust some methods as well as removing some as they no longer exists in Hashbrown it-self. - `HashMap::get_many_mut` change API to return array-of-Option - `HashMap::{replace_entry, replace_key}` are removed, FCP close [already finished](https://github.com/rust-lang/rust/issues/44286#issuecomment-2293825619) - `HashSet::get_or_insert_owned` is removed as it no longer exists in hashbrown Closes https://github.com/rust-lang/rust/issues/44286 r? `@Amanieu`
2024-10-02Auto merge of #131006 - RalfJung:immediate-sanity, r=saethlinbors-3/+6
interpret: always enable write_immediate sanity checks Writing a wrongly-sized scalar somewhere can have quite confusing effects. Let's see how expensive it is to catch this early.
2024-10-02Auto merge of #130821 - lcnr:nalgebra-hang-2, r=compiler-errorsbors-134/+443
add caching to most type folders, rm region uniquification Fixes the new minimization of the hang in nalgebra and nalgebra itself :3 this is a bit iffy, especially the cache in `TypeRelating`. I believe all the caches are correct, but it definitely adds some non-local complexity in places. The first commit removes region uniquification, reintroducing the ICE from https://github.com/rust-lang/trait-system-refactor-initiative/issues/27. This does not affect coherence and I would like to fix this by introducing OR-region constraints r? `@compiler-errors`
2024-10-02Fix target_abi in SOLID targetsMads Marquart-0/+2
The `armv7a-kmc-solid_asp3-eabi` and `armv7a-kmc-solid_asp3-eabihf` targets clearly have the ABI in their name, so it should also be exposed in Rust's `target_abi` cfg variable.
2024-10-02Fix target_vendor for aarch64-nintendo-switch-freestandingMads Marquart-0/+1
Previously set to `target_vendor = "unknown"`, but Nintendo is clearly the vendor of the Switch, and is also reflected in the target name itself.
2024-10-02Auto merge of #131158 - matthiaskrgr:rollup-3x2vado, r=matthiaskrgrbors-279/+538
Rollup of 7 pull requests Successful merges: - #130863 (Relax a debug assertion for dyn principal *equality* in codegen) - #131016 (Apple: Do not specify an SDK version in `rlib` object files) - #131140 (Handle `rustc_hir_analysis` cases of `potential_query_instability` lint) - #131141 (mpmc doctest: make sure main thread waits for child threads) - #131150 (only query `params_in_repr` if def kind is adt) - #131151 (Replace zero-width whitespace with a visible `\` in the PR template) - #131152 (Improve const traits diagnostics for new desugaring) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-02bless miri testsjoboet-7/+7
2024-10-02std: make `thread::current` available in all `thread_local!` destructorsjoboet-132/+529
2024-10-02Rollup merge of #131152 - fee1-dead-contrib:fxdiag, r=compiler-errorsMatthias Krüger-168/+224
Improve const traits diagnostics for new desugaring r? project-const-traits
2024-10-02Rollup merge of #131151 - jieyouxu:adjust-pr-template, r=fmeaseMatthias Krüger-1/+1
Replace zero-width whitespace with a visible `\` in the PR template People (incl. myself) tried to copy the `r?` which had an invisible zero-width whitespace (meaning it was actually more like `r⌴?`), causing rustbot to not recognize the instruction, and which makes it difficult to figure out why it didn't work. This PR replaces the zero-width whitespace with a visible `\` alongside a comment to remove the `\`. It's a bit less "visual", but at least it's visible why the rustbot assignment doesn't work.
2024-10-02Rollup merge of #131150 - bvanjoi:issue-128327, r=chenyukangMatthias Krüger-6/+45
only query `params_in_repr` if def kind is adt Fixes #128327 `params_in_repr` was only stored in `encode_info_for_adt`, so we only query it when the def kind belongs to them. https://github.com/rust-lang/rust/blob/9e3e5174462afaf6c3b9db9b35c6d1934521848a/compiler/rustc_metadata/src/rmeta/encoder.rs#L1566-L1567
2024-10-02Rollup merge of #131141 - RalfJung:mpmc-test, r=AmanieuMatthias Krüger-22/+24
mpmc doctest: make sure main thread waits for child threads Currently, chances are half the test is not executed because the main thread exits while the other threads are still working. Cc `@obeis` `@Amanieu`
2024-10-02Rollup merge of #131140 - ↵Matthias Krüger-34/+33
ismailarilik:handle-potential-query-instability-lint-for-rustc-hir-analysis, r=compiler-errors Handle `rustc_hir_analysis` cases of `potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_hir_analysis/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_analysis/src/lib.rs#L61) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-02Rollup merge of #131016 - madsmtm:no-sdk-version-in-object, r=jieyouxuMatthias Krüger-28/+145
Apple: Do not specify an SDK version in `rlib` object files This was added in https://github.com/rust-lang/rust/pull/114114, but is unnecessary, since it ends up being overwritten when linking anyhow, and it feels wrong to embed some arbitrary SDK version in here. The object files produced by LLVM also do not set this, and the tooling shows `n/a` when it's `0`, so it seems to genuinely be optional in object files. I've also added a test for the different places the SDK version shows up, and documented a bit more in the code how SDK versions work. See https://github.com/rust-lang/rust/issues/129432 for the bigger picture. Tested with (excludes the same few targets as in https://github.com/rust-lang/rust/pull/130435): ```console ./x test tests/run-make/apple-sdk-version --target aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7k-apple-watchos,armv7s-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin IPHONEOS_DEPLOYMENT_TARGET=10.0 ./x test tests/run-make/apple-sdk-version --target=i386-apple-ios ``` CC `@BlackHoleFox,` you [originally commented on these values](https://github.com/rust-lang/rust/pull/114114#discussion_r1300599445). `@rustbot` label O-apple
2024-10-02Rollup merge of #130863 - compiler-errors:relax-codegen-dyn-assert, r=lcnrMatthias Krüger-20/+66
Relax a debug assertion for dyn principal *equality* in codegen Maybe this sucks and I should just bite the bullet and use `infcx.sub` here. Thoughts? r? lcnr Fixes #130855
2024-10-02Auto merge of #125771 - Kobzol:ci-datadog-metrics, r=jdnobors-0/+91
[CI] Upload average CPU utilization of CI jobs to DataDog This PR adds a new CI step that uploads the average CPU utilization of the current GH job to Datadog. I want to add more metrics in follow-up PRs. r? `@jdno` try-job: dist-i686-msvc try-job: aarch64-apple try-job: x86_64-gnu-llvm-18
2024-10-02reviewlcnr-23/+31
2024-10-02Improve const traits diagnostics for new desugaringDeadbeef-168/+224
2024-10-02Replace zero-width whitespace with a visible `\`许杰友 Jieyou Xu (Joe)-1/+1
People tried to copy the `r?` which had an invisible zero-width whitespace, causing rustbot to not recognize the instruction, and which makes it difficult to figure out why it didn't work.
2024-10-02Auto merge of #131117 - AvatarSenju:helpstring-fix, r=onur-ozkanbors-1/+1
Update helper docs display disable option Updated helper docs via configure.py to make it clearer that users can control options with enable and disable Fixing issue #129146
2024-10-02only query `params_in_repr` if def kind is adtbohan-6/+45
2024-10-02Fix rustdoc-js-std path-ordering test due to API removalUrgau-1/+0
2024-10-02Auto merge of #13443 - SpriteOvO:simplify-option-neg-methods, r=xFrednetbors-20/+321
Simplify negative `Option::{is_some_and,is_none_or}` Closes #13436. Improved based on the existing lint `nonminimal_bool`, since there is already handling of similar methods `Option::{is_some,is_none}` and `Result::{is_ok,is_err}`, and there is a lot of reusable code. When `is_some_and` or `is_none_or` have a negation, we invert it into another method by removing the Not sign and inverting the expression in the closure. For the case where the closure block has statements, currently no simplification is implemented. (Should we do it?) ```rust // Currently will not simplify this _ = !opt.is_some_and(|x| { let complex_block = 100; x == complex_block }); ``` changelog: [`nonminimal_bool`]: Simplify negative `Option::{is_some_and,is_none_or}`
2024-10-02Adjust check-cfg get_many_mut usage following API changeUrgau-12/+12
2024-10-02Update hashbrown to 0.15 and adjust some methodsUrgau-117/+58
as well as removing some from std as they no longer exists in Hashbrown it-self.
2024-10-02Auto merge of #131143 - workingjubilee:rollup-4ke1tor, r=workingjubileebors-1355/+1589
Rollup of 3 pull requests Successful merges: - #130885 (panic when an interpreter error gets unintentionally discarded) - #131108 (Revert #131060 "Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags") - #131121 (A couple of fixes for dataflow graphviz dumps) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-02restore prior more readable suggestionJacob Kiesel-5/+6
2024-10-01Rollup merge of #131121 - lqd:dataflow-viz, r=compiler-errorsJubilee-12/+2
A couple of fixes for dataflow graphviz dumps A couple of trivial drive-by fixes to issues I noticed while debugging my buggy borrowck code: One is a fix of the `-Zdump-mir-dataflow` file extensions, the dataflow graphviz files are currently dumped as `..dot`. <details> ```console -rw-rw-r-- 1 lqd lqd 13051 Oct 1 23:21 mir_dump/issue_47680.main.-------.borrows.borrowck..dot -rw-rw-r-- 1 lqd lqd 13383 Oct 1 23:21 mir_dump/issue_47680.main.-------.ever_init.borrowck..dot -rw-rw-r-- 1 lqd lqd 13591 Oct 1 23:21 mir_dump/issue_47680.main.-------.maybe_init.borrowck..dot -rw-rw-r-- 1 lqd lqd 9257 Oct 1 23:21 mir_dump/issue_47680.main.-------.maybe_init.elaborate_drops..dot -rw-rw-r-- 1 lqd lqd 14086 Oct 1 23:21 mir_dump/issue_47680.main.-------.maybe_uninit.borrowck..dot -rw-rw-r-- 1 lqd lqd 9257 Oct 1 23:21 mir_dump/issue_47680.main.-------.maybe_uninit.elaborate_drops..dot ``` <summary>Some examples on nightly</summary> </details> And the other is for the specific `Borrows` dataflow analysis, whose domain is loans but shows locations when dumped (the location where the loan is introduced). It's not a huge deal but we didn't even print these locations in MIR dumps, and in general cross-referencing loan data (like loan liveness) is more annoying without this change. <details> ![Untitled](https://github.com/user-attachments/assets/b325a6e9-1aee-4655-8441-d3b1b55ded3c) <summary>Here's how it'll look in case inquisitive minds want to know</summary> </details> The visualization state diff display is still suboptimal in loops for some of the effects escaping a block, e.g. a gen that's not dominated/postdominated by a kill will not show up in statement diffs. (This happens in the previous screenshot, there's no `+bw1` anywhere). We can fix that in the future.