about summary refs log tree commit diff
path: root/src/librustdoc/scrape_examples.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-30 17:30:50 +0000
committerbors <bors@rust-lang.org>2022-07-30 17:30:50 +0000
commit038f9e6bef9c8fcf122d93a8a33ac546f5606eb3 (patch)
tree0d2728e319fe7994124679b81b529533d0cc39fe /src/librustdoc/scrape_examples.rs
parent1202bbaf48a0a919a2e0cfd8b7dce97e8fc3030d (diff)
parentdf2cf97830dde8f563b898820ffbba200253326b (diff)
downloadrust-038f9e6bef9c8fcf122d93a8a33ac546f5606eb3.tar.gz
rust-038f9e6bef9c8fcf122d93a8a33ac546f5606eb3.zip
Auto merge of #99948 - Dylan-DPC:rollup-ed5136t, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #99311 (change maybe_body_owned_by to take local def id)
 - #99862 (Improve type mismatch w/ function signatures)
 - #99895 (don't call type ascription "cast")
 - #99900 (remove some manual hash stable impls)
 - #99903 (Add diagnostic when using public instead of pub)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
-rw-r--r--src/librustdoc/scrape_examples.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/scrape_examples.rs b/src/librustdoc/scrape_examples.rs
index c0fe8b49cfd..fd0b19034a2 100644
--- a/src/librustdoc/scrape_examples.rs
+++ b/src/librustdoc/scrape_examples.rs
@@ -143,8 +143,7 @@ where
         // then we need to exit before calling typeck (which will panic). See
         // test/run-make/rustdoc-scrape-examples-invalid-expr for an example.
         let hir = tcx.hir();
-        let owner = hir.local_def_id_to_hir_id(ex.hir_id.owner);
-        if hir.maybe_body_owned_by(owner).is_none() {
+        if hir.maybe_body_owned_by(ex.hir_id.owner).is_none() {
             return;
         }