rust/tests/ui/const-generics/generic_const_exprs
Esteban Küber 6c31f6ce12 Provide structured suggestion for #![feature(foo)]
```
error: `S2<'_>` is forbidden as the type of a const generic parameter
  --> $DIR/lifetime-in-const-param.rs:5:23
   |
LL | struct S<'a, const N: S2>(&'a ());
   |                       ^^
   |
   = note: the only supported types are integers, `bool` and `char`
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
   |
LL + #![feature(adt_const_params)]
   |
```

Fix #55941.
2024-03-18 16:08:58 +00:00
..
assoc_const_unification [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auxiliary Remove some unnecessary allow(incomplete_features) 2024-03-11 19:42:04 +00:00
const_kind_expr Replace TypeWalker usage with TypeVisitor 2024-03-08 20:49:03 +09:00
abstract-const-as-cast-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
abstract-const-as-cast-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
abstract-const-as-cast-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
abstract-const-as-cast-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
abstract-const-as-cast-3.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
abstract-const-as-cast-4.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
abstract-consts-as-cast-5.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
abstract-consts-as-cast-5.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
array-size-in-generic-struct-param.full.stderr Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
array-size-in-generic-struct-param.min.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
array-size-in-generic-struct-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-consts.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
closures.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closures.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const_eval_resolve_canonical.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-block-is-poly.rs ConstBlocks are poly if their substs are poly 2023-01-16 20:09:31 +00:00
const-block-is-poly.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cross_crate_predicate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cross_crate_predicate.stderr Remove some unnecessary allow(incomplete_features) 2024-03-11 19:42:04 +00:00
cross_crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dependence_lint.full.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
dependence_lint.gce.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dependence_lint.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
different-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
different-fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
division.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont-eagerly-error-in-is-const-evaluatable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop_impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
elaborate-trait-pred.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
eval-privacy.rs Replace old private-in-public diagnostic with type privacy lints 2023-08-02 13:40:28 +03:00
eval-privacy.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
eval-try-unify.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
eval-try-unify.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
evaluated-to-ambig.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
feature-gate-generic_const_exprs.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
feature-gate-generic_const_exprs.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
fn_call.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
from-sig-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
from-sig-fail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
from-sig.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
function-call.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
function-call.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
infer-too-generic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inline-const-in-const-generic-defaults.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-62504.full.stderr Remove a has_errors check that only hides errors after unrelated items have errored. 2024-01-31 16:51:42 +00:00
issue-62504.min.stderr Remove a has_errors check that only hides errors after unrelated items have errored. 2024-01-31 16:51:42 +00:00
issue-62504.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-69654.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69654.stderr Conserve cause of ImplDerivedObligation in E0599 2023-01-11 19:31:33 +00:00
issue-72787.min.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-72787.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72819-generic-in-const-eval.full.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-72819-generic-in-const-eval.min.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-72819-generic-in-const-eval.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73298.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-73899.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74634.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-74713.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-74713.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
issue-76595.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-76595.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-79518-default_trait_method_normalization.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-79518-default_trait_method_normalization.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-80561-incorrect-param-env.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80742.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-80742.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-82268.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-83765.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83765.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83972.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84408.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84669.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-85848.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85848.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-86710.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89851.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90847.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-94287.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-94287.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-94293.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-96699.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-97047-ice-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-97047-ice-1.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97047-ice-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-97047-ice-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99647.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-99705.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-100217.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-100360.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-102074.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-102768.rs Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
issue-102768.stderr Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
issue-105257.rs Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
issue-105257.stderr Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
issue-105608.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105608.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-109141.rs Add a regression test for #109141 2023-06-24 14:27:58 +09:00
issue-109141.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
less_than.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
let-bindings.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
let-bindings.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
mismatched-gat-subst-kind.rs Only expect a GAT const arg 2023-03-19 23:46:09 +00:00
mismatched-gat-subst-kind.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
needs_where_clause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
needs_where_clause.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
nested_uneval_unification-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nested_uneval_unification-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nested-abstract-consts-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nested-abstract-consts-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no_dependence.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no_where_clause.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
no_where_clause.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
non_local_anon_const_diagnostics.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
non_local_anon_const_diagnostics.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
normed_to_param_is_evaluatable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
object-safety-err-ret.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
object-safety-err-ret.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
object-safety-err-where-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-safety-err-where-bounds.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
object-safety-ok-infer-err.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-safety-ok-infer-err.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
object-safety-ok.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
obligation-cause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
obligation-cause.stderr Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
simple_fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
simple_fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
single-satisfied-ConstEvaluatable-in-probe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
subexprs_are_const_evalutable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ty-alias-substitution.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
type_mismatch.rs Make generic const type mismatches not hide trait impls from the trait solver 2024-01-22 13:23:45 +00:00
type_mismatch.stderr Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco" 2024-03-11 21:28:16 +00:00
typeid-equality-by-subtyping.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
typeid-equality-by-subtyping.stderr Make infer higher ranked equate use bidirectional subtyping in invariant context 2024-02-29 15:27:56 -03:00
unify-op-with-fn-call.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unify-op-with-fn-call.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
unop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unresolved_lifetimes_error.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
unresolved_lifetimes_error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unused_expr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unused_expr.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
unused-complex-default-expr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00