rust/tests/ui/generic-const-items
Matthias Krüger 7e9b67d355
Rollup merge of #148716 - camelid:finish-type_const, r=BoxyUwU
mgca: Finish implementation of `#[type_const]`

tracking issue: rust-lang/rust#132980
fixes rust-lang/rust#140729
fixes rust-lang/rust#140860

- **Fix `#[type_const]` attribute placement validation**
- **Perform WF-checking on type_const RHS's**
- **Check type_const type is ConstParamTy_ and that RHS matches it**
- **Check that impls of `#[type_const]` consts also have the attr**

r? ```@BoxyUwU```
2025-11-09 17:37:07 +01:00
..
assoc-const-missing-type.rs Improve AssocItem::descr. 2025-04-11 11:03:08 +10:00
assoc-const-missing-type.stderr Improve AssocItem::descr. 2025-04-11 11:03:08 +10:00
assoc-const-no-infer-ice-115806.rs Check type_const type is ConstParamTy_ and that RHS matches it 2025-11-08 23:05:08 -05:00
assoc-const-no-infer-ice-115806.stderr fix associated_const_equality tests 2025-11-08 13:50:48 -05:00
associated-const-equality.rs Perform WF-checking on type_const RHS's 2025-11-08 23:05:08 -05:00
basic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
compare-impl-item.rs Improve AssocItem::descr. 2025-04-11 11:03:08 +10:00
compare-impl-item.stderr Improve AssocItem::descr. 2025-04-11 11:03:08 +10:00
const-trait-impl.rs Remove #[const_trait] 2025-11-08 07:37:15 +01:00
def-site-eval.fail.stderr const-eval error: always say in which item the error occurred 2025-06-07 13:42:30 +02:00
def-site-eval.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
def-site-mono.rs GCI: Don't try to collect mono items inside overly generic free const items 2025-01-28 04:00:37 +01:00
def-site-predicates-wf.rs GCI: Check where-clauses for well-formedness at the def site 2025-05-28 15:19:32 +02:00
def-site-predicates-wf.stderr GCI: Check where-clauses for well-formedness at the def site 2025-05-28 15:19:32 +02:00
duplicate-where-clause.rs Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
duplicate-where-clause.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
elided-lifetimes.rs fix(hir_analysis/wfcheck): don't leak {type error} 2024-09-29 23:40:43 -05:00
elided-lifetimes.stderr fix(hir_analysis/wfcheck): don't leak {type error} 2024-09-29 23:40:43 -05:00
evaluatable-bounds.fixed Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
evaluatable-bounds.rs Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
evaluatable-bounds.stderr Avoid looking at HIR for trait and impl items 2025-06-30 08:45:43 +00:00
feature-gate-generic_const_items.rs Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
feature-gate-generic_const_items.stderr Bless tests 2024-01-13 12:46:58 -05:00
hkl_where_bounds.rs Avoid computing generic params or a param env for free const items 2024-03-19 17:30:08 +00:00
inference-failure.rs Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
inference-failure.stderr Use fn ptr signature instead of {closure@..} in infer error 2024-04-10 00:41:27 +00:00
misplaced-where-clause.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
misplaced-where-clause.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
misplaced-where-clause.stderr Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
parameter-defaults.rs Fortify generic param default checks 2025-08-06 01:26:26 +02:00
parameter-defaults.stderr Fortify generic param default checks 2025-08-06 01:26:26 +02:00
recursive.rs improve diagnostics for const eval query overflow 2025-01-06 09:43:05 +01:00
recursive.stderr improve diagnostics for const eval query overflow 2025-01-06 09:43:05 +01:00
reference-outlives-referent.rs Don't crash when reporting nice region errors for generic const items 2023-08-12 15:34:28 +02:00
reference-outlives-referent.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
trivially-unsatisfied-bounds-0.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
trivially-unsatisfied-bounds-0.stderr const-eval error: always say in which item the error occurred 2025-06-07 13:42:30 +02:00
trivially-unsatisfied-bounds-1.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
trivially-unsatisfied-bounds-1.stderr const-eval error: always say in which item the error occurred 2025-06-07 13:42:30 +02:00
unsatisfied-bounds.rs Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
unsatisfied-bounds.stderr When a trait isn't implemented, but another similar impl is found, point at it: 2025-10-31 20:38:31 +00:00
unsatisfied-evaluatable-bounds.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
unsatisfied-evaluatable-bounds.stderr Clarify why we are talking about a failed const eval at a random place 2025-06-02 15:37:15 +00:00
unsatisfied-outlives-bounds.rs Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
unsatisfied-outlives-bounds.stderr Add UI tests for generic const items 2023-07-28 22:23:20 +02:00
user_type_annotations_pattern.rs User type annotations for free consts in pattern position 2025-05-01 13:14:53 +01:00
user_type_annotations_pattern.stderr User type annotations for free consts in pattern position 2025-05-01 13:14:53 +01:00
wfcheck_err_leak_issue_118179.rs fix(hir_analysis/wfcheck): don't leak {type error} 2024-09-29 23:40:43 -05:00
wfcheck_err_leak_issue_118179.stderr Introduce feature(generic_const_parameter_types) 2025-02-28 20:43:15 +00:00