about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-04-18Rollup merge of #124100 - dev-ardi:master, r=workingjubileeMatthias Krüger-1/+1
fix: make `str::from_raw_parts_mut` `mut` `str::from_raw_parts_mut` wasn't actually `mut` #119206
2024-04-18Rollup merge of #124090 - durin42:llvm-19-riscv-feature, r=cuviperMatthias Krüger-7/+8
llvm: update riscv target feature to match LLVM 19 In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again. ``@rustbot`` label: +llvm-main
2024-04-18Rollup merge of #124064 - Zalathar:otherwise-block, r=NadrierilMatthias Krüger-3/+3
Move confusing comment about otherwise blocks in `lower_match_tree` This comment was historically inside a block guarded by `if let Some(otherwise_block) = otherwise`. When #120978 made the “otherwise block” non-optional, it also flattened that region of code. Doing so left this comment awkwardly stranded above an unrelated line of code, without its original context. We can restore that context by moving it above the declaration of `otherwise`. r? ``@Nadrieril``
2024-04-18Rollup merge of #124047 - Jules-Bertholet:match-ergonomics-cleanups, r=NadrierilMatthias Krüger-286/+254
Match ergonomics 2024: miscellaneous code cleanups - Store `ByRef` instead of `BindingAnnotation` in `PatInfo` - Rename `BindingAnnotation` to `BindingMode` r? ``@Nadrieril`` cc #123076 ``@rustbot`` label A-patterns
2024-04-18Rollup merge of #124041 - GuillaumeGomez:fix-copy-path-button, r=notriddleMatthias Krüger-25/+27
Fix copy path button Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in https://github.com/rust-lang/rust/pull/123706 forgot to update the JS (it contained an image before but not anymore). I had to make some small changes in the CSS to fix the display when the button was clicked as well. r? ``@notriddle``
2024-04-18Auto merge of #122684 - oli-obk:delay_interning_errors_to_after_validaiton, ↵bors-564/+405
r=RalfJung Delay interning errors to after validation fixes https://github.com/rust-lang/rust/issues/122398 fixes #122548 This improves diagnostics since validation errors are usually more helpful compared with interning errors that just make broad statements about the entire constant r? `@RalfJung`
2024-04-18Auto merge of #124044 - DianQK:update-llvm-18, r=cuviperbors-0/+0
Update LLVM to 1deeee3 Fixes #123772. Diff: https://github.com/rust-lang/llvm-project/compare/af8f9eb61a2ad4ee1f2d3f46d157b93a47c6a4bf...5399a24c66cb6164cf32280e7d300488c90d5765 Diff (From 18.1.2): https://github.com/rust-lang/llvm-project/compare/0af6c732ec6ca189cd7725e4a7d4290793046e83...5399a24c66cb6164cf32280e7d300488c90d5765 r? `@cuviper`
2024-04-18fix: make `str::from_raw_parts_mut` mutardi-1/+1
2024-04-17Auto merge of #123978 - alexcrichton:update-wasi-toolchain, r=Mark-Simulacrumbors-102/+94
Update how WASI toolchains are used in CI and bootstrap This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example. Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-17llvm: update riscv target feature to match LLVM 19Augie Fackler-7/+8
In llvm/llvm-project@9067070d91e9d8cdd8509ffa56a076f08a3d7281 they ended up largely reverting llvm/llvm-project@e81796671890b59c110f8e41adc7ca26f8484d20. This means the change we did in rust-lang/rust@b378059e6b2573c5356423fa31d184a89a3b6029 is now only corrct for LLVM 18...so we have to adjust again. @rustbot label: +llvm-main
2024-04-17Auto merge of #123936 - Mark-Simulacrum:zst-no-alloc, r=oli-obkbors-27/+63
Codegen ZSTs without an allocation This makes sure that &[] is equivalent to unsafe code (from_raw_parts(dangling, 0)). No new stable guarantee is intended about whether or not we do this, this is just an optimization. This regressed in #67000 (no comments I can see about that regression in the PR, though it did change the test modified here). We had previously performed this optimization since #63635.
2024-04-17Auto merge of #124084 - matthiaskrgr:rollup-h42psbx, r=matthiaskrgrbors-162/+402
Rollup of 9 pull requests Successful merges: - #116957 (meta: notify #t-rustdoc Zulip stream on backport nominations) - #122201 (Document overrides of `clone_from()` in core/std) - #122723 (Use same file permissions for ar_archive_writer as the LLVM archive writer) - #124030 (interpret: pass MemoryKind to adjust_alloc_base_pointer) - #124037 (Don't ascend into parent bodies when collecting stmts for possible return suggestion) - #124049 (Stabilize `const_io_structs`) - #124062 (Add another expression to weird-exprs.rs) - #124066 (Don't error on subtyping of equal types) - #124073 (Remove libc from rust_get_test_int uses) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-17Rollup merge of #124073 - saethlin:rust-get-test-int, r=wesleywiserMatthias Krüger-54/+18
Remove libc from rust_get_test_int uses `rust_test_helpers.c` has a few unfortunate signatures which have made some of our UI tests _technically_ need the `libc` crate. This is my attempt to evict the need of `libc` for `rust_get_test_int`. I've deleted `tests/ui/abi/foreign/foreign-no-abi.rs` because the test was originally written to check that `native mod` will compile without an ABI specifier. `native mod` was removed years before 1.0 and the test hasn't checked for anything for a long time.
2024-04-17Rollup merge of #124066 - oli-obk:define_opaque_types7, r=compiler-errorsMatthias Krüger-1/+1
Don't error on subtyping of equal types fixes https://github.com/rust-lang/rust/issues/124054 🤦 fixes #124075 fixes https://github.com/rust-lang/rust/issues/124079 r? `@compiler-errors`
2024-04-17Rollup merge of #124062 - allgoewer:fish-fight, r=oli-obkMatthias Krüger-0/+15
Add another expression to weird-exprs.rs I'm almost feeling bad for this but I decided I don't. Feel free to close if you don't approve.
2024-04-17Rollup merge of #124049 - slanterns:const_io_structs_stabilize, r=jhprattMatthias Krüger-7/+6
Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: https://github.com/rust-lang/rust/issues/78812. Implementation PR: https://github.com/rust-lang/rust/pull/78811. FCPs already completed in the tracking issue. Closes https://github.com/rust-lang/rust/issues/78812. ```@rustbot``` label: +T-libs-api r? libs-api
2024-04-17Rollup merge of #124037 - compiler-errors:dont-parent-body, r=michaelwoeristerMatthias Krüger-2/+45
Don't ascend into parent bodies when collecting stmts for possible return suggestion Fixes #124022
2024-04-17Rollup merge of #124030 - RalfJung:adjust_alloc_base_pointer, r=oli-obkMatthias Krüger-65/+85
interpret: pass MemoryKind to adjust_alloc_base_pointer Another puzzle piece for https://github.com/rust-lang/miri/pull/3475. The 2nd commit renames base_pointer -> root_pointer; that's how Tree Borrows already calls them and I think the term is more clear than "base pointer". In particular, this distinguishes it from "base address", since a root pointer can point anywhere into an allocation, not just its base address. https://github.com/rust-lang/rust/pull/124018 has been rolled up already so I couldn't add it there any more. r? ```@oli-obk```
2024-04-17Rollup merge of #122723 - bjorn3:archive_writer_fixes, r=nnethercoteMatthias Krüger-8/+51
Use same file permissions for ar_archive_writer as the LLVM archive writer This is required to switch to ar_archive_writer in the future without regressions. In addition to this PR support for reading thin archives needs to be added (https://github.com/rust-lang/rust/issues/107407) to fix all known regressions. Fixes https://github.com/rust-lang/rust/issues/107495
2024-04-17Rollup merge of #122201 - coolreader18:doc-clone_from, r=dtolnayMatthias Krüger-25/+133
Document overrides of `clone_from()` in core/std As mentioned in https://github.com/rust-lang/rust/pull/96979#discussion_r1379502413 Specifically, when an override doesn't just forward to an inner type, document the behavior and that it's preferred over simply assigning a clone of source. Also, change instances where the second parameter is "other" to "source". I reused some of the wording over and over for similar impls, but I'm not sure that the wording is actually *good*. Would appreciate feedback about that. Also, now some of these seem to provide pretty specific guarantees about behavior (e.g. will reuse the exact same allocation iff the len is the same), but I was basing it off of the docs for [`Box::clone_from`](https://doc.rust-lang.org/1.75.0/std/boxed/struct.Box.html#method.clone_from-1) - I'm not sure if providing those strong guarantees is actually good or not.
2024-04-17Rollup merge of #116957 - ↵Matthias Krüger-0/+48
fmease:meta-notify-rustdoc-zulip-on-backport-nominations, r=GuillaumeGomez meta: notify #t-rustdoc Zulip stream on backport nominations In July '23, it was decided to handle rustdoc-specific backport nominations in t-rustdoc meetings going forward ([Zulip announcement](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/T-rustdoc.20backports/near/374828518)). However, t-rustdoc meetings are far too infrequent for them to address nominations on time (contrary to the weekly t-compiler meetings). Hence GuillaumeGomez and I came to the conclusion that {beta,stable}-nominated rustdoc PRs should be dealt with on a case by case basis, e.g. on Zulip. This PR attempts to partially automate this process. ~~Sadly, `triagebot` is not quite as flexible has I've hoped. Blocked on `triagebot` improvements (see the `FIXME`s in this PR).~~ (Fixed in rust-lang/triagebot#1791). r? GuillaumeGomez
2024-04-17Add GUI test for copy path buttonGuillaume Gomez-0/+15
2024-04-17Fix copy-path buttonGuillaume Gomez-25/+12
2024-04-17Auto merge of #123674 - oli-obk:bogus_note, r=estebankbors-109/+55
Silence some follow-up errors on trait impls in case the trait has conflicting or otherwise incoherent impls fixes #123292 Also removes a bunch of extra diagnostics that were introduced in https://github.com/rust-lang/rust/pull/121154 and https://github.com/rust-lang/rust/pull/120558
2024-04-17Improve `BindingMode` doc commentJules Bertholet-2/+4
2024-04-17Rename `BindingAnnotation` to `BindingMode`Jules Bertholet-256/+222
2024-04-17Store `ByRef` instead of `BindingAnnotation` in `PatInfo`Jules Bertholet-30/+30
2024-04-17Remove libc from rust_get_test_int usesBen Kimock-54/+18
2024-04-17Use the default file permissions when writingbjorn3-9/+29
static libraries with ar_archive_writer Fixes #107495
2024-04-17Add regression test for #107495bjorn3-0/+23
2024-04-17Don't error on subtyping of equal typesOli Scherer-1/+1
2024-04-17Move confusing comment about otherwise blocks in `lower_match_tree`Zalathar-3/+3
This comment was historically inside a block guarded by `if let Some(otherwise_block) = otherwise`. When #120978 made the otherwise block non-optional, it also flattened that region of code. Doing so left this comment awkwardly stranded above an unrelated line of code, without its original context. We can restore that context by moving it above the declaration of `otherwise`.
2024-04-17Use less fragile error handlingOli Scherer-18/+16
2024-04-17Validate before reporting interning errors.Oli Scherer-513/+253
validation produces much higher quality errors and already handles most of the cases
2024-04-17Simplify alloc id mutability checkOli Scherer-10/+15
2024-04-17Deduplicate logic for checking the mutability of allocationsOli Scherer-79/+75
2024-04-17Run the "is this static mutable" logic the same way as in `in_mutable_memory`Oli Scherer-14/+16
2024-04-17Validate nested static itemsOli Scherer-85/+185
2024-04-17Auto merge of #123678 - DianQK:docker-local, r=Kobzolbors-14/+17
Improve the experience of running Docker locally When running locally, the absence of the `GITHUB_STEP_SUMMARY` environment variable will lead to the following error: ``` ::endgroup:: ./src/ci/docker/run.sh: line 349: : No such file or directory ``` I've also changed the output artifacts directory to `obj/$image_name`, allowing me to easily run all images locally. We always encounter various strange issues when modifying the test cases in the `codegen` directory. r? Kobzol cc `@saethlin`
2024-04-17interpret: rename base_pointer -> root_pointerRalf Jung-53/+53
also in Miri, "base tag" -> "root tag"
2024-04-17interpret: pass MemoryKind to adjust_alloc_base_pointerRalf Jung-18/+38
2024-04-17Address commentsNoa-4/+2
2024-04-17Auto merge of #124055 - matthiaskrgr:rollup-waq2e68, r=matthiaskrgrbors-509/+810
Rollup of 6 pull requests Successful merges: - #122813 (Qualifier tweaking) - #122883 (refactor clippy in bootstrap) - #123997 (Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}`) - #124045 (Reinstate nnethercote to the review rotation.) - #124051 (Fix empty-set symbol in comments) - #124052 (Make the comments for `ReturnDest` variants doc comments) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-17Rollup merge of #124052 - beetrees:return-dest-doc-comment, r=fmeaseMatthias Krüger-4/+4
Make the comments for `ReturnDest` variants doc comments This PR converts the documentation for `ReturnDest` from comments to doc comments.
2024-04-17Rollup merge of #124051 - dtolnay:emptyset, r=compiler-errorsMatthias Krüger-3/+3
Fix empty-set symbol in comments The symbol in the original code is U+00D8 "LATIN CAPITAL LETTER O WITH STROKE" (https://en.wikipedia.org/wiki/%C3%98) which is an uppercase letter in Danish, Norwegian, Faroese, and Southern Sámi alphabets. The symbol that was intended is U+2205 "EMPTY SET" (https://en.wikipedia.org/wiki/Empty_set#Notation). | Before | After | |---|---| | ![Screenshot from 2024-04-16 18-25-01](https://github.com/rust-lang/rust/assets/1940490/9b8b0624-cfa5-4b89-84e5-4c2b39c2cb8f) | ![Screenshot from 2024-04-16 18-25-05](https://github.com/rust-lang/rust/assets/1940490/6f6b34c3-0e47-4ba0-856d-be1dc164c94c) |
2024-04-17Rollup merge of #124045 - nnethercote:add-nnethercote-review, r=nnethercoteMatthias Krüger-0/+4
Reinstate nnethercote to the review rotation. I'm back from vacation. r? nnethercote
2024-04-17Rollup merge of #123997 - compiler-errors:self-res, r=fmeaseMatthias Krüger-0/+58
Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}` Catch the case where `kw::Self` is recovered in the parser and causes us to subsequently resolve `&self`'s implicit type to something that's not a type. This check could be made more accurate, though I'm not sure how hard we have to try here. Fixes #123988
2024-04-17Rollup merge of #122883 - onur-ozkan:clippy-build-step, r=albertlarsan68Matthias Krüger-103/+395
refactor clippy in bootstrap Previously, using clippy in bootstrap was not very useful as explained in #122825. In short, regardless of the given path clippy would always check the entire compiler and std tree. This makes it impossible to run clippy on different paths with different set of rules. This PR fixes that by allowing developers to run clippy with specific rules on specific paths (e.g., we can run `x clippy compiler -Aclippy::all -Dclippy::correctness` and `x clippy library/std -Dclippy::all` and none of them will affect each other). Resolves #122825
2024-04-17Rollup merge of #122813 - nnethercote:nicer-quals, r=compiler-errorsMatthias Krüger-399/+346
Qualifier tweaking Adding and removing qualifiers in some cases that make things nicer. Details in individual commits. r? `@compiler-errors`
2024-04-17Make the comments for `ReturnDest` variants doc commentsbeetrees-4/+4