about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-07-22Rollup merge of #127820 - Oneirical:intestellar-travel, r=jieyouxuTrevor Gross-17/+50
Rewrite and rename `issue-14698`. `issue-33329` and `issue-107094` `run-make` tests to rmake or ui Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). try-job: armhf-gnu try-job: test-various try-job: aarch64-apple try-job: x86_64-msvc
2024-07-22Rollup merge of #127506 - liushuyu:s390x-target-features, r=davidtwcoTrevor Gross-3/+4
rustc_target: add known safe s390x target features This pull request adds known safe target features for s390x (aka IBM Z systems). Currently, these features are unstable since stabilizing the target features requires submitting proposals. The `vector` feature was added in IBM Z13 (`arch11`), and this is a SIMD feature for the newer IBM Z systems. The `backchain` attribute is the IBM Z way of adding frame pointers like unwinding capabilities (the "frame-pointer" switch on IBM Z and IBM POWER platforms will add _emulated_ frame pointers to the binary, which profilers can't use for unwinding the stack). Both attributes can be applied at the LLVM module or function levels. However, the `backchain` attribute has to be enabled for all the functions in the call stack to get a successful unwind process.
2024-07-22Rollup merge of #125990 - tbu-:pr_unsafe_env_lint_name, r=ehussTrevor Gross-4/+4
Rename `deprecated_safe` lint to `deprecated_safe_2024` Create a lint group `deprecated_safe` that includes `deprecated_safe_2024`. Addresses https://github.com/rust-lang/rust/issues/124866#issuecomment-2142814375. r? `@ehuss`
2024-07-22rewrite and rename issue-107094 to rmakeOneirical-17/+37
2024-07-22rewrite and rename issue-33329 to ui testOneirical-6/+5
2024-07-22rewrite and rename issue-14698 to rmakeOneirical-4/+18
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 #127985 - Oneirical:testibule-of-hell, r=Kobzol许杰友 Jieyou Xu (Joe)-33/+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)-2/+15
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-22Auto merge of #128048 - workingjubilee:rollup-gehtjxd, r=workingjubileebors-31/+105
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-1/+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-0/+10
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 #128020 - compiler-errors:nlb-no-const, r=BoxyUwUJubilee-24/+78
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/+15
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-21Auto merge of #120812 - compiler-errors:impl-sorting, r=lcnrbors-9/+9
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-1/+2
2024-07-21Add testtiif-0/+58
2024-07-21Explain why we require `_` for empty patternsNadrieril-0/+10
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 #127722 - BoxyUwU:new_adt_const_params_limitations, ↵bors-473/+940
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-13/+75
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-20Just totally fully deny late-bound constsMichael Goulet-24/+78
2024-07-20Auto merge of #127663 - Oneirical:fuzzy-testure, r=jieyouxubors-73/+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 #127975 - GuillaumeGomez:fix-trait-bounds-display, r=notriddleMatthias Krüger-9/+54
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 #127752 - uweigand:s390x-miropt-update, r=Mark-SimulacrumMatthias Krüger-4/+3
Ignore allocation bytes in one more mir-opt test Following on PR #126502, add `rustc -Zdump-mir-exclude-alloc-bytes` to tests/mir-opt/dataflow-const-prop/aggregate_copy.rs as well to skip writing allocation bytes in MIR dumps. Fixes #126261
2024-07-20Rollup merge of #127720 - c410-f3r:concat-rep, r=cjgillotMatthias Krüger-0/+18
[`macro_metavar_expr_concat`] Allow `concat` in repetitions cc #127723
2024-07-20Auto merge of #127658 - compiler-errors:precise-capturing-rustdoc-cross, ↵bors-0/+20
r=fmease Add cross-crate precise capturing support to rustdoc Follow-up to #127632. Fixes #127228. r? `@fmease` Tracking: * https://github.com/rust-lang/rust/issues/123432
2024-07-20Auto merge of #127998 - matthiaskrgr:rollup-ykp0h5r, r=matthiaskrgrbors-88/+134
Rollup of 9 pull requests Successful merges: - #123196 (Add Process support for UEFI) - #127556 (Replace a long inline "autoref" comment with method docs) - #127693 (Migrate `crate-hash-rustc-version` to `rmake`) - #127866 (Conditionally build `wasm-component-ld` ) - #127918 (Safely enforce thread name requirements) - #127948 (fixes panic error `index out of bounds` in conflicting error) - #127980 (Avoid ref when using format! in compiler) - #127984 (Avoid ref when using format! in src) - #127987 (More accurate suggestion for `-> Box<dyn Trait>` or `-> impl Trait`) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-20Auto merge of #127003 - GrigorenkoPV:107975, r=SparrowLiibors-0/+799
Add a test for #107975 The int is zero. But also not zero. This is so much fun. This is a part of #105107. Initially I was going to just rebase #108445, but quite a few things changed since then: * The [mcve](https://github.com/rust-lang/rust/issues/105787#issuecomment-1750112388) used for #105787 got fixed.[^upd2] * You can't just `a ?= b` for #107975 anymore. Now you have to `a-b ?= 0`. This is what this PR does. As an additional flex, it show that three ways of converting a pointer to its address have this issue: 1. `as usize` 2. `.expose_provenance()` 3. `.addr()` * #108425 simply got fixed. Yay. As an aside, the naming for `addr_of!` is quite unfortunate in context of provenance APIs. Because `addr_of!` gives you a pointer, but what provenance APIs refer to as "address" is the `usize` value. Oh well. UPD1: GitHub is incapable of parsing #107975 in the PR name, so let's add it here. [^upd2]: UPD2: [The other mcve](https://github.com/rust-lang/rust/issues/105787#issue-1500501670) does not work anymore either, saying "this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details."
2024-07-20Rollup merge of #127987 - estebank:impl-trait-sugg, r=cjgillotMatthias Krüger-50/+37
More accurate suggestion for `-> Box<dyn Trait>` or `-> impl Trait` When encountering `-> Trait`, suggest `-> Box<dyn Trait>` (instead of `-> Box<Trait>`. If there's a single returned type within the `fn`, suggest `-> impl Trait`.
2024-07-20Rollup merge of #127948 - surechen:fix_127915, r=compiler-errorsMatthias Krüger-0/+40
fixes panic error `index out of bounds` in conflicting error fixes #127915
2024-07-20Rollup merge of #127693 - Rejyr:migrate-crate-hash-rustc-version-rmake, ↵Matthias Krüger-38/+57
r=jieyouxu Migrate `crate-hash-rustc-version` to `rmake` Part of #121876. r? ``@jieyouxu`` try-job: x86_64-gnu-llvm-18 try-job: dist-x86_64-linux
2024-07-19Allow concat in repetitionsCaio-0/+18
2024-07-19Auto merge of #127968 - fmease:upd-jsondocck-directive-style, r=GuillaumeGomezbors-1043/+1043
Update jsondocck directives to follow ui_test-style Context: Comment chain in #125813. Follow-up to #126788. Use the same temporary approach of "double parsing" until we figure out how we want to support compiletest/ui_test directive "add-ons" for child test runners like HtmlDocCk and JsonDocCk. I didn't touch much of jsondocck because I want to refactor it some other time (for robustness, maintainability and better diagnostics; basically by following a similar design of my WIP HtmlDocCk-next, cc #125780). r? `@GuillaumeGomez`
2024-07-19rewrite compiler-lookup-paths-2 to rmakeOneirical-11/+21
2024-07-19Add a bunch of tests for #107975Pavel Grigorenko-0/+799
2024-07-19More accurate suggestion for `-> Box<dyn Trait>` or `-> impl Trait`Esteban Küber-50/+37
When encountering `-> Trait`, suggest `-> Box<dyn Trait>` (instead of `-> Box<Trait>`. If there's a single returned type within the `fn`, suggest `-> impl Trait`.
2024-07-19Add GUI test for trait bounds displayGuillaume Gomez-0/+41
2024-07-19Reduce width to ensure that the name is wider and thus still triggering the ↵Guillaume Gomez-9/+13
scroll
2024-07-19Auto merge of #127982 - matthiaskrgr:rollup-nzyvphj, r=matthiaskrgrbors-69/+344
Rollup of 6 pull requests Successful merges: - #127295 (CFI: Support provided methods on traits) - #127814 (`C-cmse-nonsecure-call`: improved error messages) - #127949 (fix: explain E0120 better cover cases when its raised) - #127966 (Use structured suggestions for unconstrained generic parameters on impl blocks) - #127976 (Lazy type aliases: Diagostics: Detect bivariant ty params that are only used recursively) - #127978 (Avoid ref when using format! for perf) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-19rewrite c-unwind-abi-catch-panic to rmakeOneirical-10/+18
2024-07-19rewrite test-benches to rmakeOneirical-12/+21
2024-07-19Rollup merge of #127976 - fmease:lta-cyclic-bivariant-param-better-err, ↵Matthias Krüger-14/+13
r=compiler-errors Lazy type aliases: Diagostics: Detect bivariant ty params that are only used recursively Follow-up to errs's #127871. Extends the logic to cover LTAs, too, not just ADTs. This change only takes effect with the next-gen solver enabled as cycle errors like the one we have here are fatal in the old solver. That's my explanation anyways. r? compiler-errors
2024-07-19Rollup merge of #127814 - folkertdev:c-cmse-nonsecure-call-error-messages, ↵Matthias Krüger-55/+325
r=oli-obk `C-cmse-nonsecure-call`: improved error messages tracking issue: #81391 issue for the error messages (partially implemented by this PR): #81347 related, in that it also deals with CMSE: https://github.com/rust-lang/rust/pull/127766 When using the `C-cmse-nonsecure-call` ABI, both the arguments and return value must be passed via registers. Previously, when violating this constraint, an ugly LLVM error would be shown. Now, the rust compiler itself will print a pretty message and link to more information.
2024-07-19Rollup merge of #127295 - maurer:default-impl-cfi, r=estebankMatthias Krüger-0/+6
CFI: Support provided methods on traits Provided methods currently don't get type erasure performed on them because they are not in an `impl` block. If we are instantiating a method that is an associated item, but *not* in an impl block, treat it as a provided method instead.
2024-07-19Fix two new failing testsAlex Crichton-2/+15
The updated wasi-sdk has debuginfo by default so be sure to strip the debuginfo by default when testing the size of new executables.
2024-07-19LTA: Diag: Detect bivariant ty params that are only used recursivelyLeón Orell Valerian Liehr-14/+13
2024-07-19rewrite pass-non-c-like-enum-to-c to rmakeOneirical-8/+25