pub fn process_doc(
env: &mut BuildEnvironment,
doc: &DocumentSource<'_>,
doc2path: &dyn Fn(&str) -> PathBuf,
warnings: &mut Vec<BuildWarning>,
)Expand description
StandardDomain.process_doc (domains/std/__init__.py:937-993) plus the
registrations Sphinx performs from directives at parse time, which our
parse layer has no domain callbacks to run: glossary terms
(make_glossary_term) are replayed from the finished doctree, and the
option/envvar/confval registrations
(ObjectDescription.add_target_and_index) from the records the parse
layer kept — see RegistryExport::program_options for why the doctree
cannot carry those. The py domain’s registrations
([crate::env::py_domain::collect_registrations]) replay in the same
parse-time pass, because that is where they fire in Sphinx — their
duplicate warnings interleave with std’s in document order.
doc2path renders another document’s source path for the duplicate-label
warning [ENV §8 #1], which names the path, not the docname.