rust/tests/ui/const-generics/generic_const_exprs
Esteban Küber 8c04999226 On object safety error, mention new enum as alternative
When we encounter a `dyn Trait` that isn't object safe, look for its
implementors. If there's one, mention using it directly If there are
less than 9, mention the possibility of creating a new enum and using
that instead.

Account for object unsafe `impl Trait on dyn Trait {}`.  Make a
distinction between public and sealed traits.

Fix #80194.
2023-10-29 23:55:46 +00:00
..
assoc_const_unification Move /src/test to /tests 2023-01-11 09:32:08 +00:00
auxiliary test for non local anon const printing 2023-01-18 04:07:39 +00:00
const_kind_expr make `relate`'s const ty assertion use semantic equality 2023-02-11 23:05:16 +00:00
abstract-const-as-cast-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
abstract-const-as-cast-4.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00: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 make adt_const_params feature suggestion more consistent with others and only suggest it when the type can probably work 2023-09-28 23:10:04 +00:00
array-size-in-generic-struct-param.rs Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
associated-const.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
associated-consts.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closures.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closures.stderr moved note as unspanned note, moved note to the bottom of the msg 2023-07-18 21:53:34 -04: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 Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
const_eval_resolve_canonical.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross_crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross_crate_predicate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cross_crate_predicate.stderr rustc_middle: Fix `opt_item_ident` for non-local def ids 2023-05-03 20:09:10 +03:00
dependence_lint.full.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dependence_lint.gce.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dependence_lint.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dont-eagerly-error-in-is-const-evaluatable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
drop_impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
elaborate-trait-pred.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Replace old private-in-public diagnostic with type privacy lints 2023-08-02 13:40:28 +03:00
eval-try-unify.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
eval-try-unify.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
evaluated-to-ambig.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fn_call.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
from-sig-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
from-sig-fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
from-sig.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
function-call.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
function-call.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
impl-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
infer-too-generic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
inline-const-in-const-generic-defaults.rs add a test for #105709 2023-06-08 15:24:09 +09:00
issue-62504.full.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-62504.min.stderr defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-62504.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Filter impl and where-clause candidates that reference errors 2023-01-11 20:03:29 +00:00
issue-72787.rs Filter impl and where-clause candidates that reference errors 2023-01-11 20:03:29 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-72819-generic-in-const-eval.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-73298.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-73899.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74634.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-74713.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-74713.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-76595.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-76595.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07: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 Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
issue-80561-incorrect-param-env.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80742.rs place evaluation: require the original pointer to be aligned if an access happens 2023-10-15 18:13:31 +02:00
issue-80742.stderr place evaluation: require the original pointer to be aligned if an access happens 2023-10-15 18:13:31 +02:00
issue-82268.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84408.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84669.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85848.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85848.stderr Point out if a local trait has no implementations 2023-09-10 21:20:36 +00:00
issue-86710.rs Adjust UI tests for `unit_bindings` 2023-06-12 20:24:48 +08:00
issue-89851.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-90847.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-94287.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-94287.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-94293.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-96699.rs Add a regression test for #96699 2023-06-24 14:46:02 +09:00
issue-97047-ice-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97047-ice-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99647.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99705.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100217.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100360.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102074.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-102768.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-102768.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-105257.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105257.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105608.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105608.stderr diagnostics: update test cases to refer to assoc fn with `self` as method 2023-02-22 08:40:47 -07: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 Move /src/test to /tests 2023-01-11 09:32:08 +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 Only expect a GAT const arg 2023-03-19 23:46:09 +00:00
needs_where_clause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
needs_where_clause.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-abstract-consts-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-abstract-consts-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested_uneval_unification-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested_uneval_unification-2.rs correctly recurse when expanding anon consts 2023-05-02 18:42:55 +01:00
no_dependence.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no_where_clause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
no_where_clause.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
non_local_anon_const_diagnostics.rs test for non local anon const printing 2023-01-18 04:07:39 +00:00
non_local_anon_const_diagnostics.stderr i am free 2023-01-18 04:45:43 +00:00
normed_to_param_is_evaluatable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-safety-err-ret.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-safety-err-ret.stderr On object safety error, mention new enum as alternative 2023-10-29 23:55:46 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00: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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
object-safety-ok.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
obligation-cause.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
obligation-cause.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +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 Use ObligationCtxt::new_in_snapshot in satisfied_from_param_env 2023-01-30 19:04:59 +00:00
subexprs_are_const_evalutable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ty-alias-substitution.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type_mismatch.rs Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types` 2023-10-25 12:04:54 +00:00
type_mismatch.stderr Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types` 2023-10-25 12:04:54 +00:00
typeid-equality-by-subtyping.rs Blesses UI tests, add known bug to typeid-equality-by-subtyping 2023-05-26 09:53:05 +02:00
typeid-equality-by-subtyping.stderr Propagate pattern errors via a new `PatKind::Error` variant 2023-10-14 13:38:02 +02:00
unify-op-with-fn-call.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
unify-op-with-fn-call.stderr bless tests 2023-08-06 13:34:53 +00:00
unop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unresolved_lifetimes_error.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
unresolved_lifetimes_error.stderr improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
unused-complex-default-expr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00: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