rust/tests/ui/const-generics/generic_const_exprs
bors f361413cbf Auto merge of #106399 - estebank:type-err-span-label, r=nagisa
Modify primary span label for E0308

Looking at the reactions to https://hachyderm.io/`@ekuber/109622160673605438,` a lot of people seem to have trouble understanding the current output, where the primary span label on type errors talks about the specific types that diverged, but these can be deeply nested type parameters. Because of that we could see "expected i32, found u32" in the label while the note said "expected Vec<i32>, found Vec<u32>". This understandably confuses people. I believe that once people learn to read these errors it starts to make more sense, but this PR changes the output to be more in line with what people might expect, without sacrificing terseness.

Fix #68220.
2023-01-31 13:53:40 +00:00
..
assoc_const_unification
auxiliary test for non local anon const printing 2023-01-18 04:07:39 +00:00
const_kind_expr
abstract-const-as-cast-1.rs
abstract-const-as-cast-2.rs
abstract-const-as-cast-2.stderr
abstract-const-as-cast-3.rs
abstract-const-as-cast-3.stderr
abstract-const-as-cast-4.rs
abstract-consts-as-cast-5.rs
abstract-consts-as-cast-5.stderr
array-size-in-generic-struct-param.full.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
array-size-in-generic-struct-param.min.stderr
array-size-in-generic-struct-param.rs
associated-const.rs
associated-consts.rs
closures.rs
closures.stderr
const_eval_resolve_canonical.rs
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
cross_crate_predicate.rs
cross_crate_predicate.stderr
cross_crate.rs
dependence_lint.full.stderr
dependence_lint.gce.stderr
dependence_lint.rs
different-fn.rs
different-fn.stderr
division.rs
dont-eagerly-error-in-is-const-evaluatable.rs
drop_impl.rs
elaborate-trait-pred.rs
eval-privacy.rs
eval-privacy.stderr
eval-try-unify.rs
eval-try-unify.stderr
evaluated-to-ambig.rs
feature-gate-generic_const_exprs.rs
feature-gate-generic_const_exprs.stderr
fn_call.rs
from-sig-fail.rs
from-sig-fail.stderr
from-sig.rs
function-call.rs
function-call.stderr
impl-bounds.rs
infer-too-generic.rs
issue-62504.full.stderr
issue-62504.min.stderr defer array len printing to const arg printing 2023-01-18 04:07:39 +00:00
issue-62504.rs
issue-69654.rs
issue-69654.stderr
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
issue-72819-generic-in-const-eval.min.stderr
issue-72819-generic-in-const-eval.rs
issue-73298.rs
issue-73899.rs
issue-74634.rs
issue-74713.rs
issue-74713.stderr
issue-76595.rs
issue-76595.stderr
issue-79518-default_trait_method_normalization.rs
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
issue-80742.rs
issue-80742.stderr
issue-82268.rs
issue-83765.rs
issue-83765.stderr
issue-83972.rs
issue-84408.rs
issue-84669.rs
issue-85848.rs
issue-85848.stderr Note predicate span on ImplDerivedObligation 2023-01-11 19:46:45 +00:00
issue-86710.rs
issue-89851.rs
issue-90847.rs
issue-94287.rs
issue-94287.stderr
issue-94293.rs
issue-97047-ice-1.rs
issue-97047-ice-1.stderr
issue-97047-ice-2.rs
issue-97047-ice-2.stderr
issue-99647.rs
issue-99705.rs
issue-100217.rs
issue-100360.rs
issue-102074.rs
issue-102768.rs
issue-102768.stderr
issue-105257.rs
issue-105257.stderr
issue-105608.rs
issue-105608.stderr
less_than.rs
let-bindings.rs
let-bindings.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
needs_where_clause.rs
needs_where_clause.stderr
nested_uneval_unification-1.rs
nested_uneval_unification-2.rs
nested-abstract-consts-1.rs
nested-abstract-consts-2.rs
no_dependence.rs
no_where_clause.rs
no_where_clause.stderr
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
object-safety-err-ret.rs
object-safety-err-ret.stderr
object-safety-err-where-bounds.rs
object-safety-err-where-bounds.stderr
object-safety-ok-infer-err.rs
object-safety-ok-infer-err.stderr
object-safety-ok.rs
obligation-cause.rs
obligation-cause.stderr
simple_fail.rs
simple_fail.stderr
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
ty-alias-substitution.rs
unify-op-with-fn-call.rs
unify-op-with-fn-call.stderr
unop.rs
unused_expr.rs
unused_expr.stderr Properly pluralize 'generic constants' 2023-01-16 20:21:29 +00:00
unused-complex-default-expr.rs