rust/tests/ui/const-generics/mgca
Jacob Pratt 9369cfff04
Rollup merge of #152402 - AprilNEA:test/issue-141738-struct-ctor-array-len, r=BoxyUwU
Add regression test for #141738

Closes rust-lang/rust#141738

- Add a regression test for rust-lang/rust#141738
- Using a struct constructor (`DefKind::Ctor(Struct, Const)`) as an array repeat count with `#![feature(min_generic_const_args)]` used to ICE in const alias normalization
- Fixed by rust-lang/rust#150704, which added const constructor support for mGCA. This test covers the **error path** (struct ctor where `usize` is expected), which was not covered by the tests in rust-lang/rust#150704
2026-02-14 23:17:40 -05:00
..
auxiliary MGCA: require #[type_const] on free consts too 2026-02-06 15:35:18 +01:00
adt_expr_arg_simple.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
adt_expr_arg_simple.stderr Implement MVP for opaque generic const arguments 2026-02-08 18:15:11 +00:00
adt_expr_arg_tuple_expr_fail.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
adt_expr_arg_tuple_expr_fail.stderr mgca: Type-check fields of tuple expr const args 2026-01-08 11:09:07 -08:00
adt_expr_erroneuous_inits.rs Lower hir::ConstArgKind::Struct to a ValTree 2025-12-23 13:54:59 +00:00
adt_expr_erroneuous_inits.stderr Add span field for ConstArg 2026-01-07 08:44:32 +08:00
adt_expr_fields_type_check.rs mgca: Type-check fields of ADT constructor expr const args 2026-01-08 10:52:58 -08:00
adt_expr_fields_type_check.stderr mgca: Type-check fields of ADT constructor expr const args 2026-01-08 10:52:58 -08:00
adt_expr_infers_from_value.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
ambiguous-assoc-const.rs mgca: Lower all const paths as ConstArgKind::Path 2025-03-04 10:11:13 -05:00
ambiguous-assoc-const.stderr mgca: Lower all const paths as ConstArgKind::Path 2025-03-04 10:11:13 -05:00
array-expr-complex.rs Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-complex.stderr Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-empty.rs Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-empty.stderr Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-simple.rs Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-type-mismatch-in-where-bound.rs Emit error instead of delayed bug when meeting mismatch type for const 2026-01-13 21:36:53 +09:00
array-expr-type-mismatch-in-where-bound.stderr Emit error instead of delayed bug when meeting mismatch type for const 2026-01-13 21:36:53 +09:00
array-expr-with-assoc-const.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
array-expr-with-macro.rs Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-with-struct.rs Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
array-expr-with-tuple.rs Add mGCA array expression tests 2026-01-10 12:45:26 +09:00
assoc-const-projection-in-bound.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
assoc-const-without-type_const.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
assoc-const-without-type_const.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
assoc-const.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
bad-type_const-syntax.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
bad-type_const-syntax.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
concrete-expr-with-generics-in-env.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
const-arg-coherence-conflicting-methods.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
const-arg-coherence-conflicting-methods.stderr MGCA: require #[type_const] on free consts too 2026-02-06 15:35:18 +01:00
const-ctor-overflow-eval.rs add const ctor support 2026-01-06 15:04:25 +00:00
const-ctor-overflow-eval.stderr add const ctor support 2026-01-06 15:04:25 +00:00
const-ctor-with-error.rs add const ctor support 2026-01-06 15:04:25 +00:00
const-ctor-with-error.stderr add const ctor support 2026-01-06 15:04:25 +00:00
const-ctor.rs add const ctor support 2026-01-06 15:04:25 +00:00
cyclic-type-const-151251.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
cyclic-type-const-151251.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
early-bound-param-lt-bad.rs Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
early-bound-param-lt-bad.stderr Implement MVP for opaque generic const arguments 2026-02-08 18:15:11 +00:00
explicit_anon_consts.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
explicit_anon_consts.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
explicit_anon_consts_literals_hack.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
generic_const_type_mismatch.rs modify error comment and bless test, delete tests/ui/const-generics/generic_const_exprs/lit_type_mismatch.rs 2026-02-14 04:12:46 +00:00
generic_const_type_mismatch.stderr modify error comment and bless test, delete tests/ui/const-generics/generic_const_exprs/lit_type_mismatch.rs 2026-02-14 04:12:46 +00:00
higher-ranked-lts-bad.rs Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
higher-ranked-lts-bad.stderr Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
higher-ranked-lts-good.rs Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
inherent-const-gating.rs mgca: Lower all const paths as ConstArgKind::Path 2025-03-04 10:11:13 -05:00
inherent-const-gating.stderr mgca: Lower all const paths as ConstArgKind::Path 2025-03-04 10:11:13 -05:00
late-bound-param-lt-bad.rs Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
late-bound-param-lt-bad.stderr Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
missing_generic_params.rs Require generic params for const generic params 2025-06-13 07:48:00 +00:00
missing_generic_params.stderr Require generic params for const generic params 2025-06-13 07:48:00 +00:00
multi_braced_direct_const_args.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
negated-literal.rs mGCA: Support directly represented negated literals 2026-02-06 14:04:55 +01:00
non-local-const-without-type_const.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
non-local-const-without-type_const.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
nonsensical-negated-literal.rs mGCA: Validate const literal against expected type 2026-02-14 04:12:40 +00:00
nonsensical-negated-literal.stderr mGCA: Validate const literal against expected type 2026-02-14 04:12:40 +00:00
printing_valtrees_supports_non_values.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
printing_valtrees_supports_non_values.stderr mgca: Type-check fields of ADT constructor expr const args 2026-01-08 10:52:58 -08:00
projection-error.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
projection-error.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
resolution-with-inherent-associated-types.rs Add regression test for 141845 2025-12-05 00:39:55 +09:00
resolution-with-inherent-associated-types.stderr Add regression test for 141845 2025-12-05 00:39:55 +09:00
selftyalias-containing-param.rs Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
selftyalias-containing-param.stderr Implement MVP for opaque generic const arguments 2026-02-08 18:15:11 +00:00
selftyparam.rs Use more principled check for generics in const ops 2026-01-01 18:12:34 -08:00
selftyparam.stderr Implement MVP for opaque generic const arguments 2026-02-08 18:15:11 +00:00
size-of-generic-ptr-in-array-len.rs fix missleading error for tuple ctor 2026-02-13 09:54:04 +00:00
size-of-generic-ptr-in-array-len.stderr fix missleading error for tuple ctor 2026-02-13 09:54:04 +00:00
struct-ctor-in-array-len.rs Add regression test for struct ctor used as array repeat count under mGCA 2026-02-14 19:44:50 +00:00
struct-ctor-in-array-len.stderr Add regression test for struct ctor used as array repeat count under mGCA 2026-02-14 19:44:50 +00:00
struct_expr_with_macros.rs Introduce hir::ConstArgKind::Struct 2025-12-23 13:54:59 +00:00
tuple_ctor_arg_simple.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
tuple_ctor_complex_args.rs init impl 2026-01-04 15:12:39 +00:00
tuple_ctor_complex_args.stderr Implement MVP for opaque generic const arguments 2026-02-08 18:15:11 +00:00
tuple_ctor_erroneous.rs fix missleading error for tuple ctor 2026-02-13 09:54:04 +00:00
tuple_ctor_erroneous.stderr fix missleading error for tuple ctor 2026-02-13 09:54:04 +00:00
tuple_ctor_in_array_len.rs init impl 2026-01-04 15:12:39 +00:00
tuple_ctor_in_array_len.stderr init impl 2026-01-04 15:12:39 +00:00
tuple_ctor_nested.rs init impl 2026-01-04 15:12:39 +00:00
tuple_ctor_type_relative.rs init impl 2026-01-04 15:12:39 +00:00
tuple_expr_arg_bad-issue-151048.rs Add test for issue 151048 2026-01-14 20:59:41 +08:00
tuple_expr_arg_bad-issue-151048.stderr Add test for issue 151048 2026-01-14 20:59:41 +08:00
tuple_expr_arg_complex.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
tuple_expr_arg_complex.stderr Implement MVP for opaque generic const arguments 2026-02-08 18:15:11 +00:00
tuple_expr_arg_mismatch_type.rs Rename tests for const tuple properly 2026-01-11 11:26:10 +08:00
tuple_expr_arg_mismatch_type.stderr Rename tests for const tuple properly 2026-01-11 11:26:10 +08:00
tuple_expr_arg_simple.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
tuple_expr_type_mismatch.rs modify error comment and bless test, delete tests/ui/const-generics/generic_const_exprs/lit_type_mismatch.rs 2026-02-14 04:12:46 +00:00
tuple_expr_type_mismatch.stderr modify error comment and bless test, delete tests/ui/const-generics/generic_const_exprs/lit_type_mismatch.rs 2026-02-14 04:12:46 +00:00
type-const-assoc-const-without-body.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type-const-assoc-const-without-body.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type-const-ctor-148953.rs Add regression test for type_const with unit struct ctor under mGCA 2026-02-10 07:34:53 +00:00
type-const-inherent-assoc-const-without-body.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type-const-inherent-assoc-const-without-body.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type-const-used-in-trait.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_as_const_in_array_len.rs init impl 2026-01-04 15:12:39 +00:00
type_as_const_in_array_len.stderr init impl 2026-01-04 15:12:39 +00:00
type_const-array-return.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-generic-param-in-type.gate.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-generic-param-in-type.nogate.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-generic-param-in-type.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-incemental-compile.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-inherent-const-omitted-type.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-inherent-const-omitted-type.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-mismatched-types.rs modify error comment and bless test, delete tests/ui/const-generics/generic_const_exprs/lit_type_mismatch.rs 2026-02-14 04:12:46 +00:00
type_const-mismatched-types.stderr modify error comment and bless test, delete tests/ui/const-generics/generic_const_exprs/lit_type_mismatch.rs 2026-02-14 04:12:46 +00:00
type_const-not-constparamty.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-not-constparamty.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-on-generic-expr.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-on-generic-expr.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-on-generic_expr-2.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-on-generic_expr-2.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-only-in-impl-omitted-type.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-only-in-impl-omitted-type.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-only-in-impl.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-only-in-impl.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-only-in-trait.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-only-in-trait.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-pub.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-recursive.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-recursive.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
type_const-use.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
unbraced_const_block_const_arg_gated.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
unbraced_const_block_const_arg_gated.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
unexpected-fn-item-in-array.rs Lower fn items as ZST valtrees and delay a bug 2025-02-11 19:16:12 +00:00
unexpected-fn-item-in-array.stderr Lower fn items as ZST valtrees and delay a bug 2025-02-11 19:16:12 +00:00
unmarked-free-const.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
unmarked-free-const.stderr Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
unused_speculative_def_id.rs dont create unnecessary DefIds under mgca 2025-12-15 22:59:15 +00:00
unused_speculative_def_id.stderr dont create unnecessary DefIds under mgca 2025-12-15 22:59:15 +00:00
wrong_type_const_arr_diag.rs fix: allow to print const array as raw bytes only if possible to do so 2026-01-22 15:06:22 +05:00
wrong_type_const_arr_diag.stderr fix: allow to print const array as raw bytes only if possible to do so 2026-01-22 15:06:22 +05:00
wrong_type_const_arr_diag_trait.rs Allow provisional mgca syntax of type const <IDENT> = <EXPR> to be reconized. 2026-02-09 07:59:24 -08:00
wrong_type_const_arr_diag_trait.stderr fix: allow to print const array as raw bytes only if possible to do so 2026-01-22 15:06:22 +05:00