]> git.lizzy.rs Git - rust.git/commit
Point macros 1.1 errors to the input item
authorDavid Tolnay <dtolnay@gmail.com>
Fri, 2 Sep 2016 19:01:03 +0000 (12:01 -0700)
committerDavid Tolnay <dtolnay@gmail.com>
Tue, 6 Sep 2016 21:11:19 +0000 (14:11 -0700)
commit3784067edcbcd0614f6c4c88f6445ca17ae27ff6
tree60a0a0abe65bd0162ab1db0dda9d80e16caa1554
parent13c4e32e7aca87cbf867be68bf0fc45528bb3fcf
Point macros 1.1 errors to the input item

Before:

```rust
error[E0106]: missing lifetime specifier
  --> src/main.rs:10:10
   |
10 | #[derive(Serialize, Deserialize)]
   |          ^ expected lifetime parameter

error[E0038]: the trait `T` cannot be made into an object
  --> src/main.rs:15:15
   |
15 | #[derive(Serialize, Deserialize)]
   |          ^^^^^^^^^^ the trait `T` cannot be made into an object
```

After:

```rust
error[E0106]: missing lifetime specifier
  --> src/main.rs:11:1
   |
11 | struct A {
   | ^ expected lifetime parameter

error[E0038]: the trait `T` cannot be made into an object
  --> src/main.rs:16:1
   |
16 | struct B<'a> {
   | ^ the trait `T` cannot be made into an object
```
src/libsyntax_ext/deriving/custom.rs