about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-05-24A small diagnostic improvement for dropping_copy_typessurechen-11/+169
fixes #125189
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-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-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-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-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-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
2024-04-17Auto merge of #124039 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 11 commits in 48eca1b164695022295ce466b64b44e4e0228b08..6f06fe908a5ee0f415c187f868ea627e82efe07d 2024-04-12 21:16:36 +0000 to 2024-04-16 18:47:44 +0000 - fix(toml): Error on `[project]` in Edition 2024 (rust-lang/cargo#13747) - feat(update): Include a Locking message (rust-lang/cargo#13759) - chore(deps): update rust crate gix to 0.62.0 [security] (rust-lang/cargo#13760) - test(schemas): Ensure tests cover the correct case (rust-lang/cargo#13761) - feat(resolve): Tell the user the style of resovle done (rust-lang/cargo#13754) - Make sure to also wrap the initial `-vV` invocation (rust-lang/cargo#13659) - docs: update `checkout` GitHub action version (rust-lang/cargo#13757) - Recategorize cargo test's `--doc` flag under "Target Selection" (rust-lang/cargo#13756) - Reword sentence describing workspace toml for clarity (rust-lang/cargo#13753) - docs(ref): Update unstable docs for msrv-policy (rust-lang/cargo#13751) - refactor(config): Consistently use kebab-case (rust-lang/cargo#13748) r? ghost
2024-04-16Fix empty-set symbol in commentsDavid Tolnay-3/+3
2024-04-16Fix broken testMark Rousskov-1/+1
Testing for ASLR by casting &ZST to *const _ is not useful, there's no guarantee that &ZST produces an ASLR'd pointer.
2024-04-16Codegen ZSTs without an allocationMark Rousskov-26/+62
This makes sure that &[] is just as efficient as indirecting through unsafe code (from_raw_parts). No new stable guarantee is intended about whether or not we do this, this is just an optimization. Co-authored-by: Ralf Jung <post@ralfj.de>
2024-04-17Stabilize `const_io_structs`Slanterns-7/+6
2024-04-17Auto merge of #124040 - GuillaumeGomez:rollup-hrrvsgh, r=GuillaumeGomezbors-106/+363
Rollup of 7 pull requests Successful merges: - #123673 (Don't ICE for kind mismatches during error rendering) - #123675 (Taint const qualifs if a static is referenced that didn't pass wfcheck) - #123975 (Port the 2 `rust-lld` run-make tests to `rmake`) - #124000 (Use `/* value */` as a placeholder) - #124013 (Box::into_raw: make Miri understand that this is a box-to-raw cast) - #124027 (Prefer identity equality over equating types during coercion.) - #124036 (Remove `default_hidden_visibility: false` from wasm targets) r? `@ghost` `@rustbot` modify labels: rollup
2024-04-17Reinstate nnethercote to the review rotation.Nicholas Nethercote-0/+4
2024-04-17Update LLVM to 1deeee3DianQK-0/+0
2024-04-17Rollup merge of #124036 - alexcrichton:wasm-use-default-visbility, r=jieyouxuGuillaume Gomez-3/+0
Remove `default_hidden_visibility: false` from wasm targets To the best of my ability I believe that this is no longer necessary. I don't fully recall why this was first added but I believe it had to do with symbols all being exported by default and this was required to undo that. Regardless nowadays the default output of rustc seems suitable so it seems best to keep wasm in line with other targets.
2024-04-17Rollup merge of #124027 - oli-obk:define_opaque_types9, r=compiler-errorsGuillaume Gomez-22/+13
Prefer identity equality over equating types during coercion. These types are always generic only over their own generic parameters with no inference variables involved. r? `@compiler-errors` I love touching code that [hasn't changed meaningfully since 2016](https://github.com/rust-lang/rust/pull/41937)
2024-04-17Rollup merge of #124013 - RalfJung:box-to-raw, r=oli-obkGuillaume Gomez-4/+48
Box::into_raw: make Miri understand that this is a box-to-raw cast Turns out https://github.com/rust-lang/rust/pull/122647 went a bit too far in cleaning up `Box`... we still need a hack in `Box::into_raw`. The nicer fix would be to make Stacked Borrows not care about reference-to-raw-pointer casts, but it's unclear whether that will ever be possible without going to full Tree Borrows. Fixes https://github.com/rust-lang/miri/issues/3473.
2024-04-17Rollup merge of #124000 - compiler-errors:sugg-tweaks, r=wesleywiserGuillaume Gomez-34/+41
Use `/* value */` as a placeholder The expression `value` isn't a valid suggestion; let's use `/* value */` as a placeholder (which is also invalid) since it more clearly signals to the user that they need to fill it in with something meaningful. This parallels the suggestions we have in a couple other places, like arguments. We could also print the type name instead of `/* value */`, especially if it's suggestable, but I don't care strongly about that.
2024-04-17Rollup merge of #123975 - lqd:rust-lld-tests, r=jieyouxuGuillaume Gomez-23/+126
Port the 2 `rust-lld` run-make tests to `rmake` In preparation for finalizing most of the `rust-lld` work, this PR ports the following tests to `rmake`: - `tests/run-make/rust-lld` - `tests/run-make/rust-lld-custom-target` As they use `$(CGREP) -e` I added `regex` as an exported dependency to the `run_make_support` library. Unfortunately, the most recent versions depend on `memchr` 2.6.0 but it's currently pinned at 2.5.0 in the workspace, and therefore had to settle for the older `regex-1.8.0`. r? `@jieyouxu`
2024-04-17Rollup merge of #123675 - oli-obk:static_wf_ice, r=compiler-errorsGuillaume Gomez-17/+63
Taint const qualifs if a static is referenced that didn't pass wfcheck It is correct to only check the signature here, as the ICE is caused by `USE_WITH_ERROR` trying to allocate memory to store the result of `WITH_ERROR` before evaluating it. fixes #123153
2024-04-17Rollup merge of #123673 - oli-obk:sig_wfcheck_ice, r=jieyouxu,estebankGuillaume Gomez-3/+72
Don't ICE for kind mismatches during error rendering fixes #123457 also some test suite cleanups to make backtraces easier to read
2024-04-16Auto merge of #123537 - compiler-errors:shallow, r=lcnrbors-125/+96
Simplify shallow resolver to just fold ty/consts Probably faster than using a whole folder?
2024-04-16Add another expression to weird-exprs.rsMaik Allgöwer-0/+15
2024-04-16Update cargoWeihang Lo-0/+0
2024-04-16Don't proceed into parent bodies when collecting stmts for possible return ↵Michael Goulet-2/+45
suggestion