'Note a TOC tree directive in a document and gather information about
file relations from it.'

def note_toctree(self, docname, toctreenode):

    warnings.warn('env.note_toctree()    is    deprecated.    Use    sphinx.environment.adapters.toctree.TocTree    instead.', RemovedInSphinx20Warning)
    TocTree(self).note(docname, toctreenode)
