For more information about how librustdoc works, see the rustc dev guide.