rustdoc: wrap stability tags in colored spans

This commit is contained in:
Andy Russell 2019-01-14 10:02:27 -05:00
parent d30b99f9c2
commit ea2b1b035b
No known key found for this signature in database
GPG key ID: BE2221033EDBC374
6 changed files with 31 additions and 19 deletions

View file

@ -1,7 +1,9 @@
#![feature(deprecated)]
// @matches deprecated/index.html '//*[@class="docblock-short"]' \
// '^\[Deprecated\] Deprecated docs'
// @has deprecated/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' \
// 'Deprecated'
// @has - '//*[@class="docblock-short"]' 'Deprecated docs'
// @has deprecated/struct.S.html '//*[@class="stab deprecated"]' \
// 'Deprecated since 1.0.0: text'
/// Deprecated docs

View file

@ -7,7 +7,8 @@
extern crate macros;
// @has foo/index.html '//*[@class="docblock-short"]' '[Deprecated] [Experimental]'
// @has foo/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' Deprecated
// @has - '//*[@class="docblock-short"]/span[@class="stab unstable"]' Experimental
// @has foo/macro.my_macro.html
// @has - '//*[@class="docblock"]' 'docs for my_macro'

View file

@ -1,7 +1,9 @@
// compile-flags: -Z force-unstable-if-unmarked
// @matches internal/index.html '//*[@class="docblock-short"]' \
// '^\[Internal\] Docs'
// @matches internal/index.html '//*[@class="docblock-short"]/span[@class="stab internal"]' \
// 'Internal'
// @matches - '//*[@class="docblock-short"]' 'Docs'
// @has internal/struct.S.html '//*[@class="stab internal"]' \
// 'This is an internal compiler API. (rustc_private)'
/// Docs

View file

@ -3,8 +3,11 @@
#![unstable(feature="test", issue = "32374")]
// @matches issue_32374/index.html '//*[@class="docblock-short"]' \
// '^\[Deprecated\] \[Experimental\] Docs'
// @matches issue_32374/index.html '//*[@class="docblock-short"]/span[@class="stab deprecated"]' \
// 'Deprecated'
// @matches issue_32374/index.html '//*[@class="docblock-short"]/span[@class="stab unstable"]' \
// 'Experimental'
// @matches issue_32374/index.html '//*[@class="docblock-short"]/text()' 'Docs'
// @has issue_32374/struct.T.html '//*[@class="stab deprecated"]' \
// 'Deprecated since 1.0.0: text'