Commit Graph

119 Commits

Author SHA1 Message Date
bors 77a4fb62f7 Auto merge of #155678 - aerooneqq:single-owners-query-exp, r=oli-obk
Merge several HIR-level queries into one



Now four queries (`local_def_id_to_hir_id`, `opt_hir_owner_nodes`, `opt_ast_lowering_delayed_lints`, `in_scope_traits_map`) were replaced with regular methods which acts like getters. 
An `hir_owner` query was added that returns a `ProjectedMaybeOwner` that contains all those fields. `hir_attr_map` remains a separate query as adding attributes to `ProjectedMaybeOwner` led to [perf regressions](https://github.com/rust-lang/rust/pull/155678#issuecomment-4304597871). 
There is a similar issue with `in_scopes_trait_map`, but according to the comments from https://github.com/rust-lang/rustc-perf/pull/2436 it is a rare case.
Most of the changes in incremental tests are renames from `opt_hir_owner_nodes` -> `hir_owner`, but there are few cases when new dirty queries were added.

r? @petrochenkov
r? @oli-obk
2026-05-27 11:45:44 +00:00
cyrgani 7450bf099e reduce usage of box_patterns in tests 2026-05-18 10:14:41 +00:00
aerooneqq 1f60130485 Add hir_ prefixes for queries 2026-05-18 08:51:08 +03:00
aerooneqq 5f6b026721 Merge several hir-level queries into single owner query 2026-05-15 11:16:56 +03:00
Jacob Pratt 71e64b9d25 Rollup merge of #156124 - nnethercote:StableHash-renamings-2, r=jieyouxu
Make stable hashing names consistent (part 2)

This PR finishes the implementation of MCP 893.

r? @jieyouxu
2026-05-09 09:27:58 -04:00
Nicholas Nethercote ad6647f904 Rename the span_hash_stable method as stable_hash_span.
Likewise for the corresponding incremental test.

Part of MCP 983.
2026-05-08 14:37:20 +10:00
Qai Juang 0f437887c6 Do not cache lints_that_dont_need_to_run across sessions 2026-05-05 19:17:53 -04:00
Oli Scherer 11d88ee42b Rip out rustc_layout_scalar_valid_range_* attribute support 2026-05-03 10:59:52 +02:00
Zalathar edbb86264d Add support for cpass incremental revisions 2026-04-22 12:34:14 +10:00
Zalathar 0ea8958c02 Migrate bfail/build-pass tests to bpass (2/2)
This is the subset of incremental tests that have a FIXME to consider migrating
to check-pass instead.

That migration is beyond the scope of this PR, but might be attempted later.
2026-04-22 12:28:25 +10:00
Zalathar 793c646b7b Migrate bfail/build-pass tests to bpass (1/2)
This is the subset of incremental tests that should continue to use `bpass`
even after `cpass` is supported, because they (presumably) involve codegen.
2026-04-22 12:28:25 +10:00
Zalathar 72abf370bb Rename incremental cfail/cpass revisions to bfail/bpass
Long ago, UI tests were divided into "compile" and "run" tests. Later, the
compile tests were further subdivided into "check" and "build" tests, to speed
up tests that don't need a full build.

The same split was never applied to incremental test revisions, so the only way
to perform a check build in incremental tests is (confusingly) to use a `cfail`
revision and then specify `//@ check-fail` or `//@ check-pass`.

This PR makes room for dedicated check-fail and check-pass revisions by
renaming the existing `cfail` and `cpass` revisions to `bfail` and `bpass`,
since they currently perform a full build.
2026-04-18 18:13:17 +10:00
Jonathan Brouwer 5c7384e1c9 Add regression test 2026-04-17 16:08:45 +02:00
Zalathar 975402e329 Remove the //@ should-ice directive
This directive was only being used by one test, which can just as easily use
the more general `//@ failure-status` directive instead.

All of the removed exit-code checks were redundant with other exit-code checks
that are still present.
2026-04-17 13:43:50 +10:00
Zalathar c79fcfcca8 Fix some irrelevant warnings in tests/incremental
This avoids having to add several unhelpful annotations when enabling
diagnostic checks for `cpass` and `rpass` revisions.
2026-04-13 20:48:07 +10:00
Jonathan Brouwer ea86990ee6 Regression test for issue 154878
Co-authored-by: Edvin Bryntesson <epost@edvinbryntesson.se>
2026-04-09 20:34:37 +02:00
Zalathar a5181d2fd6 Remove rfail support from incremental tests
Incremental revisions beginning with `rfail` would cause the incremental test
runner to build the test program, expecting success, and then run the test
program, expecting failure.

Expecting incremental tests to fail at runtime is of questionable utility,
because in almost all cases an equivalent test program can be made to succeed
at runtime instead.

Removing `rfail` support is a small step towards cleaning up compiletest's
incremental test runner, and its overall handling of pass/fail expectations.

There was one existing regression test using `rfail` revisions:
`tests/incremental/issue-80691-bad-eval-cache.rs`. The test code is complex,
and reverting the fix in RUST-83220 does not actually cause the test to fail,
suggesting that it is no longer a useful regression test. This commit therefore
deletes that test.
2026-04-04 13:31:31 +11:00
bors 009a6c1e8b Auto merge of #154308 - ShoyuVanilla:undo-fudge-iv, r=jieyouxu
Revert #151380 and #153869

cc https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23153869.3A.20beta-nominated/with/581306395

r? ghost
2026-04-02 00:09:59 +00:00
Daria Sukhonina 1792232d01 fix tests/incremental/hashes 2026-03-28 12:38:49 +03:00
Daria Sukhonina 5cf7376aac Rename typeck into typeck_root in tests/incremental 2026-03-28 12:38:49 +03:00
Shoyu Vanilla d5bbeb978e Revert "Auto merge of #151380 - ShoyuVanilla:shallow-resolve-to-root-var, r=lcnr"
This reverts commit 75b9d89c68, reversing
changes made to 7bee525095.
2026-03-24 22:31:37 +09:00
John Kåre Alsaker fed57899b9 Remove value_from_cycle_error specialization for type_of 2026-03-13 18:52:26 +01:00
mu001999 0436634084 Remove unused features in tests 2026-03-04 08:06:45 +08:00
mu001999 28b6bcb42d Add tests for unused-features 2026-03-02 09:38:04 +08:00
mejrs cfc2468969 Port rustc_on_unimplemented attribute 2026-02-24 10:50:38 +01:00
Camille Gillot a182053fa0 Bless incremental. 2026-02-22 19:43:57 +00:00
Shoyu Vanilla 8062bee9e3 Bless tests 2026-02-11 18:08:18 +09:00
Jamie Hill-Daniel 94a0ba50e1 Port rustc_clean to attribute parser
Also remove mentions of removed `rustc_dirty`
2026-02-04 20:58:02 +00:00
Felix Rath 8fa2f693bb Implement incremental caching for derive macro expansions 2026-01-16 07:36:36 +01:00
mu001999 6c2dc40666 Bless other tests 2026-01-07 09:33:40 +08:00
Jonathan Brouwer 1d204fcf1d Add unsafe to no_mangle incremental tests 2025-12-03 17:00:22 +01:00
Mara Bos 7b42543f81 Bless tests. 2025-11-12 12:48:27 +01:00
Romain Perier c8c04663c5 Add a note when a type implements a trait with the same name as the required one
This is useful when you have two dependencies that use different trait for
the same thing and with the same name. The user can accidentally implement
the bad one which might be confusing. This commits refactorizes existing
diagnostics about multiple different crates with the same version and adds
a note when similarly named traits are found. All diagnostics are merged
into a single one.
2025-11-11 17:36:43 +01:00
Ben Kimock 775da711c6 Add a fast path for lowering trivial consts 2025-10-25 16:59:53 -04:00
Guillaume Gomez 5ff7ca2e22 Ignore failing incremental tests for GCC backend 2025-10-13 15:20:49 +02:00
Camille GILLOT 27127e342d Bless incremental tests. 2025-07-13 13:50:01 +00:00
Oli Scherer 38ef94aef1 Stop requiring HIR for trait item wf checks 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 9b5d57d0a9 Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
Vadim Petrochenkov 7a4f09c224 compiletest: Improve diagnostics for line annotation mismatches 2025-06-23 21:30:56 +03:00
Trevor Gross c93fac7d64 Rollup merge of #142485 - mu001999-contrib:dead-code/adt-pattern, r=petrochenkov
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-20 23:25:55 -04:00
David Wood 183458263b tests: bless remaining tests
These tests just need blessing, they don't have any interesting behaviour
changes.

Some of these tests have new errors because `LegacyReceiver` cannot be
proven to be implemented now that it is also testing for `MetaSized` -
but this is just a consequence of the other errors in the test.
2025-06-16 23:04:35 +00:00
Mu001999 52167e04e6 Marks ADT live if it appears in pattern 2025-06-14 13:44:43 +08:00
Jubilee Young 643a9d233b tests: Change "fastcall" to "system" in some tests
Lets the test still work on different architectures.
2025-06-09 16:10:21 -07:00
Michael Goulet f7db329e81 Add a test to reproduce ICE 2025-06-03 20:56:45 +00:00
Michael Goulet df47958894 Remove manual WF hack 2025-05-07 16:29:59 +00:00
Vadim Petrochenkov 56d6b4e427 compiletest: Support matching on non-json lines in compiler output
and migrate most of remaining `error-pattern`s to it.
2025-05-04 18:27:45 +03:00
Vadim Petrochenkov 879b12e2ce compiletest: Do not require annotations on empty labels and suggestions 2025-05-03 22:49:23 +03:00
Vadim Petrochenkov 93bee0789a UI tests: migrate remaining compile time error-patterns to line annotations
when possible.
2025-04-13 21:48:53 +03:00
Pietro Albini cd371b90e2 replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00