rust/tests/ui/resolve
rust-bors[bot] f57eac1bf9
Auto merge of #146923 - oli-obk:comptime-reflect, r=BoxyUwU
Reflection MVP

I am opening this PR for discussion about the general design we should start out with, as there are various options (that are not too hard to transition between each other, so we should totally just pick one and go with it and reiterate later)

r? @scottmcm and @joshtriplett

project goal issue: https://github.com/rust-lang/rust-project-goals/issues/406
tracking issue: https://github.com/rust-lang/rust/issues/146922

The design currently implemented by this PR is

* `TypeId::info` (method, usually used as `id.info()` returns a `Type` struct
* the `Type` struct has fields that contain information about the type
* the most notable field is `kind`, which is a non-exhaustive enum over all possible type kinds and their specific information. So it has a `Tuple(Tuple)` variant, where the only field is a `Tuple` struct type that contains more information (The list of type ids that make up the tuple).
* To get nested type information (like the type of fields) you need to call `TypeId::info` again.
* There is only one language intrinsic to go from `TypeId` to `Type`, and it does all the work

An alternative design could be

* Lots of small methods (each backed by an intrinsic) on `TypeId` that return all the individual information pieces (size, align, number of fields, number of variants, ...)
* This is how C++ does it (see https://lemire.me/blog/2025/06/22/c26-will-include-compile-time-reflection-why-should-you-care/ and https://isocpp.org/files/papers/P2996R13.html#member-queries)
* Advantage: you only get the information you ask for, so it's probably cheaper if you get just one piece of information for lots of types (e.g. reimplementing size_of in terms of `TypeId::info` is likely expensive and wasteful)
* Disadvantage: lots of method calling (and `Option` return types, or "general" methods like `num_fields` returning 0 for primitives) instead of matching and field accesses
* a crates.io crate could implement `TypeId::info` in terms of this design

The backing implementation is modular enough that switching from one to the other is probably not an issue, and the alternative design could be easier for the CTFE engine's implementation, just not as nice to use for end users (without crates wrapping the logic)

One wart of this design that I'm fixing in separate branches is that `TypeId::info` will panic if used at runtime, while it should be uncallable
2026-01-10 15:00:14 +00:00
..
auxiliary moved some test 2026-01-05 10:04:46 +09:00
suggestions Rollup merge of #149791 - clubby789:cfg-bool-lints, r=jdonszelmann 2025-12-12 12:19:09 +01:00
112590-2.fixed Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
112590-2.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
112590-2.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
associated-fn-called-as-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-fn-called-as-fn.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
attr-macros-positional-rejection.rs Adjust tests/ui/attrs-resolution-errors.rs 2024-12-17 19:57:42 +08:00
attr-macros-positional-rejection.stderr Adjust tests/ui/attrs-resolution-errors.rs 2024-12-17 19:57:42 +08:00
bad-env-capture.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
bad-env-capture.stderr compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
bad-env-capture2.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
bad-env-capture2.stderr compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
bad-env-capture3.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
bad-env-capture3.stderr compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
bad-expr-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-expr-path.stderr rustc_hir_analysis: add a helper to check function the signature mismatches 2023-09-19 18:15:23 +02:00
bad-expr-path2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-expr-path2.stderr rustc_hir_analysis: add a helper to check function the signature mismatches 2023-09-19 18:15:23 +02:00
bad-module.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
bad-module.stderr Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
bad-type-env-capture.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-type-env-capture.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
blind-item-local-shadow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
blind-item-mixed-crate-use-item.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
blind-item-mixed-use-item.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
block-with-trait-parent.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cannot-find-value-in-scope-22811.rs Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
cannot-find-value-in-scope-22811.stderr Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
change-ty-to-const-param-sugg-0.rs Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
change-ty-to-const-param-sugg-0.stderr Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
change-ty-to-const-param-sugg-1.rs Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
change-ty-to-const-param-sugg-1.stderr Suggest changing ty to const params if appropriate 2024-02-02 03:25:04 +01:00
conflicting-primitive-names.rs Add UI tests related to feature-gated primitives 2024-03-14 13:32:54 -04:00
const-iter-no-conflict-for-loop.rs cleaned up some tests 2026-01-05 15:35:01 +09:00
const-with-typo-in-pattern-binding-ice-135289.rs add test for issue 135289 2025-01-21 16:18:27 +00:00
const-with-typo-in-pattern-binding.rs Detect const in pattern with typo 2024-11-20 17:55:18 +00:00
const-with-typo-in-pattern-binding.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
crate-called-as-function.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
crate-called-as-function.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
crate-in-paths.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
crate-in-paths.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
derive-macro-1.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
derive-macro-2.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
disambiguate-identical-names.rs Move some UI tests into subdirectories 2023-04-02 19:42:30 -04:00
disambiguate-identical-names.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
dont-compute-arg-names-for-non-fn.rs Rename some name variables as ident. 2025-04-10 09:30:55 +10:00
dont-compute-arg-names-for-non-fn.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
dot-notation-type-namespace-suggest-path-sep.rs When giving a suggestion to use :: instead of . where the rhs is a macro giving a type, 2025-02-18 13:11:37 -06:00
dot-notation-type-namespace-suggest-path-sep.stderr Update . -> :: tests for new diff suggestion format. 2025-02-18 13:28:35 -06:00
duplicate-name-in-module-6936.rs Add test batch 1 2025-08-27 00:23:26 -04:00
duplicate-name-in-module-6936.stderr Add test batch 1 2025-08-27 00:23:26 -04:00
editions-crate-root-2015.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
editions-crate-root-2015.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
editions-crate-root-2018.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
editions-crate-root-2018.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
enum-expected-value-suggest-variants.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
enum-expected-value-suggest-variants.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
enums-are-namespaced-xc.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
enums-are-namespaced-xc.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
enums-pats-not-idents.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
enums-pats-not-idents.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
explicit-self-lowercase-param.rs Improve error for self: Box<self> 2023-05-11 13:21:10 +01:00
explicit-self-lowercase-param.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
export-fully-qualified-2018.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
export-fully-qualified-2018.stderr Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
export-fully-qualified.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
export-fully-qualified.stderr Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
extern-crate-lint-issue-141785.rs Fix false positive lint error from no_implicit_prelude attr 2025-06-02 17:49:01 +08:00
extern-prelude-fail.rs Add more missing 2015 edition directives 2025-06-05 09:20:19 +02:00
extern-prelude-fail.stderr Add more missing 2015 edition directives 2025-06-05 09:20:19 +02:00
extern-prelude-speculative.rs resolve: Split extern prelude into two scopes 2025-08-13 17:45:40 +03:00
extern-prelude.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
false-self-in-macro-issue-143134.rs Add ui test resolve/false-self-in-macro-issue-143134.rs 2025-07-03 23:11:57 +08:00
false-self-in-macro-issue-143134.stderr Return early when self resolve failure because of let self = ... 2025-07-03 23:47:19 +08:00
field-and-method-in-self-not-available-in-assoc-fn.rs When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
field-and-method-in-self-not-available-in-assoc-fn.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
filter-intrinsics.rs Add size_of, size_of_val, align_of, and align_of_val to the prelude 2024-05-13 15:11:28 +02:00
filter-intrinsics.stderr Add size_of, size_of_val, align_of, and align_of_val to the prelude 2024-05-13 15:11:28 +02:00
fn-item-cant-capture-dynamic-env.rs Cleaned up 5 tests in tests/ui 2025-04-25 20:50:57 +09:00
fn-item-cant-capture-dynamic-env.stderr Cleaned up 5 tests in tests/ui 2025-04-25 20:50:57 +09:00
function-module-ambiguity-error-71406.rs Add test batch 5 2025-10-12 00:33:20 -04:00
function-module-ambiguity-error-71406.stderr Add test batch 5 2025-10-12 00:33:20 -04:00
generic-params-from-outer-item-in-const-item.default.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
generic-params-from-outer-item-in-const-item.generic_const_items.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
generic-params-from-outer-item-in-const-item.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
global-scope-resolution.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
hidden_glob_reexports.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
hidden_glob_reexports.stderr Adjust span labels for HIDDEN_GLOB_REEXPORTS 2023-06-10 17:11:38 +08:00
ice-inconsistent-resolution-149821.rs Fix: Prevent macro-expanded extern crates from shadowing extern arguments 2025-12-12 16:22:25 +00:00
ice-inconsistent-resolution-149821.stderr Fix: Prevent macro-expanded extern crates from shadowing extern arguments 2025-12-12 16:22:25 +00:00
impl-items-vis-unresolved.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-items-vis-unresolved.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
incorrect-self-res.rs Delay span bug when Self resolves to DefKind::{Mod,Trait} 2024-04-15 21:05:15 -04:00
incorrect-self-res.stderr Delay span bug when Self resolves to DefKind::{Mod,Trait} 2024-04-15 21:05:15 -04:00
inner-attr-prelude-macro.rs resolve prelude import at build_reduced_graph phase 2025-08-14 15:28:35 +02:00
issue-2330.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-2330.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-2356.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-2356.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
issue-3021-c.rs Generalize E0401 2023-09-10 23:06:14 +02:00
issue-3021-c.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
issue-3021.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-3021.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3099-a.rs Move tests 2023-05-08 17:58:01 -03:00
issue-3099-a.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3099-b.rs Move tests 2023-05-08 17:58:01 -03:00
issue-3099-b.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3214.rs Move some tests 2024-04-21 15:43:43 -03:00
issue-3214.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
issue-3907-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-3907-2.stderr Compiler: Finalize dyn compatibility renaming 2025-01-26 21:20:31 +01:00
issue-3907.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-3907.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-5035-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5035-2.stderr On implicit Sized bound on fn argument, point at type instead of pattern 2024-09-27 00:45:02 +00:00
issue-5035.rs Use non-2015 edition paths in tests that do not test for their resolution 2025-06-05 09:19:31 +02:00
issue-5035.stderr Use non-2015 edition paths in tests that do not test for their resolution 2025-06-05 09:19:31 +02:00
issue-5099.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5099.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-5927.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-5927.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6642.rs Move tests 2023-08-28 17:47:37 -03:00
issue-6642.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-6702.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6702.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-10200.rs On function and method calls in patterns, link to the book 2024-10-06 01:44:59 +00:00
issue-10200.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
issue-12796.rs Special case 'generic param from outer item' message for Self 2024-01-14 12:31:34 +00:00
issue-12796.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
issue-14254.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-14254.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
issue-16058.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-16058.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-17518.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-17518.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-18252.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-18252.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-19452.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-19452.stderr More accurate suggestions when writing wrong style of enum variant literal 2024-07-18 18:20:35 +00:00
issue-21221-1.rs Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-21221-1.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-21221-2.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-21221-2.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-21221-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21221-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-21221-4.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21221-4.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-23305.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-23305.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-23716.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
issue-23716.stderr compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
issue-24968.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24968.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-26545.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-26545.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-30535.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-30535.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-31845.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-31845.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-33876.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-33876.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-35675.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-35675.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-39226.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39226.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
issue-39559-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39559-2.stderr Remove #[const_trait] 2025-11-08 07:37:15 +01:00
issue-39559.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-39559.stderr Use more accurate span in resolve_ident_in_lexical_scope 2025-11-03 16:24:35 +00:00
issue-42944.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-42944.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-49074.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49074.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
issue-50599.rs Suppress "erroneous constant used" for constants tainted by errors 2023-05-15 00:00:00 +00:00
issue-50599.stderr fix ICE on type error in promoted 2024-12-09 15:17:26 +01:00
issue-54379.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54379.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55673.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55673.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55673.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
issue-57523.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-60057.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-60057.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
issue-65025-extern-static-parent-generics.rs Generalize E0401 2023-09-10 23:06:14 +02:00
issue-65025-extern-static-parent-generics.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
issue-65035-static-with-parent-generics.rs Generalize E0401 2023-09-10 23:06:14 +02:00
issue-65035-static-with-parent-generics.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
issue-69401-trait-fn-no-body-ty-local.rs Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-69401-trait-fn-no-body-ty-local.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-70736-async-fn-no-body-def-collector.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70736-async-fn-no-body-def-collector.stderr Stabilize AFIT and RPITIT 2023-10-13 21:01:36 +00:00
issue-73427.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-73427.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
issue-80079.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80079.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-81508.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-81508.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82156.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-82156.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-82865.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-82865.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-85348.rs Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-85348.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-85671.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-88472.rs Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-88472.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
issue-90113.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-90113.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-100365.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100365.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-101749-2.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
issue-101749-2.stderr Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
issue-101749.fixed Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
issue-101749.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
issue-101749.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-102946.rs remove deprecated Error::description in impls 2025-08-26 06:36:53 +00:00
issue-102946.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-103202.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103202.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-103474.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103474.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-104700-inner_scope.rs resolve: Add one more test case for "binding is available in a different scope" help 2025-08-14 18:50:58 +03:00
issue-104700-inner_scope.stderr resolve: Add one more test case for "binding is available in a different scope" help 2025-08-14 18:50:58 +03:00
issue-105069.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105069.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-107563-ambiguous-glob-reexports.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-107563-ambiguous-glob-reexports.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-108529.rs diagnostics: avoid querying associated_item in the resolver 2023-02-27 09:22:51 -07:00
issue-108529.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-109153.rs fix(resolve): update shadowed_glob more precision 2023-06-14 01:38:35 +08:00
issue-109153.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-109250.rs refactor(resolve): clean up the early error return caused by non-call 2023-05-10 22:35:01 +08:00
issue-109250.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-111312.rs Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
issue-111312.stderr Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
issue-111727.rs Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
issue-111727.stderr Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
issue-112472-multi-generics-suggestion.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-112472-multi-generics-suggestion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-112472-multi-generics-suggestion.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-113808-invalid-unused-qualifications-suggestion.fixed fixes #121331 2024-03-14 09:54:42 +08:00
issue-113808-invalid-unused-qualifications-suggestion.rs fixes #121331 2024-03-14 09:54:42 +08:00
issue-113808-invalid-unused-qualifications-suggestion.stderr fixes #121331 2024-03-14 09:54:42 +08:00
issue-114433-invalid-unused-qualifications-suggestion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-116164.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-116164.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
issue-117920.rs Use the glob binding in resolve_rustdoc_path process 2023-12-06 21:48:19 +08:00
issue-117920.stderr Use the glob binding in resolve_rustdoc_path process 2023-12-06 21:48:19 +08:00
issue-118295.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
issue-118295.stderr Add a label to point to the lacking macro name definition 2024-07-26 10:51:55 +08:00
issue-120559.rs remove importing suggestions when there is a shadowed typo canddiate 2024-02-14 14:08:51 +08:00
issue-120559.stderr remove importing suggestions when there is a shadowed typo canddiate 2024-02-14 14:08:51 +08:00
levenshtein.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
levenshtein.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
local-shadows-inner-generic.rs Don't consider RibKind::Module's bindings when checking generics shadowing 2024-08-19 17:24:27 -04:00
macro-determinacy-non-module.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-associated-items.rs Cleaned up some tests 2025-12-23 21:13:24 +09:00
missing-associated-items.stderr Cleaned up some tests 2025-12-23 21:13:24 +09:00
missing-in-namespace.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
missing-in-namespace.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
missing-type-in-scope-58712.rs Add test batch 3 2025-09-12 14:45:12 -04:00
missing-type-in-scope-58712.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
module-used-as-struct-constructor.rs Cleaned up some tests 2025-12-16 02:10:08 +09:00
module-used-as-struct-constructor.stderr Cleaned up some tests 2025-12-16 02:10:08 +09:00
multiple_definitions_attribute_merging.rs Normalize away the maybe remapped paths to the compiler and std 2025-12-18 21:18:05 +01:00
multiple_definitions_attribute_merging.stderr Normalize away the maybe remapped paths to the compiler and std 2025-12-18 21:18:05 +01:00
name-clash-nullary.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
name-clash-nullary.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
name-collision-in-trait-fn-sig.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-explicit-path.rs cleaned up some tests 2025-12-02 11:24:03 +09:00
no-implicit-prelude-nested.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-implicit-prelude-nested.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
no-implicit-prelude.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no-implicit-prelude.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
no-std-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-std-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-std-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
non-macro-attrs-accepted.rs Adjust tests/ui/attrs-resolution.rs 2024-12-17 19:57:42 +08:00
nonexistent-macro.rs cleaned up some tests 2025-06-11 17:49:03 +05:00
nonexistent-macro.stderr cleaned up some tests 2025-06-11 17:49:03 +05:00
parse-error-resolve.rs compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
parse-error-resolve.stderr Silence use foo::Bar; error if Bar isn't found in foo and foo.rs has parse errors 2024-12-10 18:18:03 +00:00
parse_error.rs Add test for resolve errors caused by mod with parse errors 2024-12-10 18:00:11 +00:00
parse_error.stderr Add test for resolve errors caused by mod with parse errors 2024-12-10 18:00:11 +00:00
path-attr-in-const-block.rs fix ICE on stable related to attrs on macros 2025-08-24 09:20:57 +02:00
path-attr-in-const-block.stderr fix ICE on stable related to attrs on macros 2025-08-24 09:20:57 +02:00
pathless-extern-ok.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
point-at-type-parameter-shadowing-another-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
point-at-type-parameter-shadowing-another-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
pointer-type-impls-14254.rs comments 2025-08-05 19:34:46 +05:00
prelude-order.rs Ignore more failing ui tests for GCC backend 2025-09-26 15:33:48 +02:00
prelude-order.stderr Ignore more failing ui tests for GCC backend 2025-09-26 15:33:48 +02:00
prim-crate-partial-res.rs Fix up partial res of segment in primitive resolution hack 2025-03-30 04:22:14 +00:00
prim-crate-partial-res.stderr Fix up partial res of segment in primitive resolution hack 2025-03-30 04:22:14 +00:00
primitive-f16-f128-shadowed-mod.rs Update f16 and f128 tests to run on both 2015 and 2018 editions 2024-04-03 16:03:22 -04:00
primitive-f16-f128-shadowed.rs Update f16 and f128 tests to run on both 2015 and 2018 editions 2024-04-03 16:03:22 -04:00
primitive-usage.rs Add UI tests related to feature-gated primitives 2024-03-14 13:32:54 -04:00
privacy-enum-ctor.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
privacy-enum-ctor.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
privacy-struct-ctor.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
privacy-struct-ctor.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
private-constructor-self-issue-147343.rs More intuitive error when using self to instantiate tuple struct with private field 2025-10-25 22:46:15 +01:00
private-constructor-self-issue-147343.stderr More intuitive error when using self to instantiate tuple struct with private field 2025-10-25 22:46:15 +01:00
proc_macro_generated_packed.rs Normalize away the maybe remapped paths to the compiler and std 2025-12-18 21:18:05 +01:00
proc_macro_generated_packed.stderr Normalize away the maybe remapped paths to the compiler and std 2025-12-18 21:18:05 +01:00
raw-ident-in-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
raw-ident-in-path.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
reference-clone-nonclone-11820.rs comments 2025-07-31 21:25:49 +05:00
regression-struct-called-as-function-148919.rs Fix error message for calling a non-tuple struct 2025-11-19 15:50:40 +00:00
regression-struct-called-as-function-148919.stderr Fix error message for calling a non-tuple struct 2025-11-19 15:50:40 +00:00
resolve-assoc-suggestions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-assoc-suggestions.stderr Compile-Time Reflection MVP: tuples 2026-01-08 11:41:00 +00:00
resolve-bad-import-prefix.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-bad-import-prefix.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-bad-visibility.rs Add more missing 2015 edition directives 2025-06-05 09:20:19 +02:00
resolve-bad-visibility.stderr Add more missing 2015 edition directives 2025-06-05 09:20:19 +02:00
resolve-conflict-extern-crate-vs-extern-crate.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-conflict-extern-crate-vs-extern-crate.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-conflict-import-vs-extern-crate.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-conflict-import-vs-extern-crate.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-conflict-import-vs-import.fixed If suggestion would leave an empty line, delete it 2024-03-01 13:48:20 +00:00
resolve-conflict-import-vs-import.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-conflict-import-vs-import.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-conflict-item-vs-extern-crate.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-conflict-item-vs-extern-crate.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-conflict-item-vs-import.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
resolve-conflict-item-vs-import.stderr Accurate use rename suggestion span 2024-07-18 00:00:04 +00:00
resolve-conflict-type-vs-import.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-conflict-type-vs-import.stderr Accurate use rename suggestion span 2024-07-18 00:00:04 +00:00
resolve-dont-hint-macro.rs Dont suggest ! for path in function call if it has generic args 2023-11-27 01:02:37 +00:00
resolve-dont-hint-macro.stderr Dont suggest ! for path in function call if it has generic args 2023-11-27 01:02:37 +00:00
resolve-hint-macro.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-hint-macro.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-hint-macro.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-inconsistent-binding-mode.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-inconsistent-binding-mode.stderr recurse into refs when comparing tys for diagnostics 2023-12-07 23:00:46 -05:00
resolve-inconsistent-names.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-inconsistent-names.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-issue-2428.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
resolve-issue-135614-assoc-const.normal.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
resolve-issue-135614-assoc-const.rs Fix ICE in resolving associated items as non-bindings 2025-01-18 08:38:50 +08:00
resolve-issue-135614.normal.stderr Fix ICE in resolving associated items as non-bindings 2025-01-18 08:38:50 +08:00
resolve-issue-135614.rs Fix ICE in resolving associated items as non-bindings 2025-01-18 08:38:50 +08:00
resolve-label.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-label.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
resolve-primitive-fallback.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-primitive-fallback.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
resolve-pseudo-shadowing.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
resolve-same-name-struct.rs cleaned up some tests 2025-07-01 15:29:29 +05:00
resolve-self-in-impl-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-self-in-impl-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-self-in-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-self-in-impl.stderr Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00
resolve-speculative-adjustment.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-speculative-adjustment.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
resolve-type-param-in-item-in-trait.rs Generalize E0401 2023-09-10 23:06:14 +02:00
resolve-type-param-in-item-in-trait.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
resolve-unknown-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-unknown-trait.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
resolve-variant-assoc-item.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
resolve-variant-assoc-item.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
shadow-const-param.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shadow-const-param.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shadow-primitives.rs cleaned up some tests 2026-01-05 15:35:01 +09:00
struct-function-same-name.rs cleaned up some tests 2025-06-30 11:16:18 +05:00
suggest-range-struct-destructuring.rs Apply review suggestions 2025-12-17 14:53:14 +00:00
suggest-range-struct-destructuring.stderr Apply review suggestions 2025-12-17 14:53:14 +00:00
token-error-correct-2.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
token-error-correct-3.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
token-error-correct-4.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct-4.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
token-error-correct.rs Exit when there are unmatched delims to avoid noisy diagnostics 2023-02-28 07:55:19 +00:00
token-error-correct.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tool-import.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
tool-import.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tuple-struct-alias.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
tuple-struct-alias.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
type-param-local-var-shadowing.rs cleaned up some tests 2025-06-30 11:16:18 +05:00
typo-suggestion-for-variable-with-name-similar-to-struct-field.rs compiletest: Stricter parsing for diagnostic kinds 2025-04-07 19:13:31 +03:00
typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
typo-suggestion-mistyped-in-path.rs Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00
typo-suggestion-mistyped-in-path.stderr Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
typo-suggestion-named-underscore.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
typo-suggestion-named-underscore.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-nonexistent-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unboxed-closure-sugar-nonexistent-trait.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
underscore-bindings-disambiguators.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
underscore-bindings-disambiguators.stderr Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
unit-like-struct-masks-constant-7044.rs Add test batch 2 2025-08-27 15:06:05 -04:00
unit-like-struct-masks-constant-7044.stderr Add test batch 2 2025-08-27 15:06:05 -04:00
unresolved-module-error-33293.rs Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
unresolved-module-error-33293.stderr Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
unresolved-segments-visibility.rs Add more missing 2015 edition directives 2025-06-05 09:20:19 +02:00
unresolved-segments-visibility.stderr Add more missing 2015 edition directives 2025-06-05 09:20:19 +02:00
unresolved_static_type_field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unresolved_static_type_field.stderr Use field ident spans directly instead of the full field span in diagnostics on local fields 2024-07-06 19:22:05 +00:00
unused-macro-import.rs resolve: Do not finalize shadowed bindings 2025-09-25 20:36:14 +03:00
unused-macro-import.stderr resolve: Do not finalize shadowed bindings 2025-09-25 20:36:14 +03:00
unused-qualifications-suggestion.fixed fixes #121331 2024-03-14 09:54:42 +08:00
unused-qualifications-suggestion.rs fixes #121331 2024-03-14 09:54:42 +08:00
unused-qualifications-suggestion.stderr fixes #121331 2024-03-14 09:54:42 +08:00
use-self-in-inner-fn.rs Add note to E0401 2025-11-03 16:24:36 +00:00
use-self-in-inner-fn.stderr Add note to E0401 2025-11-03 16:24:36 +00:00
use-shadowing-14082.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
use_suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
use_suggestion.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
use_suggestion_placement.fixed Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
use_suggestion_placement.rs Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
use_suggestion_placement.stderr Merge E0412 into E0425 2025-12-02 18:25:13 +00:00
visibility-indeterminate.rs resolve: Split extern prelude into two scopes 2025-08-13 17:45:40 +03:00
visibility-indeterminate.stderr resolve: Split extern prelude into two scopes 2025-08-13 17:45:40 +03:00