about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-04-25 22:08:45 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2022-05-02 01:56:50 +0300
commit8172166f34fe5077b3873a6254d379b2282e1530 (patch)
treed680f644e95a59b809bed4fb51d5b58ad55c0284 /tests/rustdoc-js-std/parser-errors.js
parentdefc537a2e7dc469d6fc1429854a24ca2914469f (diff)
downloadrust-8172166f34fe5077b3873a6254d379b2282e1530.tar.gz
rust-8172166f34fe5077b3873a6254d379b2282e1530.zip
rustc: Panic by default in `DefIdTree::parent`
Only crate root def-ids don't have a parent, and in majority of cases the argument of `DefIdTree::parent` cannot be a crate root.
So we now panic by default in `parent` and introduce a new non-panicing function `opt_parent` for cases where the argument can be a crate root.

Same applies to `local_parent`/`opt_local_parent`.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions