Commit Graph

19780 Commits

Author SHA1 Message Date
Pavel Grigorenko
187babc35f NoArgsAttributeParser 2025-06-30 23:19:04 +03:00
Trevor Gross
b3d74da9b8 mbe: Extend metavariable expression tests
Add tests showing the current state to make it more clear when output
gets updated later in refactoring.
2025-06-30 19:02:36 +00:00
Trevor Gross
876835de11 mbe: Split metavariable usage tests off from syntax tests
`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-30 19:00:42 +00:00
Matthias Krüger
172fc60e5f Rollup merge of #143223 - nnethercote:improve-macro-stats-printing, r=petrochenkov
Improve macro stats printing

Fix a small formatting issue that has been annoying me.

r? ``@petrochenkov``
2025-06-30 20:49:43 +02:00
Guillaume Gomez
74fda50f3b Remove unused descr methods 2025-06-30 20:36:16 +02:00
Guillaume Gomez
76df2656df Replace ItemCtxt::report_placeholder_type_error match with a call to TyCtxt::def_descr 2025-06-30 20:36:16 +02:00
bors
c65dccabac Auto merge of #143233 - dianqk:rollup-lcx3278, r=dianqk
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-30 14:28:58 +00:00
Michael Goulet
4698c92101 Assemble const bounds via normal item bounds in old solver too 2025-06-30 13:37:26 +00:00
Cameron Steffen
dc9879cb3d Remove let_chains feature 2025-06-30 07:49:20 -05:00
dianqk
e18342a7e8 Rollup merge of #143199 - jieyouxu:short-ice, r=RalfJung
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-30 19:23:22 +08:00
dianqk
7760cd6154 Rollup merge of #143196 - Periodic1911:link_section, r=oli-obk
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-30 19:23:21 +08:00
dianqk
327fe35db3 Rollup merge of #143195 - Kivooeo:tf17, r=tgross35
`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-30 19:23:21 +08:00
dianqk
8ccffc987a Rollup merge of #143168 - Kivooeo:tf16, r=tgross35
`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-30 19:23:18 +08:00
dianqk
3a35f36ae8 Rollup merge of #143159 - compiler-errors:freshen-re-error, r=oli-obk
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-30 19:23:18 +08:00
dianqk
0952f86de3 Rollup merge of #143118 - Kivooeo:tf15, r=tgross35
`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-30 19:23:17 +08:00
dianqk
384d699893 Rollup merge of #142429 - Kivooeo:tf13, r=jieyouxu
`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-30 19:23:14 +08:00
Oli Scherer
38ef94aef1 Stop requiring HIR for trait item wf checks 2025-06-30 08:45:43 +00:00
Oli Scherer
6166cd6b50 Avoid looking at HIR for trait and impl items 2025-06-30 08:45:43 +00:00
Oli Scherer
cb158c2119 Merge lower_item into check_item_type 2025-06-30 08:45:43 +00:00
Oli Scherer
632a921479 Move lazy type alias checks to non-hir-wfck 2025-06-30 08:45:43 +00:00
Oli Scherer
28f023c751 Use predicate spans instead of whole item spans 2025-06-30 08:45:43 +00:00
Oli Scherer
ee8fa4eb16 Check variances in the non-hir wfchecker 2025-06-30 08:45:43 +00:00
Oli Scherer
362d4ddff4 Don't look at static items' HIR for wfcheck 2025-06-30 08:45:43 +00:00
Folkert de Vries
e86fddc6d3 fix bitcast of single-element SIMD vectors 2025-06-30 10:38:35 +02:00
Oli Scherer
9b5d57d0a9 Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
Oli Scherer
d37a04d09d Remove the nullary intrinsic const eval logic and treat them like other intrinsics 2025-06-30 08:04:40 +00:00
Oli Scherer
672e0bec9e Stop backends from needing to support nullary intrinsics 2025-06-30 08:04:19 +00:00
Kivooeo
c240566561 cleaned up some tests 2025-06-30 12:45:47 +05:00
Kivooeo
bf5910d9bb cleaned up some tests 2025-06-30 11:50:19 +05:00
Kivooeo
1e3a2b2d4a cleaned up some tests 2025-06-30 11:23:01 +05:00
Kivooeo
580bc12844 cleaned up some tests 2025-06-30 11:16:18 +05:00
Nicholas Nethercote
e0761a57ab Improve macro-stats printing.
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-30 13:33:51 +10:00
Nicholas Nethercote
25a6fd3213 Augment the macro-stats test.
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-30 12:53:00 +10:00
Kivooeo
4feb5de34c moved tests 2025-06-30 00:03:28 +05:00
Kivooeo
4b6c3d923f moved & deleted some tests 2025-06-29 22:47:01 +05:00
Folkert de Vries
bcf51051ed inherit #[align] from trait method prototypes 2025-06-29 17:22:45 +02:00
Jieyou Xu
20d69c6c26 Re-disable tests/run-make/short-ice on Windows MSVC again 2025-06-29 22:29:12 +08:00
Anne Stijns
54cec0cf5a Port #[link_section] to the new attribute parsing infrastructure 2025-06-29 16:23:46 +02:00
Kivooeo
a38c78c461 moved tests 2025-06-29 18:06:00 +05:00
Kivooeo
d0bd27924e cleaned up some tests 2025-06-29 15:37:33 +05:00
Guillaume Gomez
f9f3935fa7 Rollup merge of #143030 - Urgau:issue-143025, r=SparrowLii
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-29 12:29:55 +02:00
Guillaume Gomez
05b209d3a2 Rollup merge of #142417 - Kivooeo:tf12, r=jieyouxu
`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-29 12:29:55 +02:00
Guillaume Gomez
15b227f715 Rollup merge of #142214 - Kivooeo:tf9, r=jieyouxu
`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-29 12:29:54 +02:00
Guillaume Gomez
66ad1f2abf Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubilee
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-29 12:29:53 +02:00
Matthias Krüger
a262c001f6 Rollup merge of #143171 - fmease:fix-span-of-maybe-const-mod, r=compiler-errors
Fix the span of trait bound modifier `[const]`

r? project-const-traits or anyone
2025-06-29 06:59:33 +02:00
Matthias Krüger
5fc48ff5aa Rollup merge of #143138 - JonathanBrouwer:link_name_parser, r=jdonszelmann
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-29 06:59:31 +02:00
Matthias Krüger
e68f13c9d4 Rollup merge of #142641 - bjorn3:proc_macro_symbols_o, r=jieyouxu
Generate symbols.o for proc-macros too

To ensure used statics are functioning correctly for proc-macros too.
2025-06-29 06:59:28 +02:00
Matthias Krüger
e5bd07ac2e Rollup merge of #142367 - GuillaumeGomez:extern-crate-items-intra-doc, 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-29 06:59:28 +02:00
León Orell Valerian Liehr
f77fead002 Fix the span of trait bound modifier [const] 2025-06-29 04:56:28 +02:00
Trevor Gross
74657a4a1a Move some UI tests to more apropriate directories
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-28 19:07:29 -05:00