about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-02-10 14:23:58 +0800
committerGitHub <noreply@github.com>2018-02-10 14:23:58 +0800
commitc04ec2c3f966f989b2d1ce80846fca5dbd00b174 (patch)
treebfd4d5ef13dae8ee135e4992ba303b794362076f /src/test/incremental/thinlto
parent077979f4a284ff6d3725a6933896330692b9d468 (diff)
parentdaaa9a440ccbdcf12165165ca38eb80bdb9a6eff (diff)
downloadrust-c04ec2c3f966f989b2d1ce80846fca5dbd00b174.tar.gz
rust-c04ec2c3f966f989b2d1ce80846fca5dbd00b174.zip
Rollup merge of #48047 - etaoins:fix-ice-for-mismatched-args-on-target-without-span, r=estebank
Fix ICE for mismatched args on target without span

Commit 7ed00caacc improved our error reporting by including the target function in our error messages when there is an argument count mismatch. A simple example from the UI tests is:

```
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 0 arguments
  --> $DIR/closure-arg-count.rs:32:53
   |
32 |     let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
   |                                                     ^^^ expected function that takes a single 2-tuple as argument
...
44 | fn foo() {}
   | -------- takes 0 arguments
```

However, this assumed the target span was always available. This does not hold true if the target function is in `std` or another crate. A simple example from #48046 is assigning `str::split` to a function type with a different number of arguments.

Fix by omitting all of the labels and suggestions related to the target span when it's not found.

Fixes #48046

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