Commit graph

10 commits

Author SHA1 Message Date
Caio ab8994d93e Move tests 2024-04-07 17:38:07 -03:00
许杰友 Jieyou Xu (Joe) ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
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
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Esteban Küber 2cca435717 Mention the syntax for use on mod foo; if foo doesn't exist
Newcomers might get confused that `mod` is the only way of defining
scopes, and that it can be used as if it were `use`.

Fix #69492.
2023-10-21 15:56:01 +00:00
clubby789 20a3b9a215 Use the correct span for displaying the line following a derive suggestion 2023-07-19 23:48:43 +00:00
Esteban Küber 5b40aa5eb4 Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
Pietro Albini 64af509377
remove invalid ignore-pretty 2023-04-03 09:24:11 +02:00
bohan 7615045ebd test: snapshot for derive suggestion in diff files 2023-02-09 22:28:53 +08:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00