about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-06-06Rollup merge of #142092 - fmease:rustdoc-alias-terms, r=GuillaumeGomezMatthias Krüger-1/+0
rustdoc: Support middle::ty associated const equality predicates again Fix intentional regression from PR rust-lang/rust#125076. Fixes rust-lang/rust#125092. Fixes rust-lang/rust#134775. CC rust-lang/rust#141368 (`EqPredicates` and rustdoc).
2025-06-06Rollup merge of #142012 - oli-obk:no-optional-spans, r=fee1-deadMatthias Krüger-4/+7
Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None Turns out many locations actually have a span available that we could use, so I used it
2025-06-06Rollup merge of #141982 - Kivooeo:tf5, r=jieyouxuMatthias Krüger-188/+135
`tests/ui`: A New Order [5/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. r? ``@jieyouxu``
2025-06-05Auto merge of #138677 - shepmaster:consistent-elided-lifetime-syntax, ↵bors-406/+1183
r=traviscross,jieyouxu Add a new `mismatched-lifetime-syntaxes` lint The lang-team [discussed this](https://hackmd.io/nf4ZUYd7Rp6rq-1svJZSaQ) and I attempted to [summarize](https://github.com/rust-lang/rust/pull/120808#issuecomment-2701863833) their decision. The summary-of-the-summary is: - Using two different kinds of syntax for elided lifetimes is confusing. In rare cases, it may even [lead to unsound code](https://github.com/rust-lang/rust/issues/48686)! Some examples: ```rust // Lint will warn about these fn(v: ContainsLifetime) -> ContainsLifetime<'_>; fn(&'static u8) -> &u8; ``` - Matching up references with no lifetime syntax, references with anonymous lifetime syntax, and paths with anonymous lifetime syntax is an exception to the simplest possible rule: ```rust // Lint will not warn about these fn(&u8) -> &'_ u8; fn(&'_ u8) -> &u8; fn(&u8) -> ContainsLifetime<'_>; ``` - Having a lint for consistent syntax of elided lifetimes will make the [future goal](https://github.com/rust-lang/rust/issues/91639) of warning-by-default for paths participating in elision much simpler. --- This new lint attempts to accomplish the goal of enforcing consistent syntax. In the process, it supersedes and replaces the existing `elided-named-lifetimes` lint, which means it starts out life as warn-by-default.
2025-06-05Support middle::ty assoc const eq predicates againLeón Orell Valerian Liehr-1/+0
2025-06-05Auto merge of #142081 - matthiaskrgr:rollup-secpezz, r=matthiaskrgrbors-172/+122
Rollup of 7 pull requests Successful merges: - rust-lang/rust#141709 (jsondocck: Refactor directive handling) - rust-lang/rust#141974 (`tests/ui`: A New Order [4/N]) - rust-lang/rust#141989 (rustdoc-json-type: Depend on `serde` and `serde_derive` seperately) - rust-lang/rust#142015 (Report the actual item that evaluation failed for) - rust-lang/rust#142026 (bootstrap: Fix file permissions when dereferencing symlinks) - rust-lang/rust#142032 (Fix parsing of frontmatters with inner hyphens) - rust-lang/rust#142036 (Update the `compiler-builtins` subtree) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-05cleaned up some testsKivooeo-188/+135
2025-06-05Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of NoneOli Scherer-4/+7
2025-06-05Rollup merge of #142032 - matthewjasper:frontmatter-lexing, r=fee1-deadMatthias Krüger-0/+21
Fix parsing of frontmatters with inner hyphens closes rust-lang/rust#141483 r? fee1-dead
2025-06-05Rollup merge of #142015 - oli-obk:wrong-instance, r=RalfJungMatthias Krüger-2/+3
Report the actual item that evaluation failed for instead of id of the last frame in the evaluation stack r? ``@RalfJung`` fixes rust-lang/rust#142010
2025-06-05Rollup merge of #141974 - Kivooeo:tf4, r=jieyouxuMatthias Krüger-170/+98
`tests/ui`: A New Order [4/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. r? ``@jieyouxu`` added stderr tag for commit which means it included generated stderr
2025-06-05Auto merge of #142070 - matthiaskrgr:rollup-e7lxtuo, r=matthiaskrgrbors-96/+112
Rollup of 6 pull requests Successful merges: - rust-lang/rust#140638 (UnsafePinned: also include the effects of UnsafeCell) - rust-lang/rust#141777 (Do not run PGO/BOLT in x64 Linux alt builds) - rust-lang/rust#141938 (update rust offload bootstrap) - rust-lang/rust#141962 (rustc-dev-guide subtree update) - rust-lang/rust#141965 (`tests/ui`: A New Order [3/N]) - rust-lang/rust#141970 (implement new `x` flag: `--skip-std-check-if-no-download-rustc`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-05Rollup merge of #141965 - Kivooeo:test-reform, r=jieyouxuMatthias Krüger-96/+112
`tests/ui`: A New Order [3/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? ``@jieyouxu``
2025-06-05Auto merge of #135054 - cramertj:file-cstr, r=m-ou-sebors-0/+25
Add Location::file_with_nul This is useful for C/C++ APIs which expect the const char* returned from __FILE__ or std::source_location::file_name. ACP: https://github.com/rust-lang/libs-team/issues/466 Tracking issue: https://github.com/rust-lang/rust/issues/141727
2025-06-05Auto merge of #142033 - matthiaskrgr:rollup-99lvg0j, r=matthiaskrgrbors-353/+377
Rollup of 11 pull requests Successful merges: - rust-lang/rust#141890 (Add link to correct documentation in htmldocck.py) - rust-lang/rust#141932 (Fix for async drop inside async gen fn) - rust-lang/rust#141960 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#141968 (Run wfcheck in one big loop instead of per module) - rust-lang/rust#141969 (Triagebot: Remove `assign.users_on_vacation`) - rust-lang/rust#141985 (Ensure query keys are printed with reduced queries) - rust-lang/rust#141999 (Visit the ident in `PreciseCapturingNonLifetimeArg`.) - rust-lang/rust#142005 (Change `tag_field` to `FieldIdx` in `Variants::Multiple`) - rust-lang/rust#142017 (Fix incorrect use of "recommend" over "recommended") - rust-lang/rust#142024 (Don't refer to 'this tail expression' in expansion.) - rust-lang/rust#142025 (Don't refer to 'local binding' in extern macro.) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-04Auto merge of #141309 - RalfJung:x86-simd-abi, r=tgross35,nikic,workingjubileebors-24/+17
x86 (32/64): go back to passing SIMD vectors by-ptr Fixes https://github.com/rust-lang/rust/issues/139029 by partially reverting https://github.com/rust-lang/rust/pull/135408 and going back to passing SIMD vectors by-ptr on x86. Sadly, by-val confuses the LLVM inliner so much that it's not worth it... Also fixes https://github.com/rust-lang/rust/issues/141848 by no longer actually using vector registers with the "Rust" ABI. r? `@tgross35` Cc `@nikic` try-job: `test-various*` try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-gnu-nopt try-job: `x86_64-msvc*` try-job: `i686-msvc*`
2025-06-04Rollup merge of #142025 - m-ou-se:which-local-binding, r=jdonszelmannMatthias Krüger-3/+3
Don't refer to 'local binding' in extern macro. When it comes from a macro expansion, the user has no clue what 'local binding' the compiler is talking about, if they don't know the expansion of the macro. Better to just say 'temporary value'.
2025-06-04Rollup merge of #142024 - m-ou-se:what-tail-expression, r=petrochenkovMatthias Krüger-4/+2
Don't refer to 'this tail expression' in expansion. The user has no clue what the compiler is talking about when it says "this tail expression". It is an implementation detail of the macro that it uses a block with tail expression.
2025-06-04Rollup merge of #141985 - compiler-errors:cycle-in-dep-graph-print, r=oli-obkMatthias Krüger-1/+26
Ensure query keys are printed with reduced queries Using `-Z query-dep-graph` and debug assertions leads to an ICE that was originally discovered in rust-lang/rust#141700: > This isn't an incremental bug per se, but instead a bug that has to do with debug printing query keys when debug assertions and `-Z query-dep-graph` is enabled. We end up printing a const (b/c we're using generic const args here) whose debug printing for -Z query-dep-graph requires invoking the same query cyclically 😃 > > I've pushed a commit which should fix this. This isn't related to the standard library changes, but instead b/c it seems to be the first usage of `feature(adt_const_params)` in the standard library that ends up being triggered in incremental tests. r? oli-obk
2025-06-04Rollup merge of #141968 - oli-obk:wfck-everything-at-once, r=wesleywiserMatthias Krüger-53/+53
Run wfcheck in one big loop instead of per module Maybe we can merge this big loop in the future with the `par_hir_body_owners` call below and run typeck only on items that didn't fail wfcheck. For now let's just see if perf likes it, as it by itself should be beneficial to parallel rustc
2025-06-04Rollup merge of #141960 - ferrocene:lw/2015-paths2, r=compiler-errorsMatthias Krüger-290/+290
Use non-2015 edition paths in tests that do not test for their resolution This allows for testing these tests on editions other than 2015 Follow up to https://github.com/rust-lang/rust/pull/141888
2025-06-04Rollup merge of #141932 - azhogin:azhogin/async-drop-inside-asyncgen-fix, ↵Matthias Krüger-2/+3
r=oli-obk Fix for async drop inside async gen fn Return value (for yield) is corrected for async drop inside async gen function. In CFG, when internal async drop future is polled and returned `Poll<()>::Pending`, then async gen resume function returns `Poll<(OptRet)>::Pending`. Fixes rust-lang/rust#140530
2025-06-04Add Location::file_with_nulTaylor Cramer-0/+25
This is useful for C/C++ APIs which expect the const char* returned from __FILE__ or std::source_location::file_name.
2025-06-04Fix parsing of frontmatters with inner hyphensMatthew Jasper-0/+21
2025-06-04Report the actual item that evaluation failed forOli Scherer-2/+3
2025-06-04Replace `elided_named_lifetimes` with `mismatched_lifetime_syntaxes`Jake Goulding-443/+429
2025-06-04Introduce the `mismatched_lifetime_syntaxes` lintJake Goulding-0/+791
2025-06-04cleaned up some testsKivooeo-170/+98
2025-06-04Rollup merge of #141959 - ferrocene:lw/2015-edition-directives2, ↵Matthias Krüger-46/+74
r=compiler-errors Add more missing 2015 edition directives These tests specifically test 2015 edition behavior, so ensure that they can only be run with this edition
2025-06-04Don't refer to 'this tail expression' in expansion.Mara Bos-4/+2
The user has no clue what tail expression the compiler is talking about: it is an implementation detail of the macro that it uses a block with tail expression.
2025-06-04Don't refer to 'local binding' in extern macro.Mara Bos-3/+3
The user has no clue what 'local binding' the compiler is talking about, if they don't know the expansion of the macro.
2025-06-04cleaned up some testsKivooeo-96/+112
2025-06-04Fix for async drop inside async gen fnAndrew Zhogin-2/+3
2025-06-04x86 (32/64): go back to passing SIMD vectors by-ptrRalf Jung-24/+17
2025-06-04Rollup merge of #141888 - ferrocene:lw/decouple-tests-from-2015, ↵Matthias Krüger-193/+194
r=compiler-errors Use non-2015 edition paths in tests that do not test for their resolution This allows for testing these tests on editions other than 2015
2025-06-04Rollup merge of #141250 - folkertdev:s390x-z17-target-features, r=workingjubileeMatthias Krüger-0/+12
add s390x z17 target features tracking issue: https://github.com/rust-lang/rust/issues/130869 earlier target features were added in https://github.com/rust-lang/rust/pull/135630, and https://github.com/rust-lang/rust/issues/135413#issuecomment-2886439455 has some extra context on these new features. r? ``@ghost`` cc ``@uweigand``
2025-06-04Rollup merge of #137306 - tgross35:remove-i128-u128-improper-ctypes, ↵Matthias Krüger-218/+60
r=traviscross,workingjubilee Remove `i128` and `u128` from `improper_ctypes_definitions` Rust's 128-bit integers have historically been incompatible with C [1]. However, there have been a number of changes in Rust and LLVM that mean this is no longer the case: * Incorrect alignment of `i128` on x86 [1]: adjusting Rust's alignment proposed at https://github.com/rust-lang/compiler-team/issues/683, implemented at https://github.com/rust-lang/rust/pull/116672. * LLVM version of the above: resolved in LLVM, including ABI fix. Present in LLVM18 (our minimum supported version). * Incorrect alignment of `i128` on 64-bit PowerPC, SPARC, and MIPS [2]: Rust's data layouts adjusted at https://github.com/rust-lang/rust/pull/132422, https://github.com/rust-lang/rust/pull/132741, https://github.com/rust-lang/rust/pull/134115. * LLVM version of the above: done in LLVM 20 https://github.com/llvm/llvm-project/issues/102783. * Incorrect return convention of `i128` on Windows: adjusted to match GCC and Clang at https://github.com/rust-lang/rust/pull/134290. At https://github.com/rust-lang/lang-team/issues/255#issuecomment-2088855084, the lang team considered it acceptable to remove `i128` from `improper_ctypes_definitions` if the LLVM version is known to be compatible. Time has elapsed since then and we have dropped support for LLVM versions that do not have the x86 fixes, meaning a per-llvm-version lint should no longer be necessary. The PowerPC, SPARC, and MIPS changes only came in LLVM 20 but since Rust's datalayouts have also been updated to match, we will be using the correct alignment regardless of LLVM version. `repr(i128)` was added to this lint in https://github.com/rust-lang/rust/pull/138282, but is also removed here. Part of the decision is that `i128` should match `__int128` in C on platforms that provide it, which documentation is updated to indicate. We will not guarantee that `i128` matches `_BitInt(128)` since that can be different from `__int128`. Some platforms (usually 32-bit) do not provide `__int128`; if any ABIs are extended in the future to define it, we will need to make sure that our ABI matches. Closes: https://github.com/rust-lang/rust/issues/134288 [1]: https://github.com/rust-lang/rust/issues/54341 [2]: https://github.com/rust-lang/rust/issues/128950
2025-06-03Ensure query keys are printed with reduced queriesMichael Goulet-1/+1
2025-06-03Add a test to reproduce ICEMichael Goulet-0/+25
2025-06-03Rollup merge of #141957 - ferrocene:lw/missing-dyn-kw2, r=compiler-errorsMatthias Krüger-31/+26
Add missing `dyn` keywords to tests that do not test for them Part 2 Some more tests that were found
2025-06-03Rollup merge of #141943 - nnethercote:rm-pre-expansion-ast-stats, ↵Matthias Krüger-117/+60
r=compiler-errors Remove pre-expansion AST stats. They're very little value, because they only measure the top-level `main.rs` or `lib.rs` file. (Other `.rs` files don't get read and parsed until expansion occurs.) I saw an example recently where the pre-expansion AST was 3KB in size and the post-expansion AST was 66MB. I kept the "POST EXPANSION" in the output header, I think that's useful information to avoid possible confusion about when the measurement happens. r? `@davidtwco`
2025-06-03Rollup merge of #141698 - oli-obk:ctfe-err-flip, r=RalfJungMatthias Krüger-4233/+4082
Use the informative error as the main const eval error message r? `@RalfJung` I only did the minimal changes necessary to the const eval error machinery. I'd prefer not to mix test changes with refactorings 😆
2025-06-03Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3Matthias Krüger-1/+3
Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi` Our `conv_from_spec_abi`, `adjust_abi`, and `is_abi_supported` combine to give us a very confusing way of reasoning about what _actual_ calling convention we want to lower our code to and whether we want to compile the resulting code at all. Instead of leaving this code as a miniature adventure game in which someone tries to combine stateful mutations into a Rube Goldberg machine that will let them escape the maze and arrive at the promised land of codegen, we let `AbiMap` devour this complexity. Once you have an `AbiMap`, you can answer which `ExternAbi`s will lower to what `CanonAbi`s (and whether they will lower at all). Removed: - `conv_from_spec_abi` replaced by `AbiMap::canonize_abi` - `adjust_abi` replaced by same - `Conv::PreserveAll` as unused - `Conv::Cold` as unused - `enum Conv` replaced by `enum CanonAbi` target-spec.json changes: - If you have a target-spec.json then now your "entry-abi" key will be specified in terms of one of the `"{abi}"` strings Rust recognizes, e.g. ```json "entry-abi": "C", "entry-abi": "win64", "entry-abi": "aapcs", ```
2025-06-03Rollup merge of #137725 - oli-obk:i-want-to-move-it-move-it, ↵Matthias Krüger-15/+630
r=compiler-errors,traviscross Add `iter` macro See related discussion in https://rust-lang.zulipchat.com/#narrow/channel/481571-t-lang.2Fgen/topic/iter!.20macro/near/500784563 very little error case testing so far, but the success path works. There is also no `IterFn` trait yet, as T-lang didn't consider it something urgently needed I think we can implement it in follow-up PRs. r? lang for the tests, `@compiler-errors` for the impl
2025-06-03Add `iter` macroOli Scherer-15/+630
This adds an `iter!` macro that can be used to create movable generators. This also adds a yield_expr feature so the `yield` keyword can be used within iter! macro bodies. This was needed because several unstable features each need `yield` expressions, so this allows us to stabilize them separately from any individual feature. Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de> Co-authored-by: Jieyou Xu <jieyouxu@outlook.com> Co-authored-by: Travis Cross <tc@traviscross.com>
2025-06-03bless test for CanonAbi::X86(SysV64) changeJubilee Young-1/+3
2025-06-03Run wfcheck in one big loop instead of per moduleOli Scherer-53/+53
2025-06-03Rollup merge of #141833 - Kivooeo:test-reform1, r=jieyouxuMatthias Krüger-32/+51
`tests/ui`: A New Order [2/N] part of rust-lang/rust#133895 r? `@jieyouxu` let's try this kind of commits, one for each file, commit's name shows what i did, hope this is not harder to review than previous
2025-06-03Rollup merge of #141724 - Sol-Ell:issue-141141-fix, r=nnethercoteMatthias Krüger-0/+195
fix(#141141): When expanding `PartialEq`, check equality of scalar types first. Fixes rust-lang/rust#141141. Now, `cs_eq` function of `partial_eq.rs` compares [scalar types](https://doc.rust-lang.org/rust-by-example/primitives.html#scalar-types) first. - Add `is_scalar` field to `FieldInfo`. - Add `is_scalar` method to `TyKind`. - Pass `FieldInfo` via `CsFold::Combine` and refactor code relying on it. - Implement `TryFrom<&str>` and `TryFrom<Symbol>` for FloatTy. - Implement `TryFrom<&str>` and `TryFrom<Symbol>` for IntTy. - Implement `TryFrom<&str>` and `TryFrom<Symbol>` for UintTy.
2025-06-03Use non-2015 edition paths in tests that do not test for their resolutionLukas Wirth-290/+290
This allows for testing these tests on editions other than 2015