rust/tests/ui/deriving
Esteban Küber 6efddac288 Provide more context on derived obligation error primary label
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote:

```
error[E0277]: the trait bound `i32: Bar` is not satisfied
 --> f100.rs:6:6
  |
6 |     <i32 as Foo>::foo();
  |      ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo`
  |
help: this trait has no implementations, consider adding one
 --> f100.rs:2:1
  |
2 | trait Bar {}
  | ^^^^^^^^^
note: required for `i32` to implement `Foo`
 --> f100.rs:3:14
  |
3 | impl<T: Bar> Foo for T {}
  |         ---  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
```

Fix #40120.
2024-01-30 21:28:18 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
derive-no-std.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
derive-partialord-correctness.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-all-codegen.rs Allow more deriving on packed structs. 2023-01-30 12:00:42 +11:00
deriving-all-codegen.stderr Allow more deriving on packed structs. 2023-01-30 12:00:42 +11:00
deriving-all-codegen.stdout remove StructuralEq trait 2024-01-24 07:56:23 +01:00
deriving-associated-types.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-clone-array.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-clone-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-clone-generic-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-clone-generic-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-clone-generic-tuple-struct.rs Adjust compiler tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
deriving-clone-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-clone-tuple-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-cmp-generic-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-cmp-generic-struct-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-cmp-generic-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-cmp-generic-tuple-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-cmp-shortcircuit.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-copyclone.rs Adjust compiler tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
deriving-default-box.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-default-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-enum-single-variant.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-eq-ord-boxed-slice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-hash.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-in-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-in-macro.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-meta-multiple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-meta.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-self-lifetime-totalord-totaleq.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-show-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-show.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-c-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-hash-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-hash-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-struct-empty.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-struct-like-enum-variant.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-struct-tuple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-via-extension-type-params.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-with-helper.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deriving-with-repr-packed.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-3935.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-6341.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-15689-1.rs Move tests 2023-05-08 17:58:01 -03:00
issue-15689-2.rs Move tests 2023-05-08 17:58:01 -03:00
issue-19358.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-58319.rs Adjust compiler tests for unused_tuple_struct_fields -> dead_code 2024-01-02 15:34:37 -05:00
issue-89188-gat-hrtb.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103157.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-103157.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
multiple-defaults.rs improve help for multiple #[default] variants 2023-11-21 12:20:54 +00:00
multiple-defaults.stderr improve help for multiple #[default] variants 2023-11-21 12:20:54 +00:00