about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2025-07-01cleaned up some testsKivooeo-60/+130
2025-07-01Give some UI tests more apropriate namesTrevor Gross-0/+0
Prepare for rework done by the rest of RUST-142440. Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
2025-07-01Rollup merge of #143264 - Muscraft:fix-suggestion-filename, r=compiler-errorsMatthias Krüger-0/+1
fix: Emit suggestion filename if primary diagnostic span is dummy While working on using `annotate-snippets` as `rustc`'s emitter, I came across [`tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr`](https://github.com/rust-lang/rust/blob/b03b3a7ec92682be2917540b679478d41c95a30c/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr), which lacked a filename for both the annotation and the suggestion, which seemed like a bug to me. After some investigation, I found that this is happening because the primary span is a dummy, so its filename doesn't get output, and its filename matches the one for the suggestion, so the suggestion's filename doesn't get output. To fix this issue, I made it so that the filename for a suggestion will get output if the primary span is a dummy.
2025-07-01Rollup merge of #143245 - tgross35:metavariable-expr-organization, ↵Matthias Krüger-604/+666
r=petrochenkov mbe: Add tests and restructure metavariable expressions Add tests that show better diagnostics, and factor `concat` handling to a separate function. Each commit message has further details. This performs the nonfunctional perparation for further changes such as https://github.com/rust-lang/rust/pull/142950 and https://github.com/rust-lang/rust/pull/142975 .
2025-07-01Rollup merge of #143234 - GuillaumeGomez:ice-143128, r=oli-obkMatthias Krüger-62/+88
Replace `ItemCtxt::report_placeholder_type_error` match with a call to `TyCtxt::def_descr` Fixes rust-lang/rust#143128. We could likely use `tcx.def_descr` in more places (and therefore remove more `descr` methods). If it's something that we want to do, I can send a follow-up. r? `@oli-obk`
2025-07-01Rollup merge of #143156 - folkertdev:fn-align-inherit-from-trait, ↵Matthias Krüger-17/+65
r=workingjubilee inherit `#[align]` from trait method prototypes ````@workingjubilee```` this seems straightforward enough. Now that we're planning to make `-Cmin-function-alignment` a target modifier, I don't think there are any cross-crate complications here? ````@Jules-Bertholet```` is this the behavior you had in mind? In particular the inheritance of the attribute of a default impl is maybe a bit unintuitive at first? (but I think it's ok if that behavior is explicitly documented). r? ghost
2025-06-30fix: Emit suggestion filename if primary diagnostic span is dummyScott Schafer-0/+1
2025-06-30mbe: Extend metavariable expression testsTrevor Gross-62/+247
Add tests showing the current state to make it more clear when output gets updated later in refactoring.
2025-06-30mbe: Split metavariable usage tests off from syntax testsTrevor Gross-378/+253
`syntax-errors` currently contains both syntax error tests (which don't need expansion) and tests for incorrect instantiations of the `count` metavariable expression (which do need expansion). Split the expansion-dependent tests to a separate file and remove unneeded invocations from `syntax-errors`, to ensure we are catching these before expansion.
2025-06-30Rollup merge of #143223 - nnethercote:improve-macro-stats-printing, ↵Matthias Krüger-3/+9
r=petrochenkov Improve macro stats printing Fix a small formatting issue that has been annoying me. r? ``@petrochenkov``
2025-06-30Remove unused `descr` methodsGuillaume Gomez-1/+1
2025-06-30Replace `ItemCtxt::report_placeholder_type_error` `match` with a call to ↵Guillaume Gomez-61/+87
`TyCtxt::def_descr`
2025-06-30Auto merge of #143233 - dianqk:rollup-lcx3278, r=dianqkbors-297/+505
Rollup of 14 pull requests Successful merges: - rust-lang/rust#142429 (`tests/ui`: A New Order [13/N]) - rust-lang/rust#142514 (Miri: handling of SNaN inputs in `f*::pow` operations) - rust-lang/rust#143066 (Use let chains in the new solver) - rust-lang/rust#143090 (Workaround for memory unsafety in third party DLLs) - rust-lang/rust#143118 (`tests/ui`: A New Order [15/N]) - rust-lang/rust#143159 (Do not freshen `ReError`) - rust-lang/rust#143168 (`tests/ui`: A New Order [16/N]) - rust-lang/rust#143176 (fix typos and improve clarity in documentation) - rust-lang/rust#143187 (Add my work email to mailmap) - rust-lang/rust#143190 (Use the `new` method for `BasicBlockData` and `Statement`) - rust-lang/rust#143195 (`tests/ui`: A New Order [17/N]) - rust-lang/rust#143196 (Port #[link_section] to the new attribute parsing infrastructure) - rust-lang/rust#143199 (Re-disable `tests/run-make/short-ice` on Windows MSVC again) - rust-lang/rust#143219 (Show auto trait and blanket impls for `!`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-30Rollup merge of #143199 - jieyouxu:short-ice, r=RalfJungdianqk-3/+6
Re-disable `tests/run-make/short-ice` on Windows MSVC again We tried to re-enable this for MSVC in https://github.com/rust-lang/rust/pull/142844. Unfortunately, this test still sometimes fails on Windows MSVC. Tracked in https://github.com/rust-lang/rust/issues/143198. FYI ```@dpaoliello``` (I couldn't reproduce this easily locally either)
2025-06-30Rollup merge of #143196 - Periodic1911:link_section, r=oli-obkdianqk-9/+43
Port #[link_section] to the new attribute parsing infrastructure Ports link_section to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? `@oli-obk` cc `@JonathanBrouwer` `@jdonszelmann`
2025-06-30Rollup merge of #143195 - Kivooeo:tf17, r=tgross35dianqk-87/+111
`tests/ui`: A New Order [17/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35`
2025-06-30Rollup merge of #143168 - Kivooeo:tf16, r=tgross35dianqk-48/+76
`tests/ui`: A New Order [16/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@tgross35` (just small one to test new method, also I should squash all this commits except move commit, so we after review will end up having like one move commit and one commit with changes, right?)
2025-06-30Rollup merge of #143159 - compiler-errors:freshen-re-error, r=oli-obkdianqk-13/+56
Do not freshen `ReError` Because `ReError` has `ErrorGuaranteed` in it, it affects candidate selection and thus causes incompleteness which leads to weirdness in eval. See the comment in the test. Also remove an unnecessary `lookup_op_method` since it doesn't effect tests. Fixes rust-lang/rust#132882. r? types
2025-06-30Rollup merge of #143118 - Kivooeo:tf15, r=tgross35dianqk-40/+56
`tests/ui`: A New Order [15/N] > [!NOTE] > > Intermediate commits are intended to help review, but will be squashed prior to merge. Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? `@jieyouxu`
2025-06-30Rollup merge of #142429 - Kivooeo:tf13, r=jieyouxudianqk-97/+157
`tests/ui`: A New Order [13/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-30Remove the nullary intrinsic const eval logic and treat them like other ↵Oli Scherer-1/+1
intrinsics
2025-06-30Stop backends from needing to support nullary intrinsicsOli Scherer-37/+23
2025-06-30cleaned up some testsKivooeo-17/+45
2025-06-30cleaned up some testsKivooeo-33/+57
2025-06-30cleaned up some testsKivooeo-27/+43
2025-06-30Improve macro-stats printing.Nicholas Nethercote-2/+1
By allowing long names to overlap with the "Uses" field when it has spare space. This avoids unnecessary line breaks in the output.
2025-06-30Augment the macro-stats test.Nicholas Nethercote-3/+10
With a long macro name that could fit on one line, but currently isn't formatted that way, because the name would overlap with the maximum width of the "Uses" column. (The next commit will fix this.)
2025-06-29inherit `#[align]` from trait method prototypesFolkert de Vries-17/+65
2025-06-29Re-disable `tests/run-make/short-ice` on Windows MSVC againJieyou Xu-3/+6
2025-06-29Port #[link_section] to the new attribute parsing infrastructureAnne Stijns-9/+43
2025-06-29moved testsKivooeo-0/+0
2025-06-29cleaned up some testsKivooeo-97/+157
2025-06-29Rollup merge of #143030 - Urgau:issue-143025, r=SparrowLiiGuillaume Gomez-1/+172
Fix suggestion spans inside macros for the `unused_must_use` lint This PR fixes the suggestion spans inside macros for the `unused_must_use` lint by trying to find the oldest ancestor span. Fixes https://github.com/rust-lang/rust/issues/143025
2025-06-29Rollup merge of #142417 - Kivooeo:tf12, r=jieyouxuGuillaume Gomez-145/+162
`tests/ui`: A New Order [12/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-29Rollup merge of #142214 - Kivooeo:tf9, r=jieyouxuGuillaume Gomez-74/+83
`tests/ui`: A New Order [9/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.
2025-06-29Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubileeGuillaume Gomez-25/+138
Add SIMD funnel shift and round-to-even intrinsics This PR adds 3 new SIMD intrinsics - `simd_funnel_shl` - funnel shift left - `simd_funnel_shr` - funnel shift right - `simd_round_ties_even` (vector version of `round_ties_even_fN`) TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`) [#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286) `@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics r? `@workingjubilee`
2025-06-29Rollup merge of #143171 - fmease:fix-span-of-maybe-const-mod, r=compiler-errorsMatthias Krüger-267/+267
Fix the span of trait bound modifier `[const]` r? project-const-traits or anyone
2025-06-29Rollup merge of #143138 - JonathanBrouwer:link_name_parser, r=jdonszelmannMatthias Krüger-46/+29
Port `#[link_name]` to the new attribute parsing infrastructure Ports `link_name` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? `@jdonszelmann`
2025-06-29Rollup merge of #142641 - bjorn3:proc_macro_symbols_o, r=jieyouxuMatthias Krüger-0/+25
Generate symbols.o for proc-macros too To ensure used statics are functioning correctly for proc-macros too.
2025-06-29Rollup merge of #142367 - GuillaumeGomez:extern-crate-items-intra-doc, ↵Matthias Krüger-0/+23
r=lolbinarycat Add regression test for #137857 to ensure that we generate intra doc links for extern crate items. Fixes https://github.com/rust-lang/rust/issues/137857. I checked that linking to extern crates was generating valid links (with the `/index.html` part) and since it's already working, just adding a regression test. r? `@notriddle`
2025-06-29Fix the span of trait bound modifier `[const]`León Orell Valerian Liehr-267/+267
2025-06-28Move some UI tests to more apropriate directoriesTrevor Gross-0/+0
Prepare for rework done in the rest of [PR143118]. [PR143118]: https://www.github.com/rust-lang/rust/pull/143118 Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
2025-06-28Do not freshen ReErrorMichael Goulet-13/+56
2025-06-28Rollup merge of #142987 - lolbinarycat:rustdoc-non_exhaustive-enum-v-142599, ↵Matthias Krüger-0/+25
r=GuillaumeGomez rustdoc: show attributes on enum variants mostly for #[non_exhaustive] unsure if there's any attributes we should take care to *not* include, it could use `render_code_attribute` and `is_non_exhaustive` instead, if that is a concern. fixes rust-lang/rust#142599
2025-06-28moved testsKivooeo-0/+0
2025-06-28cleaned up some testsKivooeo-74/+83
2025-06-28Port `#[link_name]` to the new attribute parsing infrastructureJonathan Brouwer-46/+29
Co-authored-by: Anne Stijns <anstijns@gmail.com> Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-28cleaned up some testsKivooeo-145/+162
2025-06-28Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlinbors-0/+339
Insert checks for enum discriminants when debug assertions are enabled Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following: ```rust let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) }; ``` An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++. This check is similar to Miri's capabilities of checking for valid construction of enum values. This PR is inspired by saethlin@'s PR https://github.com/rust-lang/rust/pull/104862. Thank you so much for keeping this code up and the detailed comments! I also pair-programmed large parts of this together with vabr-g@. r? `@saethlin`
2025-06-28Add regression test for #137857 to ensure that we generate intra doc links ↵Guillaume Gomez-0/+23
for extern crate items.