about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-20 12:17:23 +0100
committerGitHub <noreply@github.com>2019-12-20 12:17:23 +0100
commit403bb097fce6f1d1fbb3b7b12d024f20ce845900 (patch)
treeee4124a8c052d1b64648b5bfd47b302ef8d2d3af /src/libstd
parentb779cbbe6806caccb73f21ac6aeba99316ca8900 (diff)
parent8a4632dec69082301d3fe67e48d422bc9fb665be (diff)
downloadrust-403bb097fce6f1d1fbb3b7b12d024f20ce845900.tar.gz
rust-403bb097fce6f1d1fbb3b7b12d024f20ce845900.zip
Rollup merge of #67285 - ohadravid:indicate-origin-of-where-type-parameter, r=estebank
Indicate origin of where type parameter for uninferred types

Based on #65951 (which is not merge yet), fixes #67277.

This PR improves a little the diagnostic for code like:

```
 async fn foo() {
     bar().await;
}

 async fn bar<T>() -> () {}
```

by showing:
```
error[E0698]: type inside `async fn` body must be known in this context
 --> unresolved_type_param.rs:9:5
  |
9 |     bar().await;
  |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
  |
...
```
(The
```
declared on the function `bar`
```
part is new)

A small side note: `Vec` and `slice` seem to resist this change, because querying `item_name()` panics, and `get_opt_name()` returns `None`.

r? @estebank
Diffstat (limited to 'src/libstd')
0 files changed, 0 insertions, 0 deletions