rust/tests/ui/const-generics/adt_const_params
Matthias Krüger a384039053
Rollup merge of #138283 - compiler-errors:enforce-const-param, r=BoxyUwU
Enforce type of const param correctly in MIR typeck

Properly intercepts and then annotates the type for a `ConstKind::Param` in the MIR.

This code should probably be cleaned up, it's kinda spaghetti, but no better structure really occurred to me when writing this case.

We could probably gate this behind the feature gate or add a fast path when the args have no free regions if perf is bad.

r? `@BoxyUwU`
2025-03-15 11:29:25 +01:00
..
auxiliary Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
116308.rs Special-case alias ty in try_from_lit 2024-08-16 08:37:19 +08:00
alias_const_param_ty-1.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
alias_const_param_ty-1.stderr Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
alias_const_param_ty-2.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
check-type-in-mir.rs Check type of const param correctly in MIR typeck 2025-03-14 03:10:19 +00:00
check-type-in-mir.stderr Check type of const param correctly in MIR typeck 2025-03-14 03:10:19 +00:00
const_param_ty_bad.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_bad.stderr On long E0277 primary span label, move it to a help 2024-11-02 03:08:04 +00:00
const_param_ty_bad_empty_array.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_bad_empty_array.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
const_param_ty_dyn_compatibility.rs UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
const_param_ty_dyn_compatibility.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
const_param_ty_generic_bounds_do_not_hold.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_generic_bounds_do_not_hold.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
const_param_ty_good.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_impl_bad_field.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_impl_bad_field.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
const_param_ty_impl_no_structural_eq.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_impl_no_structural_eq.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
const_param_ty_impl_union.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
const_param_ty_impl_union.stderr Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
index-oob-ice-83993.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
index-oob-ice-83993.stderr Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
nested_bad_const_param_ty.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
nested_bad_const_param_ty.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
non_valtreeable_const_arg-1.rs Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
non_valtreeable_const_arg-1.stderr Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
non_valtreeable_const_arg-2.rs Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
non_valtreeable_const_arg-2.stderr Consolidate type system const evaluation under traits::evaluate_const 2024-11-12 02:54:03 +00:00
opaque_type_with_non-universal_region_substs_ice-111911.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
reference_pointee_is_const_param-1.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
reference_pointee_is_const_param-1.stderr Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
reference_pointee_is_const_param-2.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
reference_pointee_is_const_param-2.stderr Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
suggest_feature_only_when_possible.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
suggest_feature_only_when_possible.stderr fix(hir_analysis/wfcheck): don't leak {type error} 2024-09-29 23:40:43 -05:00
trait_objects_as_a_const_generic.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
trait_objects_as_a_const_generic.stderr Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
transmutable-ice-110969.rs safe transmute: Rename BikeshedIntrinsicFrom to TransmuteFrom 2024-08-27 14:05:54 +00:00
transmutable-ice-110969.stderr safe transmute: Rename BikeshedIntrinsicFrom to TransmuteFrom 2024-08-27 14:05:54 +00:00
unsized_field-1.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
unsized_field-1.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
unsized_field-2.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
unsized_field-2.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
unsizing-wfcheck-issue-126272.rs WF-check struct field types at construction site 2024-08-05 17:37:12 -07:00
unsizing-wfcheck-issue-126272.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00