about summary refs log tree commit diff
path: root/tests/ui
AgeCommit message (Collapse)AuthorLines
2025-06-23tests: Bless cannot-be-called and dedup with unsupported ABI testJubilee Young-1147/+414
2025-06-23tests: Verify varargs with unsupported fn ptr ABIs must errorJubilee Young-0/+27
2025-06-23tests: Adopt ABI transmute tests from crashtestsJubilee Young-0/+24
2025-06-23tests: Update and bless cmse-nonsecure ABI testsJubilee Young-32/+29
2025-06-23tests: Update raw-dylib unsupported ABI testJubilee Young-2/+2
2025-06-23tests: Enhance unsupported ABI testsJubilee Young-1846/+1096
We have fairly different error messages now and handle more cases, so we augment the test in tests/ui/abi/unsupported.rs with more examples to handle structs, traits, and impls on same when those feature the unsupported ABIs of interest.
2025-06-23tests: Bless abi_gpu_kernel feature gate testJubilee Young-66/+57
2025-06-23cleaned up some testsKivooeo-148/+151
2025-06-23mbe: Restructure `macro_metavar_expr` testsTrevor Gross-55/+57
These tests have expanded beyond the RFC, so rename the directory `rfc-3086-metavar-expr` to `metavar-expressions`. `concat` (which wasn't part of the RFC) now fits in this group, so merge its tests into the `metavar-expressions` directory. Additionally rename some related `issue-*` tests.
2025-06-23Rollup merge of #142892 - jdonszelmann:fix-142891, r=oli-obkJana Dönszelmann-0/+19
Fix ICE on debug builds where lints are delayed on the crate root r? ``@oli-obk`` Closes rust-lang/rust#142891 thanks to ``@JonathanBrouwer`` for finding it!
2025-06-23Rollup merge of #142822 - oli-obk:const-partial-eq, r=fee1-deadJana Dönszelmann-597/+101
Make `PartialEq` a `const_trait` r? ``@fee1-dead`` or ``@compiler-errors`` something generally useful but also required for https://github.com/rust-lang/rust/pull/142789
2025-06-23move naked checks out of check_attr.rsJana Dönszelmann-22/+22
2025-06-23fix 142891Jana Dönszelmann-0/+16
2025-06-23test for lint on root node crashJana Dönszelmann-0/+3
2025-06-23Make `PartialEq` a `const_trait`Oli Scherer-597/+101
2025-06-23Rollup merge of #142823 - JonathanBrouwer:no_mangle_parser, r=jdonszelmannMatthias Krüger-12/+12
Port `#[no_mangle]` to new attribute parsing infrastructure Ports `no_mangle` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? ``@jdonszelmann``
2025-06-23Rollup merge of #141597 - Oneirical:unquestionable-instruction, r=jieyouxuMatthias Krüger-0/+1594
Document subdirectories of UI tests with README files Part of rust-lang/rust#133895 and the [2025 Google Summer of Code](https://blog.rust-lang.org/2025/05/08/gsoc-2025-selected-projects/) associated project. When adding a new UI test, one is faced with hundreds of subdirectories in `tests/ui` reflecting various categories. Knowing where to put the new test is not trivial, as many of the categories have slightly misleading names. For example, `moves` does not only refer to the `move` keyword but to functions taking ownership in general, whereas `allocator` does not refer to allocation in general but rather to the very specific `allocator_api` and `global_allocator` features. Many contributors will therefore place their test at the top level of ̀`tests/ui` where it will be mixed with hundreds of unrelated tests. This PR is a tentative move towards more clearly defined tag/categories, with a SUMMARY.md file documenting the true purpose of each subdirectory, placed inside `tests/ui`. r? ``@jieyouxu``
2025-06-22Only inherit local hash for paths.Camille GILLOT-8/+8
2025-06-22Port `#[no_mangle]` to new attribute parsing infrastructureJonathan Brouwer-12/+12
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22Add a SUMMARY.md outlining immediate subdirectories of the ui test suiteOneirical-0/+1594
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2025-06-22Rollup merge of #142798 - camsteffen:recover-semi, r=compiler-errorsGuillaume Gomez-9/+9
Don't fail to parse a struct if a semicolon is used to separate fields The first commit is a small refactor.
2025-06-22Rollup merge of #142780 - JonathanBrouwer:must_use_new_attr, r=jdonszelmannGuillaume Gomez-38/+34
Port `#[must_use]` to new attribute parsing infrastructure Ports `must_use` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? `@jdonszelmann`
2025-06-22Rollup merge of #142594 - mejrs:new_desugaring, r=chenyukangGuillaume Gomez-148/+211
Add DesugaringKind::FormatLiteral Implements `DesugaringKind::FormatLiteral` to mark the FormatArgs desugaring of format literals. The main use for this is to stop yapping about about formatting parameters if we're not anywhere near a format literal. The other use case is to fix suggestions such as https://github.com/rust-lang/rust/issues/141350. It might also be useful for new or existing diagnostics that check whether they're in a format-like macro. cc `@xizheyin` `@fmease`
2025-06-22Rollup merge of #142458 - oli-obk:dyn-incompat, r=compiler-errorsGuillaume Gomez-153/+69
Merge unboxed trait object error suggestion into regular dyn incompat error Another hir-walker removed from the well-formed queries. This error was always a duplicate of another, but it was able to provide more information because it could invoke `is_dyn_compatible` without worrying about cycle errors. That's also the reason we can't put the error directly into hir_ty_lowering when lowering a `dyn Trait` within an associated item signature. So instead I packed it into the error handling of wf obligation checking.
2025-06-22Don't suggest changing a method inside a expansionUrgau-2/+32
2025-06-22Address review commentsUrgau-2/+12
2025-06-22Port `#[must_use]` to new attribute parsing infrastructureJonathan Brouwer-38/+34
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22Stop dbg! macro yapping about format modifiersmejrs-9/+25
2025-06-22Implement DesugaringKind::FormatLiteralmejrs-143/+190
2025-06-22Rollup merge of #142776 - dtolnay:hirattrstyle2, r=jdonszelmannJacob Pratt-45/+63
All HIR attributes are outer Fixes https://github.com/rust-lang/rust/issues/142649. Closes https://github.com/rust-lang/rust/pull/142759. All HIR attributes, including parsed and not yet parsed, will now be rendered as outer attributes by `rustc_hir_pretty`. The original style of the corresponding AST attribute(s) is not relevant for pretty printing, only for diagnostics. r? ````@jdonszelmann````
2025-06-21target-feature: enable rust target features implied by target-cpuJed Brown-0/+28
Normally LLVM and rustc agree about what features are implied by target-cpu, but for NVPTX, LLVM considers sm_* and ptx* features to be exclusive, which makes sense for codegen purposes. But in Rust, we want to think of them as: sm_{sver} means that the target supports the hardware features of sver ptx{pver} means the driver supports PTX ISA pver Intrinsics usually require a minimum sm_{sver} and ptx{pver}. Prior to this commit, -Ctarget-cpu=sm_70 would activate only sm_70 and ptx60 (the minimum PTX version that supports sm_70, which maximizes driver compatibility). With this commit, it also activates all the implied target features (sm_20, ..., sm_62; ptx32, ..., ptx50).
2025-06-21add nvptx_target_featureJed Brown-1/+58
Add target features for sm_* and ptx*, both of which form a partial order, but cannot be combined to a single partial order. These mirror the LLVM target features, but we do not provide LLVM target processors (which imply both an sm_* and ptx* feature). Add some documentation for the nvptx target.
2025-06-21Auto merge of #142546 - cjgillot:reachable-jump, r=compiler-errorsbors-0/+20
Only traverse reachable blocks in JumpThreading. Fixes https://github.com/rust-lang/rust/issues/131451 We only compute loop headers for reachable blocks. We shouldn't try to perform an opt on unreachable blocks anyway.
2025-06-21All HIR attributes are outerDavid Tolnay-45/+41
2025-06-21Add regression test for issue 142649David Tolnay-0/+22
2025-06-21Rollup merge of #142698 - tgross35:concat-byte-cstr-diag, r=petrochenkovJana Dönszelmann-29/+95
Improve diagnostics for `concat_bytes!` with C string literals Use the same error as other invalid types for `concat_bytes!`, rather than using `ConcatCStrLit` from `concat!`. Also add more information with a note about why this doesn't work, and a suggestion to use a null-terminated byte string instead.
2025-06-21Rollup merge of #142787 - samueltardieu:diag-items-for-clippy, ↵Matthias Krüger-10/+0
r=Manishearth,Urgau Add diagnostic items for Clippy Clippy still uses some paths to access items from the standard library. Adding the missing diagnostic items allows removing the last remaining paths. Closes rust-lang/rust-clippy#5393
2025-06-21Rollup merge of #142597 - folkertdev:abi-cannot-be-called, r=workingjubileeMatthias Krüger-176/+1293
error on calls to ABIs that cannot be called We recently added `extern "custom"`, which cannot be called using a rust call expression. But there are more ABIs that can't be called in that way, because the call does not semantically make sense. More details are in https://github.com/rust-lang/rust/issues/140566#issuecomment-2846205457 r? `@workingjubilee` try-job: x86_64-gnu-llvm-19-3
2025-06-20Rollup merge of #142485 - mu001999-contrib:dead-code/adt-pattern, r=petrochenkovTrevor Gross-16/+131
Marks ADT live if it appears in pattern Marks ADT live if it appears in pattern, it implies the construction of the ADT. 1. Then we can detect unused private ADTs impl `Default`, without special logics for `Default` and other std traits. 2. We can also remove `rustc_trivial_field_reads` on `Default`, and the logic in `should_ignore_item` (introduced by rust-lang/rust#126302). Fixes rust-lang/rust#120770 Extracted from rust-lang/rust#128637. r? `@petrochenkov`
2025-06-20Auto merge of #142794 - tgross35:rollup-iae7okj, r=tgross35bors-25/+79
Rollup of 9 pull requests Successful merges: - rust-lang/rust#142331 (Add `trim_prefix` and `trim_suffix` methods for both `slice` and `str` types.) - rust-lang/rust#142491 (Rework #[cold] attribute parser) - rust-lang/rust#142494 (Fix missing docs in `rustc_attr_parsing`) - rust-lang/rust#142495 (Better template for `#[repr]` attributes) - rust-lang/rust#142497 (Fix random failure when JS code is executed when the whole file was not read yet) - rust-lang/rust#142575 (Ensure copy* intrinsics also perform the static self-init checks) - rust-lang/rust#142650 (Refactor Translator) - rust-lang/rust#142713 (mbe: Refactor transcription) - rust-lang/rust#142755 (rustdoc: Remove `FormatRenderer::cache`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-20Recover from semicolon field separatorCameron Steffen-9/+9
2025-06-20Make some `use _` tests multi-editionEsteban Küber-13/+104
2025-06-20Rollup merge of #142767 - nnethercote:symbol-cleanups, r=petrochenkovJakub Beránek-1/+1
Some symbol and PathRoot cleanups I'm looking into unifying how we join and print paths. Here are some preliminary cleanups. r? ``@petrochenkov``
2025-06-20Rollup merge of #142715 - folkertdev:fn-align-corrections, r=jdonszelmannJakub Beránek-31/+33
correct template for `#[align]` attribute Tracking issue: https://github.com/rust-lang/rust/issues/82232 related: https://github.com/rust-lang/rust/pull/142507 I didn't fully understand what `template!` did, clearly. An empty `#[align]` attribute was still rejected later, but without this change it does get suggested in certain cases. I've also updated some outdated references to `#[repr(align)]` on functions. r? ``@jdonszelmann``
2025-06-20Rollup merge of #142575 - oli-obk:sneaky-self-init, r=RalfJungTrevor Gross-0/+39
Ensure copy* intrinsics also perform the static self-init checks fixes rust-lang/rust#142532 r? `@RalfJung`
2025-06-20Rollup merge of #142495 - jdonszelmann:better-repr-template, r=oli-obkTrevor Gross-5/+5
Better template for `#[repr]` attributes
2025-06-20Bless UI tests: do not print alternate implementors of `Step`Samuel Tardieu-10/+0
Alternative candidates for a trait implementation are not printed when the trait has a diagnostic name, to avoid printing alternatives for common stdlib traits such as `Copy` or `Debug`. However, this affects all traits for which a diagnostic item is added. Here, the list of alternatives candidates for `Step` does not seem useful, and `Step` is unstable, so this will not be missed.
2025-06-20error on calls to ABIs that cannot be calledFolkert de Vries-176/+1293
2025-06-20expected word diagnostic testJana Dönszelmann-0/+15
2025-06-20coldJana Dönszelmann-20/+20