diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index d39a338d5..f59a29e14 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -73,8 +73,9 @@ class TocTree(Directive): entries.append((title, ref)) elif docname not in env.found_docs: ret.append(self.state.document.reporter.warning( - 'toctree references unknown document %r' % docname, - line=self.lineno)) + 'toctree contains reference to nonexisting ' + 'document %r' % docname, line=self.lineno)) + env.note_reread() else: entries.append((title, docname)) includefiles.append(docname)