Rollup merge of #118458 - notriddle:notriddle/small-section-header, r=GuillaumeGomez
rustdoc: remove small from `small-section-header` There's no such thing as a big section header, so I don't know why the name was used.
This commit is contained in:
commit
49fadeef59
@ -1145,7 +1145,7 @@ fn anchor(&self, id: &'a str) -> Self {
|
|||||||
fn write_impl_section_heading(mut w: impl fmt::Write, title: &str, id: &str) {
|
fn write_impl_section_heading(mut w: impl fmt::Write, title: &str, id: &str) {
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<h2 id=\"{id}\" class=\"small-section-header\">\
|
"<h2 id=\"{id}\" class=\"section-header\">\
|
||||||
{title}\
|
{title}\
|
||||||
<a href=\"#{id}\" class=\"anchor\">§</a>\
|
<a href=\"#{id}\" class=\"anchor\">§</a>\
|
||||||
</h2>"
|
</h2>"
|
||||||
|
@ -430,7 +430,7 @@ fn cmp(
|
|||||||
last_section = Some(my_section);
|
last_section = Some(my_section);
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<h2 id=\"{id}\" class=\"small-section-header\">\
|
"<h2 id=\"{id}\" class=\"section-header\">\
|
||||||
<a href=\"#{id}\">{name}</a>\
|
<a href=\"#{id}\">{name}</a>\
|
||||||
</h2>{ITEM_TABLE_OPEN}",
|
</h2>{ITEM_TABLE_OPEN}",
|
||||||
id = cx.derive_id(my_section.id()),
|
id = cx.derive_id(my_section.id()),
|
||||||
@ -827,7 +827,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
|
|||||||
fn write_small_section_header(w: &mut Buffer, id: &str, title: &str, extra_content: &str) {
|
fn write_small_section_header(w: &mut Buffer, id: &str, title: &str, extra_content: &str) {
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<h2 id=\"{0}\" class=\"small-section-header\">\
|
"<h2 id=\"{0}\" class=\"section-header\">\
|
||||||
{1}<a href=\"#{0}\" class=\"anchor\">§</a>\
|
{1}<a href=\"#{0}\" class=\"anchor\">§</a>\
|
||||||
</h2>{2}",
|
</h2>{2}",
|
||||||
id, title, extra_content
|
id, title, extra_content
|
||||||
@ -1260,7 +1260,7 @@ fn write_content(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::
|
|||||||
if let Some(inner_type) = &t.inner_type {
|
if let Some(inner_type) = &t.inner_type {
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<h2 id=\"aliased-type\" class=\"small-section-header\">\
|
"<h2 id=\"aliased-type\" class=\"section-header\">\
|
||||||
Aliased Type<a href=\"#aliased-type\" class=\"anchor\">§</a></h2>"
|
Aliased Type<a href=\"#aliased-type\" class=\"anchor\">§</a></h2>"
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1685,7 +1685,7 @@ fn item_variants(
|
|||||||
let tcx = cx.tcx();
|
let tcx = cx.tcx();
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<h2 id=\"variants\" class=\"variants small-section-header\">\
|
"<h2 id=\"variants\" class=\"variants section-header\">\
|
||||||
Variants{}<a href=\"#variants\" class=\"anchor\">§</a>\
|
Variants{}<a href=\"#variants\" class=\"anchor\">§</a>\
|
||||||
</h2>\
|
</h2>\
|
||||||
{}\
|
{}\
|
||||||
@ -1772,7 +1772,7 @@ fn item_variants(
|
|||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<div class=\"sub-variant-field\">\
|
"<div class=\"sub-variant-field\">\
|
||||||
<span id=\"{id}\" class=\"small-section-header\">\
|
<span id=\"{id}\" class=\"section-header\">\
|
||||||
<a href=\"#{id}\" class=\"anchor field\">§</a>\
|
<a href=\"#{id}\" class=\"anchor field\">§</a>\
|
||||||
<code>{f}: {t}</code>\
|
<code>{f}: {t}</code>\
|
||||||
</span>",
|
</span>",
|
||||||
@ -1929,7 +1929,7 @@ fn item_fields(
|
|||||||
if fields.peek().is_some() {
|
if fields.peek().is_some() {
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<h2 id=\"fields\" class=\"fields small-section-header\">\
|
"<h2 id=\"fields\" class=\"fields section-header\">\
|
||||||
{}{}<a href=\"#fields\" class=\"anchor\">§</a>\
|
{}{}<a href=\"#fields\" class=\"anchor\">§</a>\
|
||||||
</h2>\
|
</h2>\
|
||||||
{}",
|
{}",
|
||||||
@ -1943,7 +1943,7 @@ fn item_fields(
|
|||||||
let id = cx.derive_id(format!("{typ}.{field_name}", typ = ItemType::StructField));
|
let id = cx.derive_id(format!("{typ}.{field_name}", typ = ItemType::StructField));
|
||||||
write!(
|
write!(
|
||||||
w,
|
w,
|
||||||
"<span id=\"{id}\" class=\"{item_type} small-section-header\">\
|
"<span id=\"{id}\" class=\"{item_type} section-header\">\
|
||||||
<a href=\"#{id}\" class=\"anchor field\">§</a>\
|
<a href=\"#{id}\" class=\"anchor field\">§</a>\
|
||||||
<code>{field_name}: {ty}</code>\
|
<code>{field_name}: {ty}</code>\
|
||||||
</span>",
|
</span>",
|
||||||
|
@ -205,7 +205,7 @@ ul.all-items {
|
|||||||
|
|
||||||
#toggle-all-docs,
|
#toggle-all-docs,
|
||||||
a.anchor,
|
a.anchor,
|
||||||
.small-section-header a,
|
.section-header a,
|
||||||
#src-sidebar a,
|
#src-sidebar a,
|
||||||
.rust a,
|
.rust a,
|
||||||
.sidebar h2 a,
|
.sidebar h2 a,
|
||||||
@ -742,13 +742,13 @@ nav.sub {
|
|||||||
margin: 0 0 15px 0;
|
margin: 0 0 15px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-section-header {
|
.section-header {
|
||||||
/* fields use <span> tags, but should get their own lines */
|
/* fields use <span> tags, but should get their own lines */
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-section-header:hover > .anchor, .impl:hover > .anchor,
|
.section-header:hover > .anchor, .impl:hover > .anchor,
|
||||||
.trait-impl:hover > .anchor, .variant:hover > .anchor {
|
.trait-impl:hover > .anchor, .variant:hover > .anchor {
|
||||||
display: initial;
|
display: initial;
|
||||||
}
|
}
|
||||||
@ -761,11 +761,11 @@ nav.sub {
|
|||||||
.anchor.field {
|
.anchor.field {
|
||||||
left: -5px;
|
left: -5px;
|
||||||
}
|
}
|
||||||
.small-section-header > .anchor {
|
.section-header > .anchor {
|
||||||
left: -15px;
|
left: -15px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
h2.small-section-header > .anchor {
|
h2.section-header > .anchor {
|
||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
</code></pre>
|
</code></pre>
|
||||||
{{ self.document() | safe }}
|
{{ self.document() | safe }}
|
||||||
{% if self.fields_iter().peek().is_some() %}
|
{% if self.fields_iter().peek().is_some() %}
|
||||||
<h2 id="fields" class="fields small-section-header"> {# #}
|
<h2 id="fields" class="fields section-header"> {# #}
|
||||||
Fields<a href="#fields" class="anchor">§</a> {# #}
|
Fields<a href="#fields" class="anchor">§</a> {# #}
|
||||||
</h2>
|
</h2>
|
||||||
{% for (field, ty) in self.fields_iter() %}
|
{% for (field, ty) in self.fields_iter() %}
|
||||||
{% let name = field.name.expect("union field name") %}
|
{% let name = field.name.expect("union field name") %}
|
||||||
<span id="structfield.{{ name }}" {#+ #}
|
<span id="structfield.{{ name }}" {#+ #}
|
||||||
class="{{ ItemType::StructField +}} small-section-header"> {# #}
|
class="{{ ItemType::StructField +}} section-header"> {# #}
|
||||||
<a href="#structfield.{{ name }}" class="anchor field">§</a> {# #}
|
<a href="#structfield.{{ name }}" class="anchor field">§</a> {# #}
|
||||||
<code>{{ name }}: {{+ self.print_ty(ty) | safe }}</code> {# #}
|
<code>{{ name }}: {{+ self.print_ty(ty) | safe }}</code> {# #}
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<h2 id="layout" class="small-section-header"> {# #}
|
<h2 id="layout" class="section-header"> {# #}
|
||||||
Layout<a href="#layout" class="anchor">§</a> {# #}
|
Layout<a href="#layout" class="anchor">§</a> {# #}
|
||||||
</h2> {# #}
|
</h2> {# #}
|
||||||
<div class="docblock"> {# #}
|
<div class="docblock"> {# #}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
||||||
assert-css: ("//*[@class='rust item-decl']//a[text()='Alias']", {"font-weight": "400"})
|
assert-css: ("//*[@class='rust item-decl']//a[text()='Alias']", {"font-weight": "400"})
|
||||||
assert-css: (
|
assert-css: (
|
||||||
"//*[@class='structfield small-section-header']//a[text()='Alias']",
|
"//*[@class='structfield section-header']//a[text()='Alias']",
|
||||||
{"font-weight": "400"},
|
{"font-weight": "400"},
|
||||||
)
|
)
|
||||||
assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
|
assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
|
||||||
|
@ -31,7 +31,7 @@ define-function: (
|
|||||||
ALL,
|
ALL,
|
||||||
)
|
)
|
||||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||||
assert-css: (".small-section-header a", {"color": |color|}, ALL)
|
assert-css: (".section-header a", {"color": |color|}, ALL)
|
||||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
||||||
// We select headings (h2, h3, h...).
|
// We select headings (h2, h3, h...).
|
||||||
assert-css: (".docblock > :not(p) > a", {"color": |headings_color|}, ALL)
|
assert-css: (".docblock > :not(p) > a", {"color": |headings_color|}, ALL)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
// Checking there is only a "Functions" header and no "Opaque types".
|
// Checking there is only a "Functions" header and no "Opaque types".
|
||||||
// @has async_fn_opaque_item/index.html
|
// @has async_fn_opaque_item/index.html
|
||||||
// @count - '//*[@class="small-section-header"]' 1
|
// @count - '//*[@class="section-header"]' 1
|
||||||
// @has - '//*[@class="small-section-header"]' 'Functions'
|
// @has - '//*[@class="section-header"]' 'Functions'
|
||||||
|
|
||||||
pub async fn test() {}
|
pub async fn test() {}
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
||||||
// Each compiler builtin proc-macro has a trait equivalent so we should have
|
// Each compiler builtin proc-macro has a trait equivalent so we should have
|
||||||
// a trait section as well.
|
// a trait section as well.
|
||||||
// @count - '//*[@id="main-content"]//*[@class="small-section-header"]' 2
|
// @count - '//*[@id="main-content"]//*[@class="section-header"]' 2
|
||||||
// @has - '//*[@id="main-content"]//*[@class="small-section-header"]' 'Traits'
|
// @has - '//*[@id="main-content"]//*[@class="section-header"]' 'Traits'
|
||||||
// @has - '//*[@id="main-content"]//*[@class="small-section-header"]' 'Derive Macros'
|
// @has - '//*[@id="main-content"]//*[@class="section-header"]' 'Derive Macros'
|
||||||
|
|
||||||
// Now checking the correct file is generated as well.
|
// Now checking the correct file is generated as well.
|
||||||
// @has 'foo/derive.Clone.html'
|
// @has 'foo/derive.Clone.html'
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
||||||
// There should only be one struct displayed.
|
// There should only be one struct displayed.
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
|
||||||
// @has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport'
|
// @has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport'
|
||||||
// @has - '//*[@id="main-content"]//*[@class="desc docblock-short"]' 'Visible. Original.'
|
// @has - '//*[@id="main-content"]//*[@class="desc docblock-short"]' 'Visible. Original.'
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
// @has - '//*[@class="item-name"]/a[@class="type"]' 'AtomicU8'
|
// @has - '//*[@class="item-name"]/a[@class="type"]' 'AtomicU8'
|
||||||
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
|
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
|
||||||
// We also ensure we don't have another item displayed.
|
// We also ensure we don't have another item displayed.
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
|
||||||
|
|
||||||
mod other {
|
mod other {
|
||||||
pub type AtomicU8 = ();
|
pub type AtomicU8 = ();
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'AtomicU8'
|
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'AtomicU8'
|
||||||
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
|
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
|
||||||
// We also ensure we don't have another item displayed.
|
// We also ensure we don't have another item displayed.
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
|
||||||
|
|
||||||
mod thing {
|
mod thing {
|
||||||
pub use core::sync::atomic::AtomicU8;
|
pub use core::sync::atomic::AtomicU8;
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
||||||
// We should only have a "Re-exports" and a "Modules" headers.
|
// We should only have a "Re-exports" and a "Modules" headers.
|
||||||
// @count - '//*[@id="main-content"]/h2[@class="small-section-header"]' 2
|
// @count - '//*[@id="main-content"]/h2[@class="section-header"]' 2
|
||||||
// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Re-exports'
|
// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Re-exports'
|
||||||
// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Modules'
|
// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Modules'
|
||||||
|
|
||||||
// @has - '//*[@id="reexport.Foo"]' 'pub use crate::issue_109258::Foo;'
|
// @has - '//*[@id="reexport.Foo"]' 'pub use crate::issue_109258::Foo;'
|
||||||
// @has - '//*[@id="reexport.Foo"]//a[@href="issue_109258/struct.Foo.html"]' 'Foo'
|
// @has - '//*[@id="reexport.Foo"]//a[@href="issue_109258/struct.Foo.html"]' 'Foo'
|
||||||
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
// @has 'foo/issue_109258/index.html'
|
// @has 'foo/issue_109258/index.html'
|
||||||
// We should only have a "Structs" header.
|
// We should only have a "Structs" header.
|
||||||
// @count - '//*[@id="main-content"]/h2[@class="small-section-header"]' 1
|
// @count - '//*[@id="main-content"]/h2[@class="section-header"]' 1
|
||||||
// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Structs'
|
// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Structs'
|
||||||
// @has - '//*[@id="main-content"]//a[@href="struct.Foo.html"]' 'Foo'
|
// @has - '//*[@id="main-content"]//a[@href="struct.Foo.html"]' 'Foo'
|
||||||
// @has 'foo/issue_109258/struct.Foo.html'
|
// @has 'foo/issue_109258/struct.Foo.html'
|
||||||
pub mod issue_109258 {
|
pub mod issue_109258 {
|
||||||
|
@ -66,8 +66,8 @@ pub mod single_reexport_inherit_hidden {
|
|||||||
pub mod single_reexport_no_inline {
|
pub mod single_reexport_no_inline {
|
||||||
// First we ensure that we only have re-exports and no inlined items.
|
// First we ensure that we only have re-exports and no inlined items.
|
||||||
// @has 'foo/single_reexport_no_inline/index.html'
|
// @has 'foo/single_reexport_no_inline/index.html'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
|
||||||
|
|
||||||
// Now we check that we don't have links to the items, just `pub use`.
|
// Now we check that we don't have links to the items, just `pub use`.
|
||||||
// @has - '//*[@id="main-content"]//*' 'pub use crate::private_module::Public as XFoo;'
|
// @has - '//*[@id="main-content"]//*' 'pub use crate::private_module::Public as XFoo;'
|
||||||
@ -101,10 +101,10 @@ pub mod glob_reexport {
|
|||||||
// With glob re-exports, we don't inline `#[doc(hidden)]` items so only `module` items
|
// With glob re-exports, we don't inline `#[doc(hidden)]` items so only `module` items
|
||||||
// should be inlined.
|
// should be inlined.
|
||||||
// @has 'foo/glob_reexport/index.html'
|
// @has 'foo/glob_reexport/index.html'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
|
||||||
|
|
||||||
// Now we check we have 1 re-export and 2 inlined items.
|
// Now we check we have 1 re-export and 2 inlined items.
|
||||||
// If not item from a glob re-export is visible, we don't show the re-export.
|
// If not item from a glob re-export is visible, we don't show the re-export.
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
||||||
// Checking there is no "trait" entry.
|
// Checking there is no "trait" entry.
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 4
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 4
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Functions'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Functions'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Macros'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Macros'
|
||||||
|
|
||||||
// @has - '//a[@href="fn.foo.html"]' 'foo'
|
// @has - '//a[@href="fn.foo.html"]' 'foo'
|
||||||
fn foo() {
|
fn foo() {
|
||||||
@ -50,11 +50,11 @@ impl Foo for Bar {}
|
|||||||
|
|
||||||
// @has 'foo/struct.Bar.html'
|
// @has 'foo/struct.Bar.html'
|
||||||
// @has - '//*[@id="method.foo"]/*[@class="code-header"]' 'pub(crate) fn foo()'
|
// @has - '//*[@id="method.foo"]/*[@class="code-header"]' 'pub(crate) fn foo()'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
|
||||||
// We now check that the `Foo` trait is not documented nor visible on `Bar` page.
|
// We now check that the `Foo` trait is not documented nor visible on `Bar` page.
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Implementations'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Implementations'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Auto Trait Implementations'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Auto Trait Implementations'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Blanket Implementations'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Blanket Implementations'
|
||||||
// @!has - '//*[@href="trait.Foo.html#method.babar"]/*[@class="code-header"]' 'fn babar()'
|
// @!has - '//*[@href="trait.Foo.html#method.babar"]/*[@class="code-header"]' 'fn babar()'
|
||||||
impl Bar {
|
impl Bar {
|
||||||
fn foo() {}
|
fn foo() {}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Modules'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Modules'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="item-table"]//*[@class="mod"]' 2
|
// @count - '//*[@id="main-content"]/*[@class="item-table"]//*[@class="mod"]' 2
|
||||||
// @has - '//*[@id="main-content"]//*[@class="mod"]' 'banana'
|
// @has - '//*[@id="main-content"]//*[@class="mod"]' 'banana'
|
||||||
// @has - '//*[@id="main-content"]//*[@href="banana/index.html"]' 'banana'
|
// @has - '//*[@id="main-content"]//*[@href="banana/index.html"]' 'banana'
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
||||||
// Checking there are only three sections.
|
// Checking there are only three sections.
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Functions'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Functions'
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
|
||||||
// Checking that there are only three items.
|
// Checking that there are only three items.
|
||||||
// @count - '//*[@id="main-content"]//*[@class="item-name"]' 3
|
// @count - '//*[@id="main-content"]//*[@class="item-name"]' 3
|
||||||
// @has - '//*[@id="main-content"]//a[@href="struct.Bar.html"]' 'Bar'
|
// @has - '//*[@id="main-content"]//a[@href="struct.Bar.html"]' 'Bar'
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
// @has 'foo/associations/index.html'
|
// @has 'foo/associations/index.html'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
|
||||||
// @has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
|
// @has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
|
||||||
// @has 'foo/associations/trait.GroupedBy.html'
|
// @has 'foo/associations/trait.GroupedBy.html'
|
||||||
pub mod associations {
|
pub mod associations {
|
||||||
@ -16,8 +16,8 @@ pub trait GroupedBy {}
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @has 'foo/prelude/index.html'
|
// @has 'foo/prelude/index.html'
|
||||||
// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
|
// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
|
||||||
// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
|
// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
|
||||||
// @has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
|
// @has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use associations::GroupedBy;
|
pub use associations::GroupedBy;
|
||||||
|
@ -65,7 +65,7 @@ pub union OneOr<A: Copy> {
|
|||||||
// @count - '//*[@id="aliased-type"]' 1
|
// @count - '//*[@id="aliased-type"]' 1
|
||||||
// @count - '//*[@id="variants"]' 0
|
// @count - '//*[@id="variants"]' 0
|
||||||
// @count - '//*[@id="fields"]' 1
|
// @count - '//*[@id="fields"]' 1
|
||||||
// @count - '//*[@class="structfield small-section-header"]' 2
|
// @count - '//*[@class="structfield section-header"]' 2
|
||||||
// @matches - '//pre[@class="rust item-decl"]//code' "union OneOrF64"
|
// @matches - '//pre[@class="rust item-decl"]//code' "union OneOrF64"
|
||||||
pub type OneOrF64 = OneOr<f64>;
|
pub type OneOrF64 = OneOr<f64>;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ pub struct One<T> {
|
|||||||
// @count - '//*[@id="aliased-type"]' 1
|
// @count - '//*[@id="aliased-type"]' 1
|
||||||
// @count - '//*[@id="variants"]' 0
|
// @count - '//*[@id="variants"]' 0
|
||||||
// @count - '//*[@id="fields"]' 1
|
// @count - '//*[@id="fields"]' 1
|
||||||
// @count - '//*[@class="structfield small-section-header"]' 1
|
// @count - '//*[@class="structfield section-header"]' 1
|
||||||
// @matches - '//pre[@class="rust item-decl"]//code' "struct OneU64"
|
// @matches - '//pre[@class="rust item-decl"]//code' "struct OneU64"
|
||||||
// @matches - '//pre[@class="rust item-decl"]//code' "pub val"
|
// @matches - '//pre[@class="rust item-decl"]//code' "pub val"
|
||||||
pub type OneU64 = One<u64>;
|
pub type OneU64 = One<u64>;
|
||||||
|
Loading…
Reference in New Issue
Block a user