rust/tests/ui/const-generics
bors cce6a6e22e Auto merge of #121087 - oli-obk:eager_const_failures, r=lcnr
Always evaluate free constants and statics, even if previous errors occurred

work towards https://github.com/rust-lang/rust/issues/79738

We will need to evaluate static items before the `definitions.freeze()` below, as we will start creating new `DefId`s (for nested allocations) within the `eval_static_initializer` query.

But even without that motivation, this is a good change. Hard errors should always be reported and not silenced if other errors happened earlier.
2024-02-20 09:02:34 +00:00
..
adt_const_params [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
array-impls [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
backcompat [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
defaults [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
early [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
generic_arg_infer [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
generic_const_exprs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
infer
issues Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
late-bound-vars [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
min_const_generics [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
occurs-check [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
parser-error-recovery Bless tests 2024-01-13 12:46:58 -05:00
std [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
type-dependent [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
apit-with-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arg-in-pat-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arg-in-pat-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arg-in-pat-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
argument_order.rs
argument_order.stderr
array-wrapper-struct-ctor.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
assoc_const_as_type_argument.rs
assoc_const_as_type_argument.stderr
assoc_const_eq_diagnostic.rs
assoc_const_eq_diagnostic.stderr
associated-type-bound-fail.rs
associated-type-bound-fail.stderr
associated-type-bound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bad-const-generic-exprs.rs
bad-const-generic-exprs.stderr
bad-generic-in-copy-impl.rs Remove track_errors entirely 2024-01-23 15:23:22 +00:00
bad-generic-in-copy-impl.stderr Remove track_errors entirely 2024-01-23 15:23:22 +00:00
bad-subst-const-kind.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bad-subst-const-kind.stderr Make generic const type mismatches not hide trait impls from the trait solver 2024-01-22 13:23:45 +00:00
broken-mir-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
broken-mir-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cannot-infer-type-for-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
coerce_unsized_array.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
concrete-const-as-fn-arg.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
concrete-const-impl-method.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
condition-in-trait-const-arg.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_trait_fn-issue-88433.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-arg-in-const-arg.min.stderr
const-arg-in-const-arg.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-arg-in-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-arg-type-arg-misordered.rs
const-arg-type-arg-misordered.stderr
const-argument-cross-crate-mismatch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-argument-cross-crate-mismatch.stderr
const-argument-cross-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-argument-if-length.full.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
const-argument-if-length.min.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
const-argument-if-length.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-argument-non-static-lifetime.min.stderr
const-argument-non-static-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-fn-with-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-generic-default-wont-borrowck.rs
const-generic-default-wont-borrowck.stderr
const-generic-function.rs
const-generic-function.stderr
const-generic-type_name.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-after-const-literal-arg.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-before-other-params.rs
const-param-before-other-params.stderr
const-param-elided-lifetime.full.stderr
const-param-elided-lifetime.min.stderr
const-param-elided-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-in-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-type-depends-on-const-param.full.stderr
const-param-type-depends-on-const-param.min.stderr
const-param-type-depends-on-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-type-depends-on-type-param-ungated.rs
const-param-type-depends-on-type-param-ungated.stderr
const-param-type-depends-on-type-param.full.stderr
const-param-type-depends-on-type-param.min.stderr
const-param-type-depends-on-type-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-with-additional-obligations.rs
const-param-with-additional-obligations.stderr
const-parameter-uppercase-lint.rs
const-parameter-uppercase-lint.stderr
core-types.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cross_crate_complex.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
default-ty-closure.rs
default-ty-closure.stderr
deref-into-array-generic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
different_generic_args_array.rs
different_generic_args_array.stderr
different_generic_args.full.stderr
different_generic_args.min.stderr
different_generic_args.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-evaluate-array-len-on-err-1.rs
dont-evaluate-array-len-on-err-1.stderr
dyn-supertraits.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dyn-supertraits.stderr Update tests 2024-02-07 10:42:01 +08:00
ensure_is_evaluatable.rs
ensure_is_evaluatable.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
enum-variants.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
exhaustive-value.rs
exhaustive-value.stderr
expose-default-substs-param-env.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
float-generic.adt_const_params.stderr
float-generic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
float-generic.simple.stderr
fn_with_two_const_inputs.rs
fn_with_two_const_inputs.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
fn_with_two_same_const_inputs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-const-param-call.full.stderr
fn-const-param-call.min.stderr
fn-const-param-call.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-const-param-infer.full.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
fn-const-param-infer.min.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
fn-const-param-infer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
forbid-non-structural_match-types.rs
forbid-non-structural_match-types.stderr
foreign-item-const-parameter.rs
foreign-item-const-parameter.stderr
generic-param-mismatch.rs
generic-param-mismatch.stderr
ice-68875.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ice-68875.stderr
ice-118285-fn-ptr-value.rs
ice-118285-fn-ptr-value.stderr
ice-const-generic-function-return-ty.rs
ice-const-generic-function-return-ty.stderr
impl-const-generic-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
incorrect-number-of-const-args.rs
incorrect-number-of-const-args.stderr
infer_arg_from_pat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
infer_arr_len_from_pat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inhabited-assoc-ty-ice-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inhabited-assoc-ty-ice-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
integer-literal-generic-arg-in-where-clause.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
intrinsics-type_name-as-const-argument.min.stderr
intrinsics-type_name-as-const-argument.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
invalid-const-arg-for-type-param.rs
invalid-const-arg-for-type-param.stderr
invalid-constant-in-args.rs
invalid-constant-in-args.stderr
invalid-enum.rs
invalid-enum.stderr
invariant.rs Change leak check lint message to behavior is likely to change in the future 2024-02-18 19:16:17 -03:00
invariant.stderr Change leak check lint message to behavior is likely to change in the future 2024-02-18 19:16:17 -03:00
issue-46511.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-46511.stderr Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
issue-66451.rs
issue-66451.stderr
issue-70408.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80471.rs
issue-80471.stderr
issue-93647.rs
issue-93647.stderr
issue-97007.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-102124.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-105689.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-106419-struct-with-multiple-const-params.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-112505-overflow.rs
issue-112505-overflow.stderr
legacy-const-generics-bad.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
legacy-const-generics-bad.stderr
legacy-const-generics.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lifetime-in-const-param.rs
lifetime-in-const-param.stderr
nested-type.full.stderr
nested-type.min.stderr
nested-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
outer-lifetime-in-const-generic-default.rs
outer-lifetime-in-const-generic-default.stderr
overlapping_impls.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
params-in-ct-in-ty-param-lazy-norm.full.stderr
params-in-ct-in-ty-param-lazy-norm.min.stderr
params-in-ct-in-ty-param-lazy-norm.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
parent_generics_of_encoding_impl_trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
parent_generics_of_encoding_impl_trait.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
parent_generics_of_encoding.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
projection-as-arg-const.rs
projection-as-arg-const.stderr
promotion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
raw-ptr-const-param-deref.full.stderr
raw-ptr-const-param-deref.min.stderr
raw-ptr-const-param-deref.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
raw-ptr-const-param.full.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
raw-ptr-const-param.min.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
raw-ptr-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
slice-const-param-mismatch.full.stderr
slice-const-param-mismatch.min.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
slice-const-param-mismatch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
slice-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
sneaky-array-repeat-expr.rs
sneaky-array-repeat-expr.stderr
struct-with-invalid-const-param.rs
struct-with-invalid-const-param.stderr
suggest_const_for_array.rs
suggest_const_for_array.stderr
trait-const-args.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transmute_no_gate.rs
transmute_no_gate.stderr
transmute-const-param-static-reference.min.stderr
transmute-const-param-static-reference.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transmute-fail.rs
transmute-fail.stderr
transmute.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transparent-maybeunit-array-wrapper.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
try_unify_ignore_lifetimes.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
two_matching_preds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
type_mismatch.rs
type_mismatch.stderr
type_not_in_scope.rs
type_not_in_scope.stderr
type_of_anon_const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
type-after-const-ok.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
types-mismatch-const-args.full.stderr
types-mismatch-const-args.min.stderr
types-mismatch-const-args.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unify_with_nested_expr.rs
unify_with_nested_expr.stderr
uninferred-consts-during-codegen-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
uninferred-consts-during-codegen-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unknown_adt.rs
unknown_adt.stderr
unused_braces.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused_braces.full.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused_braces.min.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused_braces.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused_braces.stderr
unused-const-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-type-param-suggestion.rs Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
unused-type-param-suggestion.stderr Improve the diagnostics for unused generic parameters 2024-02-01 16:18:03 +01:00
variant-discrimiant-no-generics.full.stderr
variant-discrimiant-no-generics.min.stderr
variant-discrimiant-no-generics.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
where-clauses.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
wrong-normalization.rs Continue compilation even if inherent impl checks fail 2024-02-14 21:04:51 +00:00
wrong-normalization.stderr Continue compilation even if inherent impl checks fail 2024-02-14 21:04:51 +00:00