rust/tests/ui/associated-consts
Matthias Krüger 943fa33daf
Rollup merge of #118730 - jyn514:cmp_refs, r=estebank,compiler-errors
recurse into refs when comparing tys for diagnostics

before:
![image](https://github.com/rust-lang/rust/assets/23638587/bf6abd62-c7f3-4c09-a47e-31b6e129de19)

after:
![image](https://github.com/rust-lang/rust/assets/23638587/b704d728-ddba-4204-aebe-c07dcbbcb55c)

this diff from the test suite is also quite nice imo:
```diff
`@@` -4,8 +4,8 `@@` error[E0308]: mismatched types
 LL |     debug_assert_eq!(iter.next(), Some(value));
    |                                   ^^^^^^^^^^^ expected `Option<<I as Iterator>::Item>`, found `Option<&<I as Iterator>::Item>`
    |
-   = note: expected enum `Option<<I as Iterator>::Item>`
-              found enum `Option<&<I as Iterator>::Item>`
+   = note: expected enum `Option<_>`
+              found enum `Option<&_>`
```
2023-12-08 23:15:13 +01:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
assoc-const-eq-ambiguity.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-ambiguity.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-missing.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-missing.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-ty-alias-noninteracting.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-ty-mismatch.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-ty-mismatch.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-ambiguity-report.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-ambiguity-report.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-array-len.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-array-len.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-const-eval.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-cross-crate-const-eval.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-cross-crate-defaults.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-cross-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-dead-code.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-dead-code.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-generic-obligations.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-generic-obligations.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-impl-wrong-lifetime.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-impl-wrong-lifetime.stderr recurse into refs when comparing tys for diagnostics 2023-12-07 23:00:46 -05:00
associated-const-impl-wrong-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-impl-wrong-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-in-global-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-in-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-in-trait.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-inherent-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-marks-live-code.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-match-patterns.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-no-item.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-no-item.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-outer-ty-refs.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-overwrite-default.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-private-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-private-impl.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-public-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-range-match-patterns.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-resolution-order.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-self-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-trait-bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-type-parameter-arms.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-type-parameter-arms.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-type-parameter-arrays-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-type-parameter-arrays-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-type-parameter-arrays.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-type-parameter-arrays.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
associated-const-type-parameters.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-ufcs-infer-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-use-default.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const-use-impl-of-same-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
defaults-cyclic-fail.rs move required_consts check to general post-mono-check function 2023-09-14 22:30:42 +02:00
defaults-cyclic-fail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
defaults-cyclic-pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
defaults-not-assumed-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
defaults-not-assumed-fail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
defaults-not-assumed-pass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
double-elided.rs Fall through when resolving elided assoc const lifetimes 2023-09-01 07:23:39 +00:00
double-elided.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
infer-placeholder-in-non-suggestable-pos.rs Warn on elided lifetimes in associated constants 2023-08-20 00:21:47 +00:00
infer-placeholder-in-non-suggestable-pos.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-24949-assoc-const-static-recursion-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24949-assoc-const-static-recursion-impl.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-24949-assoc-const-static-recursion-trait-default.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24949-assoc-const-static-recursion-trait-default.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-24949-assoc-const-static-recursion-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-24949-assoc-const-static-recursion-trait.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-47814.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47814.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-58022.rs Avoid a `track_errors` by bubbling up most errors from `check_well_formed` 2023-10-20 08:46:27 +00:00
issue-58022.stderr Avoid a `track_errors` by bubbling up most errors from `check_well_formed` 2023-10-20 08:46:27 +00:00
issue-63496.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-63496.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69020-assoc-const-arith-overflow.noopt.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69020-assoc-const-arith-overflow.opt.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69020-assoc-const-arith-overflow.opt_with_overflow_checks.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69020-assoc-const-arith-overflow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88599-ref-self.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-93775.rs evaluate: improve and fix recursion depth handling 2023-03-21 09:57:22 +01:00
issue-93835.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-93835.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102335-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102335-const.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-105330.rs Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types` 2023-10-25 12:04:54 +00:00
issue-105330.stderr Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types` 2023-10-25 12:04:54 +00:00
issue-110933.rs Add a regression test for #110933 2023-06-25 23:03:22 +09:00
mismatched_impl_ty_1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mismatched_impl_ty_2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mismatched_impl_ty_3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
projection-unspecified-but-bounded.rs Don't create projection ty for const projection 2023-04-23 18:09:30 +00:00
projection-unspecified-but-bounded.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
shadowed-const.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
shadowed-const.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00