]> git.lizzy.rs Git - rust.git/commit
Auto merge of #63901 - estebank:unknown-receiver-type, r=zackmdavis
authorbors <bors@rust-lang.org>
Mon, 26 Aug 2019 17:33:50 +0000 (17:33 +0000)
committerbors <bors@rust-lang.org>
Mon, 26 Aug 2019 17:33:50 +0000 (17:33 +0000)
commit9b91b9c10e3c87ed333a1e34c4f46ed68f1eee06
tree479cc1dd1e1799c3a7ad529e2534d866c21dfd93
parent9fa8f140233047fb0211dbaee531a290bcfeae7e
parent8458eba41bb1ae7848143f33c610b59e9614ec9b
Auto merge of #63901 - estebank:unknown-receiver-type, r=zackmdavis

Point at method call on missing annotation error

Make it clearer where the type name that couldn't be inferred comes from.

Before:

```
error[E0282]: type annotations needed
 --> src/test/ui/span/type-annotations-needed-expr.rs:2:13
  |
2 |     let _ = (vec![1,2,3]).into_iter().sum() as f64; //~ ERROR E0282
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for `S`
  |
  = note: type must be known at this point
```
after
```
error[E0282]: type annotations needed
 --> src/test/ui/span/type-annotations-needed-expr.rs:2:39
  |
2 |     let _ = (vec![1,2,3]).into_iter().sum() as f64; //~ ERROR E0282
  |                                       ^^^ cannot infer type for `S`
  |
  = note: type must be known at this point
```

CC #63852.