diff options
| author | Miguel Guarniz <mi9uel9@gmail.com> | 2022-07-15 23:13:04 -0400 |
|---|---|---|
| committer | Miguel Guarniz <mi9uel9@gmail.com> | 2022-07-29 18:25:58 -0400 |
| commit | 25bdc8965e7a80cb3a72da79ca568953738fe433 (patch) | |
| tree | 9e5c141b84918483db882f87c8d1bbb6b3702da1 /src/librustdoc/scrape_examples.rs | |
| parent | 3924dac7bb29bc8eb348059c901e8f912399c857 (diff) | |
| download | rust-25bdc8965e7a80cb3a72da79ca568953738fe433.tar.gz rust-25bdc8965e7a80cb3a72da79ca568953738fe433.zip | |
Change maybe_body_owned_by to take local def id
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
| -rw-r--r-- | src/librustdoc/scrape_examples.rs | 3 |
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; } |
