]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #90349 - willcrichton:example-analyzer, r=jyn514
authorMatthias Krüger <matthias.krueger@famsik.de>
Mon, 1 Nov 2021 02:33:07 +0000 (03:33 +0100)
committerGitHub <noreply@github.com>
Mon, 1 Nov 2021 02:33:07 +0000 (03:33 +0100)
commit3730485a24e95db1f77201c6173cd189f403d151
treefa05b28a22d3ae938db5788d43313b7819e2b110
parentbb6901d32b21627e39825699d66c171141c14fd7
parentb8ecc9fefa4c9c763cf74e9c9659ecc00f30ba3a
Rollup merge of #90349 - willcrichton:example-analyzer, r=jyn514

Fix rare ICE during typeck in rustdoc scrape_examples

While testing the `--scrape-examples` extension on the [wasmtime](https://github.com/bytecodealliance/wasmtime) repository, I found some additional edge cases. Specifically, when asking to typecheck a body containing a function call, I would sometimes get an ICE if:
* The body doesn't exist
* The function's HIR node didn't have a type

This adds checks for both of those conditions.

(Also this updates a test to check that the sources of a reverse-dependency are correctly generated and linked.)

r? `@jyn514`