rust/src/test/ui/const-generics
Matthias Krüger d5b975cb7c
Rollup merge of #105994 - JohnTitor:issue-99647, r=compiler-errors
Add regression test for #99647

Closes #99647
r? `@compiler-errors`

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-27 16:37:47 +01:00
..
array-impls Replace IntoIter::new with IntoIterator::into_iter in std 2021-06-02 16:09:04 +06:00
auxiliary Move some tests to more reasonable directories 2021-11-06 15:35:20 -03:00
backcompat remove lazy_normalization_consts 2021-08-30 11:00:21 +02:00
defaults remove unused stderr files 2022-12-16 20:55:06 +09:00
early Improve local generic parameter suggestions. 2022-08-23 00:08:42 +02:00
generic_arg_infer Rollup merge of #105523 - estebank:suggest-collect-vec, r=compiler-errors 2022-12-14 10:31:07 +01:00
generic_const_exprs Rollup merge of #105994 - JohnTitor:issue-99647, r=compiler-errors 2022-12-27 16:37:47 +01:00
infer feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
issues review comments 2022-12-13 11:36:43 -08:00
late-bound-vars feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
min_const_generics Show a note where a macro failed to match 2022-11-14 19:59:15 +01:00
occurs-check fix small word dupe typos 2022-10-13 00:53:46 +08:00
parser-error-recovery diagnostics: fix trailing space 2022-06-16 14:40:28 +03:00
std feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
type-dependent Auto merge of #87915 - estebank:fancy-spans, r=oli-obk 2021-09-13 16:31:12 +00:00
apit-with-const-param.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
arg-in-pat-1.rs support pattern as const parents in type_of 2020-12-31 14:10:49 +01:00
arg-in-pat-2.rs support pattern as const parents in type_of 2020-12-31 14:10:49 +01:00
arg-in-pat-3.rs support pattern as const parents in type_of 2020-12-31 14:10:49 +01:00
argument_order.rs update tests 2021-12-10 19:21:25 +00:00
argument_order.stderr review 2022-09-09 14:28:57 +02:00
array-wrapper-struct-ctor.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
associated-type-bound-fail.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
associated-type-bound-fail.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
associated-type-bound.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
bad-const-generic-exprs.rs Suggest {} around more bad const generic exprs 2022-02-25 17:16:58 -08:00
bad-const-generic-exprs.stderr Suggest {} around more bad const generic exprs 2022-02-25 17:16:58 -08:00
broken-mir-1.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
broken-mir-2.rs Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
cannot-infer-type-for-const-param.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
coerce_unsized_array.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
concrete-const-as-fn-arg.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
concrete-const-impl-method.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
condition-in-trait-const-arg.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const_trait_fn-issue-88433.rs bless tests 2022-09-16 11:48:43 +08:00
const-arg-in-const-arg.full.stderr use gathered body_owners in par_body_owners 2022-07-13 12:22:25 -04:00
const-arg-in-const-arg.min.stderr use gathered body_owners in par_body_owners 2022-07-13 12:22:25 -04:00
const-arg-in-const-arg.rs Enable full revision in const generics ui tests 2022-05-01 17:05:21 +01:00
const-arg-in-fn.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-arg-type-arg-misordered.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-arg-type-arg-misordered.stderr update tests 2021-12-10 19:21:25 +00:00
const-argument-cross-crate-mismatch.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-argument-cross-crate-mismatch.stderr Bless tests. 2022-06-10 20:16:35 +02:00
const-argument-cross-crate.rs Warn about dead tuple struct fields 2022-08-03 12:17:23 +02:00
const-argument-if-length.full.stderr diagnostics: fix trailing space 2022-06-16 14:40:28 +03:00
const-argument-if-length.min.stderr diagnostics: fix trailing space 2022-06-16 14:40:28 +03:00
const-argument-if-length.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-argument-non-static-lifetime.min.stderr Enable full revision in const generics ui tests 2022-05-01 17:05:21 +01:00
const-argument-non-static-lifetime.rs Make the test check-pass not to produce a JSON file 2022-05-07 00:57:23 +09:00
const-fn-with-const-param.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-generic-default-wont-borrowck.rs On partial uninit error point at where we need init 2022-07-07 12:25:55 -07:00
const-generic-default-wont-borrowck.stderr fix #102087, Suggest Default::default() when binding isn't initialized 2022-09-26 07:56:26 +08:00
const-generic-function.rs suggest adding { .. } around a const function with arguments 2022-03-08 17:07:35 +09:00
const-generic-function.stderr suggest adding { .. } around a const function with arguments 2022-03-08 17:07:35 +09:00
const-generic-type_name.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-param-after-const-literal-arg.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-param-before-other-params.rs review 2022-09-09 14:28:57 +02:00
const-param-before-other-params.stderr review 2022-09-09 14:28:57 +02:00
const-param-elided-lifetime.full.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-param-elided-lifetime.min.stderr Only keep a single well-formed query. 2022-06-21 23:56:17 +02:00
const-param-elided-lifetime.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
const-param-in-async.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-param-type-depends-on-const-param.full.stderr update tests 2020-12-26 18:24:10 +01:00
const-param-type-depends-on-const-param.min.stderr feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
const-param-type-depends-on-const-param.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
const-param-type-depends-on-type-param-ungated.rs update tests 2020-12-26 18:24:10 +01:00
const-param-type-depends-on-type-param-ungated.stderr update tests 2020-12-26 18:24:10 +01:00
const-param-type-depends-on-type-param.full.stderr Add help message for unused type param 2021-05-01 21:58:06 +00:00
const-param-type-depends-on-type-param.min.stderr Add help message for unused type param 2021-05-01 21:58:06 +00:00
const-param-type-depends-on-type-param.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
const-parameter-uppercase-lint.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
const-parameter-uppercase-lint.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
core-types.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
cross_crate_complex.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
deref-into-array-generic.rs Add new tests, fix up old tests 2022-01-12 08:28:41 -08:00
different_generic_args_array.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
different_generic_args_array.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
different_generic_args.full.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
different_generic_args.min.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
different_generic_args.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
dont-evaluate-array-len-on-err-1.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
dont-evaluate-array-len-on-err-1.stderr Do not mention associated items when they introduce an obligation 2021-11-20 19:19:31 +00:00
dyn-supertraits.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
enum-variants.rs fmt 2021-08-07 20:55:37 +01:00
exhaustive-value.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
exhaustive-value.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
expose-default-substs-param-env.rs add tests 2021-10-25 16:05:03 +02:00
float-generic.adt_const_params.stderr Deny floats even when adt_const_params is enabled 2022-07-11 00:04:00 +00:00
float-generic.rs Deny floats even when adt_const_params is enabled 2022-07-11 00:04:00 +00:00
float-generic.simple.stderr Deny floats even when adt_const_params is enabled 2022-07-11 00:04:00 +00:00
fn-const-param-call.full.stderr Deeply deny fn and raw ptrs in const generics 2022-07-25 03:39:22 +00:00
fn-const-param-call.min.stderr update tests 2020-12-26 18:24:10 +01:00
fn-const-param-call.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
fn-const-param-infer.full.stderr Deeply deny fn and raw ptrs in const generics 2022-07-25 03:39:22 +00:00
fn-const-param-infer.min.stderr update tests 2020-12-26 18:24:10 +01:00
fn-const-param-infer.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
forbid-non-structural_match-types.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
forbid-non-structural_match-types.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
foreign-item-const-parameter.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
foreign-item-const-parameter.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
generic-param-mismatch.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
generic-param-mismatch.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
ice-68875.rs add test for ice 68875 2022-06-29 21:38:42 +02:00
ice-68875.stderr add test for ice 68875 2022-06-29 21:38:42 +02:00
ice-const-generic-function-return-ty.rs cancel a not emitted error after parsing const generic args 2022-03-22 16:06:56 +09:00
ice-const-generic-function-return-ty.stderr cancel a not emitted error after parsing const generic args 2022-03-22 16:06:56 +09:00
impl-const-generic-struct.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
incorrect-number-of-const-args.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
incorrect-number-of-const-args.stderr diagnostics: use correct span for const generics 2022-04-04 12:16:20 -07:00
infer_arg_from_pat.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
infer_arr_len_from_pat.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
inhabited-assoc-ty-ice-1.rs Factor out conservative_is_privately_uninhabited 2022-11-20 19:04:11 -06:00
inhabited-assoc-ty-ice-2.rs Factor out conservative_is_privately_uninhabited 2022-11-20 19:04:11 -06:00
integer-literal-generic-arg-in-where-clause.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
intrinsics-type_name-as-const-argument.min.stderr feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
intrinsics-type_name-as-const-argument.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
invalid-const-arg-for-type-param.rs improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
invalid-const-arg-for-type-param.stderr Make some diagnostics not depend on the source of what they reference being available 2022-12-13 09:48:22 +00:00
invalid-constant-in-args.rs Rework diagnostics for wrong number of generic args 2021-01-10 13:07:40 +01:00
invalid-constant-in-args.stderr Make some diagnostics not depend on the source of what they reference being available 2022-12-13 09:48:22 +00:00
invalid-enum.rs update tests 2021-12-10 19:21:25 +00:00
invalid-enum.stderr Modify structured suggestion output 2021-08-11 09:46:24 +00:00
invariant.rs handle assoc consts in fulfill ConstEquate 2022-11-25 09:28:43 +00:00
invariant.stderr handle assoc consts in fulfill ConstEquate 2022-11-25 09:28:43 +00:00
issue-46511.rs add ice test for 46511 2022-06-29 22:16:36 +02:00
issue-46511.stderr add ice test for 46511 2022-06-29 22:16:36 +02:00
issue-66451.rs Address code review comments 2022-06-28 23:26:54 +02:00
issue-66451.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
issue-70408.rs add a test for #70408 2022-07-07 15:42:48 +09:00
issue-80471.rs add a test for #80471 2022-07-07 11:33:56 +09:00
issue-80471.stderr bless ui tests 2022-10-01 10:03:06 +00:00
issue-93647.rs Make error messages great again (and fix clippy and add test) 2022-09-21 15:02:15 +00:00
issue-93647.stderr Make error messages great again (and fix clippy and add test) 2022-09-21 15:02:15 +00:00
issue-97007.rs Normalize consts' tys when relating with adt_const_params 2022-06-03 13:14:23 -07:00
issue-102124.rs Add regression test for #102124 2022-10-07 23:36:59 +09:00
issue-105689.rs skip if val has ecaping bound vars 2022-12-14 14:05:44 +03:00
legacy-const-generics-bad.rs Move some tests to more reasonable directories 2021-11-06 15:35:20 -03:00
legacy-const-generics-bad.stderr Move some tests to more reasonable directories 2021-11-06 15:35:20 -03:00
legacy-const-generics.rs Move some tests to more reasonable directories 2021-11-06 15:35:20 -03:00
nested-type.full.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
nested-type.min.stderr simplify const params diagnostic on stable 2022-04-11 21:01:18 +01:00
nested-type.rs simplify const params diagnostic on stable 2022-04-11 21:01:18 +01:00
outer-lifetime-in-const-generic-default.rs resolve lifetimes for const generic defaults 2022-02-05 01:30:14 -08:00
outer-lifetime-in-const-generic-default.stderr resolve lifetimes for const generic defaults 2022-02-05 01:30:14 -08:00
overlapping_impls.rs Fix overlapping impls 2022-07-14 09:01:17 +00:00
params-in-ct-in-ty-param-lazy-norm.full.stderr allow unordered const/ty params if any cg feature is active 2021-08-30 11:00:21 +02:00
params-in-ct-in-ty-param-lazy-norm.min.stderr update tests 2021-12-10 19:21:25 +00:00
params-in-ct-in-ty-param-lazy-norm.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
parent_generics_of_encoding_impl_trait.rs Update tests 2022-07-13 17:28:11 -07:00
parent_generics_of_encoding_impl_trait.stderr Update tests 2022-07-13 17:28:11 -07:00
parent_generics_of_encoding.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
projection-as-arg-const.rs Add failing test for projections used as const generic 2022-11-22 16:02:37 +01:00
projection-as-arg-const.stderr Add failing test for projections used as const generic 2022-11-22 16:02:37 +01:00
promotion.rs update tests 2020-12-26 18:24:10 +01:00
raw-ptr-const-param-deref.full.stderr Deeply deny fn and raw ptrs in const generics 2022-07-25 03:39:22 +00:00
raw-ptr-const-param-deref.min.stderr update tests 2020-12-26 18:24:10 +01:00
raw-ptr-const-param-deref.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
raw-ptr-const-param.full.stderr Deeply deny fn and raw ptrs in const generics 2022-07-25 03:39:22 +00:00
raw-ptr-const-param.min.stderr update tests 2020-12-26 18:24:10 +01:00
raw-ptr-const-param.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
slice-const-param-mismatch.full.stderr update tests 2020-12-26 18:24:10 +01:00
slice-const-param-mismatch.min.stderr feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
slice-const-param-mismatch.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
slice-const-param.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
sneaky-array-repeat-expr.rs E-not-needs-test 2021-09-02 21:22:13 +01:00
sneaky-array-repeat-expr.stderr E-not-needs-test 2021-09-02 21:22:13 +01:00
struct-with-invalid-const-param.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
struct-with-invalid-const-param.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
suggest_const_for_array.rs Add check for array/usize mismatch in astconv 2021-01-04 10:07:15 +00:00
suggest_const_for_array.stderr Add check for array/usize mismatch in astconv 2021-01-04 10:07:15 +00:00
trait-const-args.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
transmute-const-param-static-reference.min.stderr feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
transmute-const-param-static-reference.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
transparent-maybeunit-array-wrapper.rs feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
try_unify_ignore_lifetimes.rs Erase regions in new abstract consts 2022-06-29 03:44:11 +00:00
type_mismatch.rs Add a second regression test 2021-03-19 13:44:50 +00:00
type_mismatch.stderr Stop sorting bodies by span. 2021-09-01 20:13:16 +02:00
type_not_in_scope.rs Do not ICE on ty::Error as an error must already have been reported 2021-03-19 11:46:27 +00:00
type_not_in_scope.stderr Do not ICE on ty::Error as an error must already have been reported 2021-03-19 11:46:27 +00:00
type_of_anon_const.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
type-after-const-ok.rs update tests 2021-12-10 19:21:25 +00:00
types-mismatch-const-args.full.stderr Call them constants instead of types 2022-08-24 17:53:35 +00:00
types-mismatch-const-args.min.stderr feat: omit suffixes in const generics (e.g. 1_i32) 2022-07-19 02:35:48 +03:00
types-mismatch-const-args.rs add and update tests 2022-01-17 17:32:26 +01:00
uninferred-consts-during-codegen-1.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
uninferred-consts-during-codegen-2.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
unknown_adt.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
unknown_adt.stderr feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
unused_braces.fixed feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
unused_braces.full.fixed update tests 2020-12-26 18:24:10 +01:00
unused_braces.min.fixed update tests 2020-12-26 18:24:10 +01:00
unused_braces.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
unused_braces.stderr diagnostics: fix trailing space 2022-06-16 14:40:28 +03:00
unused-const-param.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00
unused-type-param-suggestion.rs Add help message for unused type param 2021-05-01 21:58:06 +00:00
unused-type-param-suggestion.stderr Add help message for unused type param 2021-05-01 21:58:06 +00:00
where-clauses.rs feature(const_generics) -> feature(const_param_types) 2021-08-30 11:00:21 +02:00