rust/tests/ui/cast
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
..
cast-as-bool.rs
cast-as-bool.stderr
cast-char.rs
cast-char.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-does-fallback.rs
cast-errors-issue-43825.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-errors-issue-43825.stderr
cast-from-nil.rs
cast-from-nil.stderr
cast-int-to-char.rs
cast-int-to-char.stderr
cast-macro-lhs.rs
cast-macro-lhs.stderr
cast-pointee-projection.rs
cast-region-to-uint.rs
cast-rfc0401-2.rs
cast-rfc0401-2.stderr
cast-rfc0401-vtable-kinds.rs blessings 2024-07-04 17:56:09 +02:00
cast-rfc0401-vtable-kinds.stderr blessings 2024-07-04 17:56:09 +02:00
cast-rfc0401.rs
cast-to-bare-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-to-bare-fn.stderr
cast-to-infer-ty.rs
cast-to-nil.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cast-to-nil.stderr
cast-to-slice.rs
cast-to-slice.stderr
cast-to-unsized-trait-object-suggestion.rs
cast-to-unsized-trait-object-suggestion.stderr
cast.rs
casts-differing-anon.rs
casts-differing-anon.stderr improve errors for invalid pointer casts 2024-09-24 23:12:02 +02:00
casts-issue-46365.rs
casts-issue-46365.stderr
codegen-object-shim.rs
dyn-tails-need-normalization.rs Normalize when equating dyn tails in MIR borrowck 2024-08-05 14:28:06 -04:00
enum-to-numeric-cast.rs
enum-to-numeric-cast.stderr Emit more specific diagnostics when enums fail to cast with as 2024-02-09 09:19:44 +05:30
fat-ptr-cast-rpass.rs
fat-ptr-cast-rpass.stderr
fat-ptr-cast.rs
fat-ptr-cast.stderr Use wide pointers consistenly across the compiler 2024-10-04 14:06:48 +02:00
ice-cast-type-with-error-124848.rs
ice-cast-type-with-error-124848.stderr Use ordinal number in argument error 2024-07-14 13:50:09 +09:00
issue-10991.rs
issue-10991.stderr
issue-17444.rs
issue-17444.stderr
issue-84213.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84213.rs
issue-84213.stderr
issue-85586.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85586.stderr
issue-88621.rs
issue-88621.stderr
issue-89497.fixed
issue-89497.rs
issue-89497.stderr
issue-106883-is-empty.rs
issue-106883-is-empty.stderr
ptr-to-ptr-different-regions.rs
ptr-to-trait-obj-add-auto.rs Sort trait names before printing 2024-07-04 18:38:18 +02:00
ptr-to-trait-obj-add-auto.stderr Sort trait names before printing 2024-07-04 18:38:18 +02:00
ptr-to-trait-obj-add-super-auto.rs Allow casting *mut dyn T->*mut (dyn T + Send) if T has Send super trait 2024-07-07 20:07:01 +02:00
ptr-to-trait-obj-different-args.rs improve errors for invalid pointer casts 2024-09-24 23:12:02 +02:00
ptr-to-trait-obj-different-args.stderr improve errors for invalid pointer casts 2024-09-24 23:12:02 +02:00
ptr-to-trait-obj-different-regions-id-trait.current.stderr use more accurate spans for user type ascriptions 2024-09-24 22:20:42 +02:00
ptr-to-trait-obj-different-regions-id-trait.next.stderr use more accurate spans for user type ascriptions 2024-09-24 22:20:42 +02:00
ptr-to-trait-obj-different-regions-id-trait.rs Normalize struct tail properly in borrowck and hir typeck 2024-08-11 19:40:03 -04:00
ptr-to-trait-obj-different-regions-lt-ext.rs Arbitrary self types v2: pointers feature gate. 2024-08-27 17:32:35 +00:00
ptr-to-trait-obj-different-regions-lt-ext.stderr Add more checks for pointers with vtable meta 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-different-regions-misc.rs add even more tests for ptr-to-ptr casts on trait objects 2024-09-27 21:04:32 +02:00
ptr-to-trait-obj-different-regions-misc.stderr add even more tests for ptr-to-ptr casts on trait objects 2024-09-27 21:04:32 +02:00
ptr-to-trait-obj-drop-principal.rs elaborate why dropping principal in *dyn casts is non-trivial 2024-10-20 17:54:04 +02:00
ptr-to-trait-obj-drop-principal.stderr elaborate why dropping principal in *dyn casts is non-trivial 2024-10-20 17:54:04 +02:00
ptr-to-trait-obj-ok.rs borrowck: use subtyping instead of equality for ptr-to-ptr casts 2024-09-27 21:04:32 +02:00
ptr-to-trait-obj-wrap-upcast.rs Actually check that the traits are the same for casting pointers to dyn _ 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-wrap-upcast.stderr improve errors for invalid pointer casts 2024-09-24 23:12:02 +02:00
supported-cast.rs
unsized-struct-cast.rs
unsized-struct-cast.stderr
unsized-union-ice.rs
unsized-union-ice.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
unsupported-cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unsupported-cast.stderr