about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-09-16Merge similar output checks in assembly-llvm/x86_64-cmpJosh Stone-16/+7
2025-09-16Update the minimum external LLVM to 20Josh Stone-252/+76
2025-09-16Auto merge of #138271 - mu001999-contrib:fix-138234, r=jackh726bors-0/+65
Keep space if arg does not follow punctuation when lint unused parens Fixes rust-lang/rust#138234 If the arg follows punctuation, still pass `left_pos` with `None` and no space will be added, else then pass `left_pos` with `Some(arg.span.lo())`, so that we can add the space as expected. And `emit_unused_delims` can make sure no more space will be added if the expr follows space. --- Edited: Directly use the `value_span` to check whether the expr removed parens will follow identifier or be followed by identifier.
2025-09-16Rollup merge of #146605 - jyn514:update-rustfix, r=nnethercoteMatthias Krüger-8/+8
Bump rustfix 0.8.1 -> 0.8.7 This commit can be replicated by running `cargo update -p rustfix --precise 0.8.7 && x test ui --bless`. --- The reasons this affects UI tests is as follows: - The UI test suite runs rustc with `-Z deduplicate-diagnostics=no --error-format=json`, which means that rustc emits multiple errors containing identical suggestions. That caused the weird-looking code that had multiple `X: Copy` suggestions. - Those suggestions are interpreted not by rustc itself, but by the `rustfix` library, maintained by cargo but published as a separate crates.io library and used by compiletest. - Sometime between rustfix 0.8.1 and 0.8.7 (probably in rust-lang/cargo#14747, but it's hard to tell because rustfix's versioning doesn't match cargo's), rustfix got smarter and stopped applying duplicate suggestions. Update rustfix to match cargo's behavior. Ideally, we would always share a version of rustfix between cargo and rustc (perhaps with a path dependency?), to make sure we are testing the behavior we ship. But for now, just manually update it to match. Note that the latest version of rustfix published to crates.io is 0.9.1, not 0.8.7. But 0.9.1 is not the version used in cargo, which is 0.9.3. Rather than trying to match versions exactly, I just updated rustfix to the latest in the 0.8 branch.
2025-09-16Rollup merge of #146442 - Qelxiros:trait-suggestion-generics, r=BoxyUwUMatthias Krüger-6/+23
Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary context: rust-lang/rust#145929 This fixes the MetaSized issue and adds const generics and early bound lifetimes. Late bound lifetimes are harder because they aren't returned by `generics_of`. I'm going to look into it, but there's no guarantee I'll be successful. Fixes https://github.com/rust-lang/rust/issues/146404. r? `@BoxyUwu`
2025-09-16Detect top-level `...` in argument typeEsteban Küber-7/+14
When writing something like the expression `|_: ...| {}`, we now detect the `...` during parsing explicitly instead of relying on the detection in `parse_ty_common` so that we don't talk about "nested `...` are not supported". ``` error: unexpected `...` --> $DIR/no-closure.rs:6:35 | LL | const F: extern "C" fn(...) = |_: ...| {}; | ^^^ | = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list ```
2025-09-16cmse: fix 'region variables should not be hashed'Folkert de Vries-0/+39
2025-09-16Reword noteEsteban Küber-1/+1
2025-09-16remove redundant testEsteban Küber-20/+0
2025-09-16Add span for struct tail recursion limit errorTawan Muadmuenwai-31/+45
2025-09-16handle const generics, ?Sized, early bound lifetimesJeremy Smart-6/+23
2025-09-16Keep space if expr follows identifier when lint unused parensMu001999-0/+65
2025-09-16Fix other uses of "adaptor"Joe Birr-Pixton-2/+2
2025-09-16Auto merge of #146516 - cjgillot:dest-prop-aggregate, r=Amanieubors-0/+133
DestinationPropagation: avoid creating overlapping assignments. r? `@Amanieu` Fixes https://github.com/rust-lang/rust/issues/146383
2025-09-16fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadicFolkert de Vries-26/+99
2025-09-16Suggest removing Box::newCameron Steffen-3/+27
2025-09-16Auto merge of #146614 - Zalathar:rollup-hcxvdi1, r=Zalatharbors-285/+213
Rollup of 9 pull requests Successful merges: - rust-lang/rust#145095 (Migrate `UnsizedConstParamTy` to unstable impl of `ConstParamTy_`) - rust-lang/rust#145960 (Split `FnCtxt::report_args_error` into subfunctions) - rust-lang/rust#146402 (interpret: fix overlapping aggregate initialization) - rust-lang/rust#146466 (llvm-wrapper: other cleanup) - rust-lang/rust#146574 (compiletest: Enable new-output-capture by default) - rust-lang/rust#146599 (replace some `#[const_trait]` with `const trait`) - rust-lang/rust#146601 (compiletest: Make `./x test --test-args ...` work again) - rust-lang/rust#146608 (improve internal bootstrap docs) - rust-lang/rust#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-15Don’t suggest foreign `doc(hidden)` types in E0277 diagnosticsJules Bertholet-14/+78
2025-09-16Rollup merge of #145095 - tiif:unstable_const_param, r=BoxyUwUStuart Cook-285/+213
Migrate `UnsizedConstParamTy` to unstable impl of `ConstParamTy_` Now that we have ``#[unstable_feature_bound]``, we can remove ``UnsizedConstParamTy`` that was meant to be an unstable impl of stable type and ``ConstParamTy_`` trait. r? `@BoxyUwU`
2025-09-15Rollup merge of #146559 - Jules-Bertholet:fix-typo, r=nnethercoteMatthias Krüger-7/+7
Fix typo in error message
2025-09-15Rollup merge of #146530 - a4lg:riscv-inline-asm-default-clobber-float-flags, ↵Matthias Krüger-1/+1
r=Amanieu rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list Despite that the `fflags` register (representing floating point exception flags) is stated as a flag register [in the reference](https://doc.rust-lang.org/reference/inline-assembly.html#r-asm.rules.preserved-registers), it's not in the default clobber list of the RISC-V inline assembly and it would be better to fix it.
2025-09-15Rollup merge of #146344 - Gelbpunkt:loongarch-codegen-llvm-test, ↵Matthias Krüger-2/+6
r=Mark-Simulacrum tests/codegen-llvm: Make rust-abi-arch-specific-adjustment portable This test currently only runs on RISC-V and loongarch hosts, but assumes that the host target is the -gnu target. By using minicore, we can run this test on all host targets, regardless of architecture, as long as the LLVM components are built. This also fixes this test on musl hosts of these architectures (though I've only tested on loongarch64-unknown-linux-musl).
2025-09-15remove FIXME from `has_significant_drop`, replaced with checking ↵ash-0/+18
non_region_infer
2025-09-15fix: Move CoerceShared into opsAapo Alasuutari-6/+7
2025-09-15Bump rustfix 0.8.1 -> 0.8.7Jynn Nelson-8/+8
This commit can be replicated by running `cargo update -p rustfix --precise 0.8.7 && x test ui --bless`. --- The reasons this affects UI tests is as follows: - The UI test suite runs rustc with `-Z deduplicate-diagnostics=no --error-format=json`, which means that rustc emits multiple errors containing identical suggestions. That caused the weird-looking code that had multiple `X: Copy` suggestions. - Those suggestions are interpreted not by rustc itself, but by the `rustfix` library, maintained by cargo but published as a separate crates.io library and used by compiletest. - Sometime between rustfix 0.8.1 and 0.8.7 (probably in cargo 14747, but it's hard to tell because rustfix's versioning doesn't match cargo's), rustfix got smarter and stopped applying duplicate suggestions. Update rustfix to match cargo's behavior. Ideally, we would always share a version of rustfix between cargo and rustc (perhaps with a path dependency?), to make sure we are testing the behavior we ship. But for now, just manually update it to match. Note that the latest version of rustfix published to crates.io is 0.9.1, not 0.8.7. But 0.9.1 is not the version used in cargo, which is 0.9.3. Rather than trying to match versions exactly, I just updated rustfix to the latest in the 0.8 branch.
2025-09-15Introduce basic Reborrow testsAapo Alasuutari-0/+215
2025-09-15Add reborrow CoerceShared feature gate testAapo Alasuutari-0/+16
2025-09-15Fix feature gate teststiif-23/+24
2025-09-15tests/run-make: Update list of statically linked musl targetsJens Reidel-9/+1
All of the tier 3 targets in the list now link dynamically by default (except mips64el-unknown-linux-muslabi64, I overlooked that one). Adjust the list of targets expected to link statically accordingly. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-09-15Only run Cranelift dist test on nightlyJakub Beránek-0/+1
2025-09-15Fix existing testEsteban Küber-17/+4
2025-09-15Silence inference error on `PatKind::Err`Esteban Küber-14/+1
2025-09-15Detect attempt to use var-args in closureEsteban Küber-0/+33
``` error: unexpected `...` --> $DIR/varargs-in-closure-isnt-supported.rs:5:20 | LL | let mut lol = |...| (); | ^^^ not a valid pattern | = note: C-variadic type `...` is not allowed here ```
2025-09-15Fix the testcases to not use UnsizedConstParamTytiif-291/+218
2025-09-15Rollup merge of #146480 - durin42:llvm-22-more-lifetime, r=Mark-SimulacrumMatthias Krüger-2/+2
tests: update new test to accept new lifetime format Same change as rust-lang/rust@258915a55539593423c3d4c30f7b741f65c56e51, just for a newly written test.
2025-09-15Rollup merge of #143314 - tshepang:fix-filename, r=compiler-errorsMatthias Krüger-0/+1
add reference id to test, and fix filename Noticed the filename is wrong, then took advantage of being there by adding Reference id
2025-09-15rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber listTsukasa OI-1/+1
Despite that the `fflags` register (representing floating point exception flags) is stated as a flag register in the reference, it's not in the default clobber list of the RISC-V inline assembly and it would be better to fix it.
2025-09-14Fix typo in error messageJules Bertholet-7/+7
2025-09-14Move more early buffered lints to dyn lint diagnostics (1/N)León Orell Valerian Liehr-2/+2
2025-09-14clean up issue-21950 (dyn trait cast without assoc type at the cast)omskscream-13/+20
2025-09-14clean up issue-18088 (operator from supertrait)omskscream-8/+13
2025-09-14clean up issue-19479 (assoc type from another trait)omskscream-0/+6
2025-09-14clean up issue-2284 (core marker trait name shadowing)omskscream-13/+21
2025-09-13initial implementation of the darwin_objc unstable featureJo Bates-0/+726
2025-09-13Rollup merge of #146521 - folkertdev:document-va-arg-safe, r=workingjubileeJacob Pratt-0/+109
document `core::ffi::VaArgSafe` tracking issue: https://github.com/rust-lang/rust/issues/44930 A modification of https://github.com/rust-lang/rust/pull/146454, keeping just the documentation changes, but not unsealing the trait. Although conceptually we'd want to unseal the trait, there are many edge cases to supporting arbitrary types. We'd need to exhaustively test that all targets/calling conventions support all types that rust might generate (or generate proper error messages for unsupported cases). At present, many of the `va_arg` implementations assume that the argument is a scalar, and has an alignment of at most 8. That is totally sufficient for an MVP (accepting all of the "standard" C types), but clearly does not cover all rust types. This PR also adds some various other tests for edge cases of c-variadic: - the `#[inline]` attribute in its various forms. At present, LLVM is unable to inline c-variadic functions, but the attribute should still be accepted. `#[rustc_force_inline]` already rejects c-variadic functions. - naked functions should accept and work with a C variable argument list. In the future we'd like to allow more ABIs with naked functions (basically, any ABI for which we accept defining foreign c-variadic functions), but for now only `"C"` and `"C-unwind` are supported - guaranteed tail calls: c-variadic functions cannot be tail-called. That was already rejected, but there was not test for it. r? `@workingjubilee`
2025-09-13Rollup merge of #146171 - scrabsha:push-wovnxxwltsun, r=WaffleLapkinJacob Pratt-2/+2
tidy: check that error messages don't start with a capitalized letter
2025-09-13c-variadic: check that inline attributes are accepted on c-variadic functionsFolkert de Vries-0/+47
they don't do anything, because LLVM is unable to inline c-variadic functions (on most targets, anyway)
2025-09-13c-variadic: check that c-variadic functions cannot be tail-calledFolkert de Vries-0/+22
as far as I can see this was not tested, though the error message was already implemented
2025-09-13c-variadic: test `...` with naked functionsFolkert de Vries-0/+40
2025-09-13Mark reads in statements to avoid overlapping assingments.Camille Gillot-14/+12