about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-05-29Teach rustc about the Xtensa arch.Scott Mabin-0/+8
2024-05-29Add Xtensa as an experimental targetScott Mabin-1/+8
2024-05-29Auto merge of #125695 - RalfJung:fn_arg_sanity_check, r=jieyouxubors-1/+3
fn_arg_sanity_check: fix panic message The `\n` inside a raw string doesn't actually make a newline...
2024-05-29fn_arg_sanity_check: fix panic messageRalf Jung-1/+3
also update csky comment in abi/compatibility test
2024-05-29Auto merge of #125433 - surechen:fix_125189, r=Urgaubors-11/+169
A small diagnostic improvement for dropping_copy_types For a value `m` which implements `Copy` trait, `drop(m);` does nothing. We now suggest user to ignore it by a abstract and general note: `let _ = ...`. I think we can give a clearer note here: `let _ = m;` fixes #125189 <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r​? <reviewer name> -->
2024-05-29Auto merge of #125691 - jieyouxu:rollup-0i3wrc4, r=jieyouxubors-465/+1278
Rollup of 8 pull requests Successful merges: - #124251 (Add an intrinsic for `ptr::metadata`) - #124320 (Add `--print=check-cfg` to get the expected configs) - #125226 (Make more of the test suite run on Mac Catalyst) - #125381 (Silence some resolve errors when there have been glob import errors) - #125633 (miri: avoid making a full copy of all new allocations) - #125638 (Rewrite `lto-smoke`, `simple-rlib` and `mixing-deps` `run-make` tests in `rmake.rs` format) - #125639 (Support `./x doc run-make-support --open`) - #125664 (Tweak relations to no longer rely on `TypeTrace`) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-29Rollup merge of #125664 - compiler-errors:trace-tweaks, r=lcnr许杰友 Jieyou Xu (Joe)-149/+96
Tweak relations to no longer rely on `TypeTrace` Remove `At::trace`, and inline all of the `Trace::equate`,etc methods into `At`. The only nontrivial change is that we use `AliasTerm` to relate two unevaluated consts in the old-solver impl of `ConstEquate`, since `AliasTerm` does implement `ToTrace` and will relate the args structurally (shallowly). r? lcnr
2024-05-29Rollup merge of #125639 - ChrisDenton:run-make-support-doc, r=onur-ozkan许杰友 Jieyou Xu (Joe)-3/+12
Support `./x doc run-make-support --open` Having easy access to the run-make-support documentation is invaluable when creating run-make tests using the new Rust recipes.
2024-05-29Rollup merge of #125638 - Oneirical:lets-find-some-tests, r=jieyouxu许杰友 Jieyou Xu (Joe)-54/+43
Rewrite `lto-smoke`, `simple-rlib` and `mixing-deps` `run-make` tests in `rmake.rs` format 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-05-29Rollup merge of #125633 - RalfJung:miri-no-copy, r=saethlin许杰友 Jieyou Xu (Joe)-85/+92
miri: avoid making a full copy of all new allocations Hopefully fixes https://github.com/rust-lang/miri/issues/3637 r? ``@saethlin``
2024-05-29Rollup merge of #125381 - estebank:issue-96799, r=petrochenkov许杰友 Jieyou Xu (Joe)-19/+131
Silence some resolve errors when there have been glob import errors When encountering `use foo::*;` where `foo` fails to be found, and we later encounter resolution errors, we silence those later errors. A single case of the above, for an *existing* import on a big codebase would otherwise have a huge number of knock-down spurious errors. Ideally, instead of a global flag to silence all subsequent resolve errors, we'd want to introduce an unnameable binding in the appropriate rib as a sentinel when there's a failed glob import, so when we encounter a resolve error we can search for that sentinel and if found, and only then, silence that error. The current approach is just a quick proof of concept to iterate over. Partially address #96799.
2024-05-29Rollup merge of #125226 - madsmtm:fix-mac-catalyst-tests, r=workingjubilee许杰友 Jieyou Xu (Joe)-100/+120
Make more of the test suite run on Mac Catalyst Combined with https://github.com/rust-lang/rust/pull/125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with: ```console ./x test --target=aarch64-apple-ios-macabi library/std ./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests ``` Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`? Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see https://github.com/rust-lang/rust/issues/25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either). r? ``@workingjubilee`` CC ``@thomcc`` ``@rustbot`` label O-ios O-apple
2024-05-29Rollup merge of #124320 - Urgau:print-check-cfg, r=petrochenkov许杰友 Jieyou Xu (Joe)-2/+184
Add `--print=check-cfg` to get the expected configs This PR adds a new `--print` variant `check-cfg` to get the expected configs. Details and rational can be found on the MCP: https://github.com/rust-lang/compiler-team/issues/743 ``@rustbot`` label +F-check-cfg +S-waiting-on-MCP r? ``@petrochenkov``
2024-05-29Rollup merge of #124251 - scottmcm:unop-ptr-metadata, r=oli-obk许杰友 Jieyou Xu (Joe)-53/+600
Add an intrinsic for `ptr::metadata` The follow-up to #123840, so we can remove `PtrComponents` and `PtrRepr` from libcore entirely (well, after a bootstrap update). As discussed in <https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/.60ptr_metadata.60.20in.20MIR/near/435637808>, this introduces `UnOp::PtrMetadata` taking a raw pointer and returning the associated metadata value. By no longer going through a `union`, this should also help future PRs better optimize pointer operations. r? ``@oli-obk``
2024-05-28Auto merge of #125682 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 5 commits in a8d72c675ee52dd57f0d8f2bae6655913c15b2fb..431db31d0dbeda320caf8ef8535ea48eb3093407 2024-05-24 03:34:17 +0000 to 2024-05-28 18:17:31 +0000 - Include `lints.rust.unexpected_cfgs.check-cfg` in the fingerprint (rust-lang/cargo#13958) - feat(test): Auto-redact elapsed time (rust-lang/cargo#13973) - chore: Update to snapbox 0.6 (rust-lang/cargo#13963) - fix: check if rev is full commit sha for github fast path (rust-lang/cargo#13969) - test: switch from `drop` to `let _` due to nightly rustc change (rust-lang/cargo#13964) r? ghost
2024-05-28Update cargoWeihang Lo-0/+0
2024-05-28Auto merge of #125665 - matthiaskrgr:rollup-srkx0v1, r=matthiaskrgrbors-286/+720
Rollup of 5 pull requests Successful merges: - #117671 (NVPTX: Avoid PassMode::Direct for args in C abi) - #125573 (Migrate `run-make/allow-warnings-cmdline-stability` to `rmake.rs`) - #125590 (Add a "Setup Python" action for github-hosted runners and remove unnecessary `CUSTOM_MINGW` environment variable) - #125598 (Make `ProofTreeBuilder` actually generic over `Interner`) - #125637 (rustfmt fixes) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-28Add Miri smoke pass test for ptr_metadata intrinsicScott McMurray-1/+7
2024-05-28Add Miri tests for `PtrMetadata` UBScott McMurray-0/+142
2024-05-28Add custom mir support for `PtrMetadata`Scott McMurray-0/+29
2024-05-28Add an intrinsic for `ptr::metadata`Scott McMurray-52/+422
2024-05-28Rollup merge of #125637 - nnethercote:rustfmt-fixes, r=GuillaumeGomezMatthias Krüger-40/+37
rustfmt fixes The `rmake.rs` entries in `rustfmt.toml` are causing major problems for `x fmt`. This PR removes them and does some minor related cleanups. r? ``@GuillaumeGomez``
2024-05-28Rollup merge of #125598 - compiler-errors:proof-tree-builder, r=lcnrMatthias Krüger-175/+210
Make `ProofTreeBuilder` actually generic over `Interner` Self-explanatory. Also renamed `ecx.tcx()` to `ecx.interner()`. r? lcnr
2024-05-28Rollup merge of #125590 - ChrisDenton:mingw-ci-3, r=KobzolMatthias Krüger-49/+11
Add a "Setup Python" action for github-hosted runners and remove unnecessary `CUSTOM_MINGW` environment variable The Setup Python action isn't strictly necessary ([even on Windows](https://github.com/rust-lang/rust/pull/125584)) but it is [recommend by GitHub](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#specifying-a-python-version). The `CUSTOM_MINGW` environment variable is redundant now as it's always set for mingw and always unset otherwise. try-job: x86_64-mingw try-job: x86_64-mingw try-job: dist-x86_64-msvc try-job: dist-x86_64-mingw
2024-05-28Rollup merge of #125573 - ↵Matthias Krüger-17/+22
GuillaumeGomez:migrate-allow-warnings-cmdline-stability, r=jieyouxu Migrate `run-make/allow-warnings-cmdline-stability` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ``@jieyouxu``
2024-05-28Rollup merge of #117671 - kjetilkjeka:nvptx_c_abi_avoid_direct, r=davidtwcoMatthias Krüger-5/+440
NVPTX: Avoid PassMode::Direct for args in C abi Fixes #117480 I must admit that I'm confused about `PassMode` altogether, is there a good sum-up threads for this anywhere? I'm especially confused about how "indirect" and "byval" goes together. To me it seems like "indirect" basically means "use a indirection through a pointer", while "byval" basically means "do not use indirection through a pointer". The return used to keep `PassMode::Direct` for small aggregates. It turns out that `make_indirect` messes up the tests and one way to fix it is to keep `PassMode::Direct` for all aggregates. I have mostly seen this PassMode mentioned for args. Is it also a problem for returns? When experimenting with `byval` as an alternative i ran into [this assert](https://github.com/rust-lang/rust/blob/61a3eea8043cc1c7a09c2adda884e27ffa8a1172/compiler/rustc_codegen_llvm/src/abi.rs#L463C22-L463C22) I have added tests for the same kind of types that is already tested for the "ptx-kernel" abi. The tests cannot be enabled until something like #117458 is completed and merged. CC: ``@RalfJung`` since you seem to be the expert on this and have already helped me out tremendously CC: ``@RDambrosio016`` in case this influence your work on `rustc_codegen_nvvm` ``@rustbot`` label +O-NVPTX
2024-05-28Auto merge of #122662 - Mark-Simulacrum:optional-drop, r=bjorn3bors-116/+203
Omit non-needs_drop drop_in_place in vtables This replaces the drop_in_place reference with null in vtables. On librustc_driver.so, this drops about ~17k (11%) dynamic relocations from the output, since many vtables can now be placed in read-only memory, rather than having a relocated pointer included. This makes a tradeoff by adding a null check at vtable call sites. I'm not sure that's readily avoidable without changing the vtable format (e.g., so that we can use a pc-relative relocation instead of an absolute address, and avoid the dynamic relocation that way). But it seems likely that the check is cheap at runtime. Accepted MCP: https://github.com/rust-lang/compiler-team/issues/730
2024-05-28Remove TraceMichael Goulet-141/+71
2024-05-28Rewrite simple-rlib to rmakeOneirical-16/+18
2024-05-28Get rid of manual Trace callsMichael Goulet-12/+29
2024-05-28Make ProofTreeBuilder actually generic over internerMichael Goulet-83/+102
2024-05-28EvalCtxt::tcx() -> EvalCtxt::interner()Michael Goulet-92/+108
2024-05-28Silence some resolve errors when there have been glob import errorsEsteban Küber-19/+131
When encountering `use foo::*;` where `foo` fails to be found, and we later encounter resolution errors, we silence those later errors. A single case of the above, for an *existing* import on a big codebase would otherwise have a huge number of knock-down spurious errors. Ideally, instead of a global flag to silence all subsequent resolve errors, we'd want to introduce an unameable binding in the appropriate rib as a sentinel when there's a failed glob import, so when we encounter a resolve error we can search for that sentinel and if found, and only then, silence that error. The current approach is just a quick proof of concept to iterate over. Partially address #96799.
2024-05-28Auto merge of #124650 - oli-obk:pattern_types_syntax, r=nnethercotebors-277/+263
Create const block DefIds in typeck instead of ast lowering this is a prerequisite for cleaning up pattern types and the range pattern HIR nodes in general. Right now they contain expressions, but they are supposed to only contain constants. In order to generate the anonymous constants lazily during typeck, we need to support generating new items with bodies during typeck in general. Transforming const blocks was the simplest change I could find to allow us to do that (everything else is much more invasive if we haven't already done it for const blocks).
2024-05-28Bless codegen testOli Scherer-21/+23
2024-05-28Cache whether a body has inline constsOli Scherer-4/+21
2024-05-28Create const block DefIds in typeck instead of ast loweringOli Scherer-189/+162
2024-05-28Use the HIR instead of mir_keys for determining whether something will have ↵Oli Scherer-1/+1
a MIR body.
2024-05-28Make body-visiting logic reusableOli Scherer-53/+59
2024-05-28Remove a CTFE check that was only ever used to ICEOli Scherer-13/+1
The guarded call will ICE on its own. While this improved diagnostics in the presence of bugs somewhat, it is also a blocker to query feeding of constants. If this case is hit again, we should instead improve diagnostics of the root ICE
2024-05-28Make more of the test suite run on Mac CatalystMads Marquart-93/+98
This adds the `only-apple`/`ignore-apple` compiletest directive, and uses that basically everywhere instead of `only-macos`/`ignore-macos`. Some of the updates in `run-make` are a bit redundant, as they use `ignore-cross-compile` and won't run on iOS - but using Apple in these is still more correct, so I've made that change anyhow.
2024-05-28Disable stack overflow handler tests on iOS-like platformsMads Marquart-0/+20
2024-05-28Enable a few tests on macOSMads Marquart-7/+2
2024-05-28Don't format `tests/run-make/*/rmake.rs`.Nicholas Nethercote-21/+16
It's reasonable to want to, but in the current implementation this causes multiple problems. - All the `rmake.rs` files are formatted every time even when they haven't changed. This is because they get whitelisted unconditionally in the `OverrideBuilder`, before the changed files get added. - The way `OverrideBuilder` works, if any files gets whitelisted then no unmentioned files will get traversed. This is surprising, and means that the `rmake.rs` entries broke the use of explicit paths to `x fmt`, and also broke `GITHUB_ACTIONS=true git check --fmt`. The commit removes the `rmake.rs` entries, fixes the formatting of a couple of files that were misformatted (not previously caught due to the `GITHUB_ACTIONS` breakage), and bans `!`-prefixed entries in `rustfmt.toml` because they cause all these problems.
2024-05-28Fix comments.Nicholas Nethercote-21/+24
Some are too long, some aren't complete sentences, some are complete sentences but don't bother with an upper case letter at the start. All annoying and hurt readability.
2024-05-28Migrate `run-make/allow-warnings-cmdline-stability` to `rmake.rs`Guillaume Gomez-17/+11
2024-05-28Add `assert_not_contains` to `run-make-support` libraryGuillaume Gomez-0/+11
2024-05-28Auto merge of #125649 - workingjubilee:rollup-zwoum3k, r=workingjubileebors-593/+1377
Rollup of 5 pull requests Successful merges: - #125089 (Improve diagnostic output the `non_local_definitions` lint) - #125343 (`-Znext-solver`: eagerly normalize when adding goals) - #125551 (Stabilise `IpvNAddr::{BITS, to_bits, from_bits}` (`ip_bits`)) - #125640 (Don't suggest turning non-char-literal exprs of ty `char` into string literals) - #125647 (update tracking issue for lazy_cell_consume) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-28Rollup merge of #125647 - tspiteri:track-lazy_cell_consume, r=workingjubileeJubilee-2/+2
update tracking issue for lazy_cell_consume <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r​? <reviewer name> -->
2024-05-28Rollup merge of #125640 - fmease:plz-no-stringify, r=estebankJubilee-11/+66
Don't suggest turning non-char-literal exprs of ty `char` into string literals Fixes #125595. Fixes #125081. r? estebank (#122217) or compiler