rust/tests/ui/associated-consts
Esteban Küber 5b54286640 Remove detail from label/note that is already available in other note
Remove the "which is required by `{root_obligation}`" post-script in
"the trait `X` is not implemented for `Y`" explanation in E0277. This
information is already conveyed in the notes explaining requirements,
making it redundant while making the text (particularly in labels)
harder to read.

```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
  --> $DIR/wf-static-type.rs:10:13
   |
LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`
   |
   = note: required for `Option<NotCopy>` to implement `Copy`
note: required by a bound in `IsCopy`
  --> $DIR/wf-static-type.rs:7:17
   |
LL | struct IsCopy<T:Copy> { t: T }
   |                 ^^^^ required by this bound in `IsCopy`
```
vs the prior

```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
  --> $DIR/wf-static-type.rs:10:13
   |
LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy`
   |
   = note: required for `Option<NotCopy>` to implement `Copy`
note: required by a bound in `IsCopy`
  --> $DIR/wf-static-type.rs:7:17
   |
LL | struct IsCopy<T:Copy> { t: T }
   |                 ^^^^ required by this bound in `IsCopy`
```
2024-10-29 16:26:57 +00:00
..
auxiliary
assoc-const-eq-ambiguity.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-ambiguity.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-bound-var-in-ty-not-wf.rs Reject escaping bound vars in the type of assoc const bindings 2024-03-13 14:29:27 +01:00
assoc-const-eq-bound-var-in-ty-not-wf.stderr Reject escaping bound vars in the type of assoc const bindings 2024-03-13 14:29:27 +01:00
assoc-const-eq-bound-var-in-ty.rs Reject escaping bound vars in the type of assoc const bindings 2024-03-13 14:29:27 +01:00
assoc-const-eq-esc-bound-var-in-ty.rs Reject escaping bound vars in the type of assoc const bindings 2024-03-13 14:29:27 +01:00
assoc-const-eq-esc-bound-var-in-ty.stderr Reject escaping bound vars in the type of assoc const bindings 2024-03-13 14:29:27 +01:00
assoc-const-eq-missing.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-missing.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-eq-param-in-ty.rs Bless test fallout (duplicate diagnostics) 2024-03-20 13:00:34 -04:00
assoc-const-eq-param-in-ty.stderr Bless test fallout (duplicate diagnostics) 2024-03-20 13:00:34 -04:00
assoc-const-eq-supertraits.rs Propagate the resolved type of assoc const bindings via query feeding 2024-02-18 10:29:22 +01:00
assoc-const-eq-ty-alias-noninteracting.rs Propagate the resolved type of assoc const bindings via query feeding 2024-02-18 10:29:22 +01:00
assoc-const-ty-mismatch.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const-ty-mismatch.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
assoc-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-ambiguity-report.rs
associated-const-ambiguity-report.stderr Sort method suggestions by DefPath instead of DefId 2024-03-27 14:02:16 +00:00
associated-const-array-len.rs
associated-const-array-len.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-const-eval.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-cross-crate-const-eval.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-cross-crate-defaults.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-cross-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-dead-code.rs
associated-const-dead-code.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-generic-obligations.rs
associated-const-generic-obligations.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-impl-wrong-lifetime.rs
associated-const-impl-wrong-lifetime.stderr recurse into refs when comparing tys for diagnostics 2023-12-07 23:00:46 -05:00
associated-const-impl-wrong-type.rs
associated-const-impl-wrong-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-in-global-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-in-trait.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
associated-const-in-trait.stderr Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
associated-const-inherent-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-marks-live-code.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-match-patterns.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-no-item.rs
associated-const-no-item.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-outer-ty-refs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-overwrite-default.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-private-impl.rs
associated-const-private-impl.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-public-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-range-match-patterns.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-resolution-order.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-self-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-trait-bound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-type-parameter-arrays-2.rs
associated-const-type-parameter-arrays-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
associated-const-type-parameter-arrays.rs
associated-const-type-parameter-arrays.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
associated-const-type-parameter-pattern.rs avoid creating an Instance only to immediately disassemble it again 2024-07-18 11:58:16 +02:00
associated-const-type-parameter-pattern.stderr avoid creating an Instance only to immediately disassemble it again 2024-07-18 11:58:16 +02:00
associated-const-type-parameters.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-type-parameters.stderr Update tests 2024-02-07 10:42:01 +08:00
associated-const-ufcs-infer-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-use-default.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
associated-const-use-impl-of-same-trait.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
defaults-cyclic-fail.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
defaults-cyclic-fail.stderr Enable ConstPropLint for promoteds 2024-02-17 10:44:46 +05:30
defaults-cyclic-pass.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
defaults-not-assumed-fail.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
defaults-not-assumed-fail.stderr Enable ConstPropLint for promoteds 2024-02-17 10:44:46 +05:30
defaults-not-assumed-pass.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
double-elided.rs Resolve elided lifetimes in assoc const to static if no other lifetimes are in scope 2024-06-14 11:05:35 -04:00
freeze.rs Expose Freeze trait again 2024-02-29 13:55:11 +00:00
infer-placeholder-in-non-suggestable-pos.rs Resolve elided lifetimes in assoc const to static if no other lifetimes are in scope 2024-06-14 11:05:35 -04:00
infer-placeholder-in-non-suggestable-pos.stderr Resolve elided lifetimes in assoc const to static if no other lifetimes are in scope 2024-06-14 11:05:35 -04:00
issue-24949-assoc-const-static-recursion-impl.rs Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-24949-assoc-const-static-recursion-impl.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-24949-assoc-const-static-recursion-trait-default.rs
issue-24949-assoc-const-static-recursion-trait-default.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-24949-assoc-const-static-recursion-trait.rs Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-24949-assoc-const-static-recursion-trait.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
issue-47814.rs
issue-47814.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-58022.rs Avoid a track_errors by bubbling up most errors from check_well_formed 2023-10-20 08:46:27 +00:00
issue-58022.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
issue-63496.rs
issue-63496.stderr
issue-69020-assoc-const-arith-overflow.noopt.stderr
issue-69020-assoc-const-arith-overflow.opt_with_overflow_checks.stderr
issue-69020-assoc-const-arith-overflow.opt.stderr
issue-69020-assoc-const-arith-overflow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-88599-ref-self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-93775.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-93835.rs Stabilize associated type bounds 2024-03-08 20:56:25 +00:00
issue-93835.stderr Stabilize associated type bounds 2024-03-08 20:56:25 +00:00
issue-102335-const.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
issue-102335-const.stderr Fix associated item removal suggestion 2024-07-17 21:30:40 +00:00
issue-105330.rs Apply nits 2024-05-13 16:55:58 -04:00
issue-105330.stderr Apply nits 2024-05-13 16:55:58 -04:00
issue-110933.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
mismatched_impl_ty_1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
mismatched_impl_ty_2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
mismatched_impl_ty_3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
projection-unspecified-but-bounded.rs
projection-unspecified-but-bounded.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
shadowed-const.rs Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
shadowed-const.stderr Resolve assoc item bindings by namespace 2023-12-07 22:33:56 +01:00
wrong-projection-self-ty-invalid-bivariant-arg2.rs Relate receiver invariantly in method probe for Mode::Path 2024-09-16 10:55:07 -04:00
wrong-projection-self-ty-invalid-bivariant-arg2.stderr Relate receiver invariantly in method probe for Mode::Path 2024-09-16 10:55:07 -04:00
wrong-projection-self-ty-invalid-bivariant-arg.rs Relate receiver invariantly in method probe for Mode::Path 2024-09-16 10:55:07 -04:00
wrong-projection-self-ty-invalid-bivariant-arg.stderr Relate receiver invariantly in method probe for Mode::Path 2024-09-16 10:55:07 -04:00