rust/tests/ui/const-generics/defaults
Esteban Küber b7fc1a7431 Add trait diff highlighting logic and use it in E0277
When a trait is not implemented for a type, but there *is* an `impl`
for another type or different trait params, we format the output to
use highlighting in the same way that E0308 does for types.

The logic accounts for 3 cases:
- When both the type and trait in the expected predicate and the candidate are different
- When only the types are different
- When only the trait generic params are different

For each case, we use slightly different formatting and wording.
2024-11-02 03:08:04 +00:00
..
auxiliary
complex-generic-default-expr.min.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
complex-generic-default-expr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
complex-unord-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-default.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-as-default-value.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-param-in-ty-defaults.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
default-annotation.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
default-const-param-cannot-reference-self.rs
default-const-param-cannot-reference-self.stderr
default-on-impl.rs
default-on-impl.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
default-param-wf-concrete.next.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
default-param-wf-concrete.old.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
default-param-wf-concrete.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
doesnt_infer.rs Taint infcx when reporting errors 2024-06-19 04:41:56 +00:00
doesnt_infer.stderr Const generic parameters aren't bounds, even if we end up erroring because of the bound that binds the parameter's type 2024-06-19 14:58:29 +00:00
external.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
forward-declared.rs
forward-declared.stderr
generic-expr-default-concrete.rs
generic-expr-default-concrete.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
generic-expr-default-mismatched-types.rs
generic-expr-default-mismatched-types.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
generic-expr-default.rs
generic-expr-default.stderr Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
intermixed-lifetime.rs
intermixed-lifetime.stderr
mismatch.rs
mismatch.stderr
mismatched_ty_const_in_trait_impl.rs Differentiate between methods and associated functions 2024-08-10 00:54:16 +00:00
mismatched_ty_const_in_trait_impl.stderr Differentiate between methods and associated functions 2024-08-10 00:54:16 +00:00
param-order-err-pretty-prints-default.rs
param-order-err-pretty-prints-default.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
pretty-printing-ast.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
pretty-printing-ast.stdout [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
repr-c-issue-82792.rs Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix" 2024-08-03 07:57:31 -04:00
rp_impl_trait_fail.rs Remove a has_errors check that only hides errors after unrelated items have errored. 2024-01-31 16:51:42 +00:00
rp_impl_trait_fail.stderr Add trait diff highlighting logic and use it in E0277 2024-11-02 03:08:04 +00:00
rp_impl_trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-referential.rs
self-referential.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
simple-defaults.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
trait_object_lt_defaults.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
trait_objects_fail.rs
trait_objects_fail.stderr Add trait diff highlighting logic and use it in E0277 2024-11-02 03:08:04 +00:00
trait_objects.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
type-default-const-param-name.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
wfness.rs
wfness.stderr Add trait diff highlighting logic and use it in E0277 2024-11-02 03:08:04 +00:00
wrong-order.rs
wrong-order.stderr