about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-07-22Sync `mut_visit` function names with immut `visit` ones (s/noop_visit/walk/)Oli Scherer-235/+226
2024-07-22Add `Ident` to `FnKind::Fn`, just like with the immutable visitorOli Scherer-8/+17
2024-07-22Split up `visit_path` so `MutVisitor` has a `path_segment` method just like ↵Oli Scherer-4/+13
the immutable visitor
2024-07-22Pass id and span to `visit_fn`, just like for the immutable visitorOli Scherer-17/+47
2024-07-22Make function items in mut visitors all go through the same visit_fn ↵Oli Scherer-42/+64
function, just like with immutable visitors
2024-07-22Track visit_param_bound in mut visit just like in the immutable visitorOli Scherer-15/+15
2024-07-22Merge impl and trait item mut visitor methods to mirror immut visitorOli Scherer-65/+62
2024-07-22Auto merge of #128056 - jieyouxu:rollup-zb1y27e, r=jieyouxubors-604/+2736
Rollup of 8 pull requests Successful merges: - #127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - #127415 (Add missing try_new_uninit_slice_in and try_new_zeroed_slice_in) - #127510 (Rewrite `test-float-parse` in Rust) - #127977 (Update wasi-sdk in CI to latest release) - #127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - #127996 (Clean up warnings + `unsafe_op_in_unsafe_fn` when building std for armv6k-nintendo-3ds) - #128035 (Add test for #125837) - #128054 (mw triagebot vacation) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-22Rollup merge of #128054 - michaelwoerister:mwoff072024, r=jieyouxu许杰友 Jieyou Xu (Joe)-1/+1
mw triagebot vacation I'll be away from computers for a couple of weeks.
2024-07-22Rollup merge of #128035 - tiif:issue-125837, r=lcnr许杰友 Jieyou Xu (Joe)-0/+58
Add test for #125837 Fixes #125837
2024-07-22Rollup merge of #127996 - ↵许杰友 Jieyou Xu (Joe)-2/+3
ian-h-chamberlain:fix/horizon-warnings-unsafe-in-unsafe, r=tgross35 Clean up warnings + `unsafe_op_in_unsafe_fn` when building std for armv6k-nintendo-3ds See #127747 ping `@AzureMarker` `@Meziu` I could only find one instance needing an extra `unsafe` that was not also shared with many other `unix` targets (presumably these will get covered in larger sweeping changes, I didn't want to introduce churn that would potentially conflict with those). The one codepath I found is shared with `vita` however, so also pinging `@nikarh` `@pheki` `@zetanumbers` just to make sure they're aware of this change. Also removed one unused import from `process_unsupported` which should simply fix the warning for any target that uses it.
2024-07-22Rollup merge of #127985 - Oneirical:testibule-of-hell, r=Kobzol许杰友 Jieyou Xu (Joe)-36/+60
Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
2024-07-22Rollup merge of #127977 - alexcrichton:update-wasi-sdk, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-6/+19
Update wasi-sdk in CI to latest release This commit updates the `wasi-sdk` download used by the `wasm32-wasi*` targets. The motivation for this commit is generally just "keep things up to date" and is not intended to cause any issues or differences from before, just a routine update.
2024-07-22Rollup merge of #127510 - tgross35:test-float-parse-update, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-555/+2509
Rewrite `test-float-parse` in Rust Migrate from the currently broken Rust + Python `test-float-parse` to a Rust implementation. This newer version should be significantly faster (tests execute in parallel with threads, rather than series across multiple processes, which also eliminates the "...the worker processes are leaked and stick around forever" message), and should be significantly easier to extend to the new float types. Since this is faster and hopefully more stable, we should be able to launch it with `x` and run the faster tests in CI.
2024-07-22Rollup merge of #127415 - AljoschaMeyer:master, r=dtolnay许杰友 Jieyou Xu (Joe)-2/+81
Add missing try_new_uninit_slice_in and try_new_zeroed_slice_in The methods for fallible slice allocation in a given allocator were missing from `Box`, which was an oversight according to https://github.com/rust-lang/wg-allocators/issues/130 This PR adds them as `try_new_uninit_slice_in` and `try_new_zeroed_slice_in`. I simply copy-pasted the implementations of `try_new_uninit_slice` and `try_new_zeroed_slice` and adusted doc comment, typings, and the allocator it uses internally. Also adds missing punctuation to the doc comments of `try_new_uninit_slice` and `try_new_zeroed_slice`. Related issue is https://github.com/rust-lang/rust/issues/32838 (Allocator traits and std::heap) *I think*. Also relevant is https://github.com/rust-lang/rust/issues/63291, but I did not add the corresponding `#[unstable]` proc macro, since `try_new_uninit_slice` and `try_new_zeroed_slice` are also not annotated with it.
2024-07-22Rollup merge of #127177 - bjorn3:arm64_macos_cg_clif, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-2/+5
Distribute rustc_codegen_cranelift for arm64 macOS Support for arm64 macOS has been added to rustc_codegen_cranelift recently. Fixes https://github.com/rust-lang/rustc_codegen_cranelift/issues/1502
2024-07-22mw out of officeMichael Woerister-1/+1
2024-07-22Use given allocator instad of GlobalAljoscha Meyer-2/+2
2024-07-22Auto merge of #127442 - saethlin:alloc-decoding-lock, r=oli-obkbors-89/+25
Try to fix ICE from re-interning an AllocId with different allocation contents As far as I can tell, based on my investigation in https://github.com/rust-lang/rust/issues/126741, the racy decoding scheme implemented here was never fully correct, but the arrangement of Allocations that's required to ICE the compiler requires some very specific MIR optimizations to create. As far as I can tell, GVN likes to create the problematic pattern, which is why we're noticing this problem now. So the solution here is to not do racy decoding. If two threads race to decoding an AllocId, one of them is going to sit on a lock until the other is done.
2024-07-22Auto merge of #128048 - workingjubilee:rollup-gehtjxd, r=workingjubileebors-57/+172
Rollup of 6 pull requests Successful merges: - #127583 (Deal with invalid UTF-8 from `gai_strerror`) - #128014 (Fix stab display in doc blocks) - #128020 (Just totally fully deny late-bound consts) - #128023 (rustdoc: short descriptions cause word-breaks in tables) - #128033 (Explain why we require `_` for empty patterns) - #128038 (Don't output incremental test artifacts into working directory) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-21Rollup merge of #128038 - compiler-errors:inc-fat, r=oli-obkJubilee-2/+2
Don't output incremental test artifacts into working directory Currently tests can ICE when the test spits out `inc-fat` incremental artifacts directly into the top of the git checkout, and then the compiler version changes, and it reads nonsense incremental artifacts on a subsequent test run. r? `@oli-obk` cc `@Oneirical,` I think you added this -- I think the right flag to add when porting `-Cincremental` run-make tests is to use `//@ incremental` rather than manually specifying the `-Cincremental` rustflag.
2024-07-21Rollup merge of #128033 - Nadrieril:explain-empty-wildcards, r=compiler-errorsJubilee-17/+37
Explain why we require `_` for empty patterns This adds a note to the "non-exhaustive patterns" diagnostic to explain why we sometimes require extra `_` patterns on empty types. This is one of the two diagnostic improvements I wanted to do before [stabilizing `min_exhaustive_patterns`](https://github.com/rust-lang/rust/pull/122792). r? ``@compiler-errors``
2024-07-21Rollup merge of #128023 - Kijewski:pr-table-width, r=notriddleJubilee-0/+1
rustdoc: short descriptions cause word-breaks in tables The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases). [![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2) The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
2024-07-21Rollup merge of #128020 - compiler-errors:nlb-no-const, r=BoxyUwUJubilee-30/+110
Just totally fully deny late-bound consts Kinda don't care about supporting this until we have where clauses on binders. They're super busted and should be reworked in due time, and they are approximately 100% useless until then 😸 Fixes #127970 Fixes #127009 r? ``@BoxyUwU``
2024-07-21Rollup merge of #128014 - GuillaumeGomez:stab-in-doc-blocks, r=notriddleJubilee-6/+19
Fix stab display in doc blocks Went across this bug randomly: ![Screenshot from 2024-07-20 22-09-49](https://github.com/user-attachments/assets/89fdf427-b00e-4fcb-9d57-078bcb1bacd9) With the fixed CSS: ![Screenshot from 2024-07-20 22-10-14](https://github.com/user-attachments/assets/eda9a1a6-6a12-408f-bd3a-25bb3397d163) r? ```@notriddle```
2024-07-21Rollup merge of #127583 - Nilstrieb:invalid-utf8, r=joboetJubilee-2/+3
Deal with invalid UTF-8 from `gai_strerror` When the system is using a non-UTF-8 locale, the value will indeed not be UTF-8. That sucks for everyone involved, but is no reason for panic. We can "handle" this gracefully by just using from lossy, replacing the invalid UTF-8 with � and keeping the accidentally valid UTF-8. Good luck when debugging, but at least it's not a crash. We already do this for `strerror_r`. fixes #127563
2024-07-21Fix warnings when checking armv6k-nintendo-3dsIan Chamberlain-2/+3
Also fix one instance of unsafe_op_in_unsafe_fn that's specific to horizon + vita - most others should be common with other code.
2024-07-21Auto merge of #120812 - compiler-errors:impl-sorting, r=lcnrbors-95/+75
Remove unnecessary impl sorting in queries and metadata Removes unnecessary impl sorting because queries already return their keys in HIR definition order: https://github.com/rust-lang/rust/issues/120371#issuecomment-1926422838 r? `@cjgillot` or `@lcnr` -- unless I totally misunderstood what was being asked for here? 😆 fixes #120371
2024-07-21Don't output test artifacts into working directoryMichael Goulet-2/+2
2024-07-21Run `test-float-parse` as part of CITrevor Gross-0/+1
With the previous improvements, it is now possible to run float parsing tests as part of CI. Enable it here. This only runs a subset of tests, which takes about one minute.
2024-07-21Explain why the new setup can't deadlockBen Kimock-1/+13
2024-07-21Add testtiif-0/+58
2024-07-21Explain why we require `_` for empty patternsNadrieril-0/+14
2024-07-21Tweak `collect_non_exhaustive_tys`Nadrieril-17/+23
2024-07-21Deal with invalid UTF-8 from `gai_strerror`Nilstrieb-2/+3
When the system is using a non-UTF-8 locale, the value will indeed not be UTF-8. That sucks for everyone involved, but is no reason for panic. We can "handle" this gracefully by just using from lossy, replacing the invalid UTF-8 with the ? and keeping the accidentally valid UTF-8. Good luck when debugging, but at least it's not a crash. We already do this for `strerror_r`.
2024-07-21Update `source-code-page-code-scroll.goml` GUI testGuillaume Gomez-2/+2
2024-07-21Add regression test for stab display in doc blocksGuillaume Gomez-4/+13
2024-07-21Auto merge of #127993 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in a2b58c3dad4d554ba01ed6c45c41ff85390560f2..5f6b9a92201d78af75dc24f14662c3e2dacbbbe1 2024-07-16 00:52:02 +0000 to 2024-07-19 18:09:17 +0000 - Add `TomlPackage::new`, `Default` for `TomlWorkspace` (rust-lang/cargo#14271) - fix(test): Move 'cargo_home' from 'install' to 'paths' (rust-lang/cargo#14270) - fix(test)!: Clarify extension trait role with rename (rust-lang/cargo#14269) - feat(test): Re-export ProcessBuilder (rust-lang/cargo#14268) - fix(test): Move path2url to CargoPathExt::to_url (rust-lang/cargo#14266) - Fix passing of links-overrides with target-applies-to-host and an implicit target (rust-lang/cargo#14205) - fix(toml): Improve error on missing package and workspace (rust-lang/cargo#14261) - Migrate global_cache_tracker snapbox (rust-lang/cargo#14244) - make summary sync by using Arc not Rc (rust-lang/cargo#14260)
2024-07-21Auto merge of #127722 - BoxyUwU:new_adt_const_params_limitations, ↵bors-543/+1242
r=compiler-errors Forbid borrows and unsized types from being used as the type of a const generic under `adt_const_params` Fixes #112219 Fixes #112124 Fixes #112125 ### Motivation Currently the `adt_const_params` feature allows writing `Foo<const N: [u8]>` this is entirely useless as it is not possible to write an expression which evaluates to a type that is not `Sized`. In order to actually use unsized types in const generics they are typically written as `const N: &[u8]` which *is* possible to provide a value of. Unfortunately allowing the types of const parameters to contain references is non trivial (#120961) as it introduces a number of difficult questions about how equality of references in the type system should behave. References in the types of const generics is largely only useful for using unsized types in const generics. This PR introduces a new feature gate `unsized_const_parameters` and moves support for `const N: [u8]` and `const N: &...` from `adt_const_params` into it. The goal here hopefully is to experiment with allowing `const N: [u8]` to work without references and then eventually completely forbid references in const generics. Splitting this out into a new feature gate means that stabilization of `adt_const_params` does not have to resolve #120961 which is the only remaining "big" blocker for the feature. Remaining issues after this are a few ICEs and naming bikeshed for `ConstParamTy`. ### Implementation The implementation is slightly subtle here as we would like to ensure that a stabilization of `adt_const_params` is forwards compatible with any outcome of `unsized_const_parameters`. This is inherently tricky as we do not support unstable trait implementations and we determine whether a type is valid as the type of a const parameter via a trait bound. There are a few constraints here: - We would like to *allow for the possibility* of adding a `Sized` supertrait to `ConstParamTy` in the event that we wind up opting to not support unsized types and instead requiring people to write the 'sized version', e.g. `const N: [u8; M]` instead of `const N: [u8]`. - Crates should be able to enable `unsized_const_parameters` and write trait implementations of `ConstParamTy` for `!Sized` types without downstream crates that only enable `adt_const_params` being able to observe this (required for std to be able to `impl<T> ConstParamTy for [T]` Ultimately the way this is accomplished is via having two traits (sad), `ConstParamTy` and `UnsizedConstParamTy`. Depending on whether `unsized_const_parameters` is enabled or not we change which trait is used to check whether a type is allowed to be a const parameter. Long term (when stabilizing `UnsizedConstParamTy`) it should be possible to completely merge these traits (and derive macros), only having a single `trait ConstParamTy` and `macro ConstParamTy`. Under `adt_const_params` it is now illegal to directly refer to `ConstParamTy` it is only used as an internal impl detail by `derive(ConstParamTy)` and checking const parameters are well formed. This is necessary in order to ensure forwards compatibility with all possible future directions for `feature(unsized_const_parameters)`. Generally the intuition here should be that `ConstParamTy` is the stable trait that everything uses, and `UnsizedConstParamTy` is that plus unstable implementations (well, I suppose `ConstParamTy` isn't stable yet :P).
2024-07-21Auto merge of #127715 - klensy:tests-w, r=Mark-Simulacrumbors-5/+0
reenable some windows tests Locally passing on `x86_64-pc-windows-msvc`, fingers crossed for `*-pc-windows-gnu`. try-job: x86_64-msvc try-job: x86_64-mingw
2024-07-21Auto merge of #128011 - matthiaskrgr:rollup-0vmf75y, r=matthiaskrgrbors-280/+458
Rollup of 8 pull requests Successful merges: - #127720 ([`macro_metavar_expr_concat`] Allow `concat` in repetitions) - #127734 (Windows: move BSD socket shims to netc) - #127752 (Ignore allocation bytes in one more mir-opt test) - #127839 (Fix git safe-directory path for docker images) - #127867 (Add `wasm32-wasip2` to `build-manifest` tool) - #127958 (Cleanup rmake.rs setup in compiletest) - #127975 (Fix trait bounds display) - #128005 (Remove _tls_used hack) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-21rustdoc: short descr. cause word-breaks in tablesRené Kijewski-0/+1
The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. Signed-off-by: René Kijewski <rene.kijewski@fu-berlin.de>
2024-07-20Just totally fully deny late-bound constsMichael Goulet-30/+110
2024-07-20Auto merge of #128007 - Mark-Simulacrum:bump-version, r=Mark-Simulacrumbors-1/+2
Bump to 1.82 https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-t-6-days-friday-the-week-before r? `@Mark-Simulacrum`
2024-07-20Fix stab display in doc blocksGuillaume Gomez-0/+4
2024-07-20Allow deprecated temporarily to unblock version bumpMark Rousskov-0/+1
2024-07-20Auto merge of #127663 - Oneirical:fuzzy-testure, r=jieyouxubors-82/+154
Migrate 9 more very similar FFI `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). For the tracking issue: - return-non-c-like-enum-from-c - pass-non-c-like-enum-to-c - c-static-dylib - c-static-rlib - extern-fn-generic - extern-fn-with-union - lto-no-link-whole-rlib - linkage-attr-on-static - issue-28595
2024-07-20Rollup merge of #128005 - ChrisDenton:msvc-include, r=joboetMatthias Krüger-13/+0
Remove _tls_used hack All the MSVC targets use `target_thread_locals` (see the [base spec](https://github.com/rust-lang/rust/blob/1afc5fd042f7583b9668dd62be98325487483d1c/compiler/rustc_target/src/spec/base/windows_msvc.rs#L34)) so this hack is no longer needed. The compiler will ensure that thread locals work properly.
2024-07-20Rollup merge of #127975 - GuillaumeGomez:fix-trait-bounds-display, r=notriddleMatthias Krüger-16/+68
Fix trait bounds display Fixes https://github.com/rust-lang/rust/issues/127398. I took a simple rule: if there are more than two bounds, we display them like rustfmt. Before this PR: ![Screenshot from 2024-07-19 17-38-59](https://github.com/user-attachments/assets/4162b57e-7ebb-48f9-a3a1-25e443c140cb) After this PR: ![Screenshot from 2024-07-19 17-39-09](https://github.com/user-attachments/assets/a3ba22dd-5f34-45d0-ad9d-0cdf89dc509c) r? `@notriddle`
2024-07-20Rollup merge of #127958 - jieyouxu:compiletest-rmake-cleanup, r=KobzolMatthias Krüger-92/+186
Cleanup rmake.rs setup in compiletest While debugging rmake.rs tests I realized that the rmake.rs setup itself in compiletest is very messy and confused. Now that I know some of the bootstrap steps and the rmake.rs tests themselves better, I realized there are cleanups that are possible: - Rework how `source_root` and `build_root` are calculated. They should now be less fragile then before. - Shuffle around path calculations to make them more logically grouped and closer to eventual use site(s). - Cleanup executable extension calculation with `std::env::consts::EXE_EXTENSION`. - Cleanup various dylib search path handling: renamed variables to better reflect their purpose, minimized mutability scope of said variables. - Prune useless env vars passed to both `rustc` and recipe binary commands. - Vastly improve the documentation for the setup of rmake.rs tests, including assumed bootstrap-provided build layouts, rmake.rs test layout, dylib search paths, intended purpose of passed env vars and the `COMPILETEST_FORCE_STAGE0=1 ./x test run-make --stage 0` stage0 sysroot special handling. This PR is best reviewed commit-by-commit. Fixes https://github.com/rust-lang/rust/issues/127920. r? bootstrap (or Kobzol, or Mark, or T-compiler) try-job: aarch64-apple try-job: armhf-gnu try-job: dist-x86_64-linux try-job: test-various try-job: x86_64-mingw try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18