provide a way to exclude a built file from the toctree without warning
Currently, it doesn't seem like there is a way to exclude a built file from the toctree without a warning.
There is the unused_docs/exclude_patterns configuration setting, but that setting suppresses the toctree warning by not building the file at all.
Excluding but still building a file is useful if you would like to "deprecate" a documentation page without breaking already-existing links on the web. The page will still be navigable via a direct link, though the page will not necessarily be navigable from the documentation itself. The content of such a deprecated page could be, for example, "this content has moved to ...."
This use-case came up in the discussion of CPython's issue 16406.