From 9c485685f9b0e9cae407a1f1e31a42b604fb76cb Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 3 Oct 2026 22:45:33 -0700 Subject: [PATCH 1/2] Implement minimal stable rustdoc URLs --- src/librustdoc/clean/types.rs | 18 ++++++++++++++++- src/librustdoc/html/format.rs | 5 +++++ src/librustdoc/html/render/context.rs | 20 +++++++++++++++++++ src/librustdoc/html/render/print_item.rs | 2 ++ src/librustdoc/html/static/js/main.js | 2 ++ src/librustdoc/html/static/js/search.js | 15 ++++++++++++-- .../passes/lint/redundant_explicit_links.rs | 4 ++++ 7 files changed, 63 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index c34b33d9c92f5..cb1e3f2306a78 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -786,7 +786,23 @@ impl Item { /// Generates the HTML file name based on the item kind. pub(crate) fn html_filename(&self) -> String { - format!("{type_}.{name}.html", type_ = self.type_(), name = self.name.unwrap()) + let type_ = match self.type_() { + ItemType::Struct | ItemType::Union | ItemType::Enum => "type", + type_ => type_.as_str(), + }; + format!("{type_}.{name}.html", name = self.name.unwrap()) + } + + /// Generates the HTML file for the legacy redirect + /// + pub(crate) fn html_redirect_filename(&self) -> Option { + let redirect_type = match self.type_() { + ItemType::Struct => "struct", + ItemType::Union => "union", + ItemType::Enum => "enum", + _ => return None, + }; + Some(format!("{redirect_type}.{name}.html", name = self.name.unwrap())) } /// Returns a `FnHeader` if `self` is a function item, otherwise returns `None`. diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index b97bd93181f7a..8132652c989d0 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -658,6 +658,11 @@ fn make_href( ItemType::Module => { url_parts.push("index.html"); } + // + ItemType::Enum | ItemType::Struct | ItemType::Union => { + let last = fqp.last().unwrap(); + url_parts.push_fmt(format_args!("type.{last}.html")); + } _ => { let last = fqp.last().unwrap(); url_parts.push_fmt(format_args!("{shortty}.{last}.html")); diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index f828327b4b985..aabc7f2419ede 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -809,6 +809,26 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { let redir_dst = self.dst.join(redir_name); self.shared.fs.write(redir_dst, v)?; } + } else if let Some(html_redirect_filename) = item.html_redirect_filename() { + if let Some(ref redirections) = self.shared.redirections { + let to_path = fmt::from_fn(|f| { + for name in &self.current { + write!(f, "{name}/")?; + } + write!(f, "{}", item.html_filename()) + }); + let from_path = fmt::from_fn(|f| { + for name in &self.current { + write!(f, "{name}/")?; + } + write!(f, "{}", html_redirect_filename) + }); + redirections.borrow_mut().insert(from_path.to_string(), to_path.to_string()); + } else { + let v = layout::redirect(&item.html_filename()); + let redir_dst = self.dst.join(html_redirect_filename); + self.shared.fs.write(redir_dst, v)?; + } } } diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index f6d5ada07f364..26a13170dc16b 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -2326,6 +2326,8 @@ pub(super) fn print_item_path(item: &clean::Item) -> impl Display { pub(super) fn print_ty_path(ty: ItemType, name: &str) -> impl Display { fmt::from_fn(move |f| match ty { ItemType::Module => write!(f, "{}index.html", ensure_trailing_slash(name)), + // + ItemType::Struct | ItemType::Enum | ItemType::Union => write!(f, "type.{name}.html"), _ => write!(f, "{ty}.{name}.html"), }) } diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index e957a13a2b038..50d31cd078051 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -733,6 +733,8 @@ function preLoadCss(cssUrl) { let path; if (shortty === "mod") { path = `${modpath}${name}/index.html`; + } else if (shortty === "struct" || shortty === "enum" || shortty === "union") { + path = `${modpath}type.${name}.html`; } else if (!isMacro) { path = `${modpath}${shortty}.${name}.html`; } else { diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 8584e0aff0538..d865e5a0a3f18 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -2171,6 +2171,17 @@ class DocSearch { let path = item.modulePath; let exactPath = item.exactModulePath; + /** + * @param {string} type + * @returns {string} + */ + const normalizeType = type => { + if (type === "struct" || type === "enum" || type === "union") { + return "type"; + } + return type; + }; + if (type === "mod") { displayPath = path + "::"; href = this.rootPath + path.replace(/::/g, "/") + "/" + @@ -2220,13 +2231,13 @@ class DocSearch { anchor = item.entry.associatedItemDisambiguatorOrExternCrateUrl + "/" + anchor; } href = this.rootPath + path.replace(/::/g, "/") + - "/" + pageType + + "/" + normalizeType(pageType) + "." + pageName + ".html#" + anchor; } else { displayPath = item.modulePath + "::"; href = this.rootPath + item.modulePath.replace(/::/g, "/") + - "/" + type + "." + name + ".html"; + "/" + normalizeType(type) + "." + name + ".html"; } if (item.traitParent) { const tparent = item.traitParent; diff --git a/src/librustdoc/passes/lint/redundant_explicit_links.rs b/src/librustdoc/passes/lint/redundant_explicit_links.rs index e02fbae3e0568..05307837f02ef 100644 --- a/src/librustdoc/passes/lint/redundant_explicit_links.rs +++ b/src/librustdoc/passes/lint/redundant_explicit_links.rs @@ -480,6 +480,10 @@ fn local_href_for_res(cx: &DocContext<'_>, module_id: DefId, res: Res) - let mut url_parts = href_relative_parts(module_fqp, ¤t_fqp); match item_type { ItemType::Module => url_parts.push("index.html"), + // + ItemType::Enum | ItemType::Struct | ItemType::Union => { + url_parts.push_fmt(format_args!("type.{last}.html", last = fqp.last()?)) + } _ => url_parts.push_fmt(format_args!( "{}.{last}.html", item_type.as_str(), From f6cc338f6043ed24c2e2fb9b91dc5e7a5dd72202 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 3 Oct 2026 22:46:11 -0700 Subject: [PATCH 2/2] Update tests --- tests/rustdoc-gui/fields.goml | 4 +- tests/rustdoc-gui/go-to-collapsed-elem.goml | 4 +- .../item-decl-comment-highlighting.goml | 6 +- .../search-result-impl-disambiguation.goml | 12 +-- .../setting-go-to-only-result.goml | 4 +- .../rustdoc-gui/sidebar-modnav-position.goml | 6 +- tests/rustdoc-gui/tooltips.goml | 2 +- tests/rustdoc-html/all.rs | 8 +- .../anchor-id-duplicate-method-name-25001.rs | 2 +- .../anchors/anchor-id-trait-method-15169.rs | 2 +- .../anchors/anchor-id-trait-tymethod-28478.rs | 2 +- tests/rustdoc-html/anchors/anchors.rs | 2 +- .../anchors/disambiguate-anchors-32890.rs | 2 +- .../disambiguate-anchors-header-29449.rs | 2 +- .../method-anchor-in-blanket-impl-86620.rs | 4 +- .../trait-impl-items-links-and-anchors.rs | 20 ++--- .../array-links.link_box_generic.html | 2 +- .../array-links.link_box_u32.html | 2 +- .../asref-for-and-of-local-82465.rs | 2 +- .../cross-crate-hidden-assoc-trait-items.rs | 2 +- tests/rustdoc-html/assoc/doc-assoc-item.rs | 2 +- .../assoc/normalize-assoc-item.rs | 8 +- .../rustdoc-html/async/async-fn-delegation.rs | 4 +- tests/rustdoc-html/async/async-fn.rs | 4 +- tests/rustdoc-html/async/async-trait.rs | 2 +- tests/rustdoc-html/attributes.rs | 22 ++--- ...o-trait-bounds-by-associated-type-50159.rs | 2 +- ...-trait-bounds-inference-variables-54705.rs | 2 +- .../auto/auto-trait-bounds-where-51236.rs | 2 +- .../auto/auto-trait-negative-impl-55321.rs | 4 +- .../rustdoc-html/auto/auto-trait-not-send.rs | 2 +- .../rustdoc-html/auxiliary/enum-primitive.rs | 2 +- tests/rustdoc-html/bold-tag-101743.rs | 2 +- tests/rustdoc-html/cap-lints.rs | 2 +- tests/rustdoc-html/cfg-doctest.rs | 4 +- tests/rustdoc-html/check-styled-link.rs | 2 +- .../codeblock/custom_code_classes.rs | 2 +- .../codeblock/doctest-escape-boring-41783.rs | 2 +- .../slice-links.link_box_generic.html | 2 +- .../codeblock/slice-links.link_box_u32.html | 2 +- tests/rustdoc-html/codeblock/unindent.rs | 14 ++-- tests/rustdoc-html/const-fn-76501.rs | 4 +- tests/rustdoc-html/const-fn-effects.rs | 2 +- tests/rustdoc-html/const-fn.rs | 2 +- tests/rustdoc-html/const-generics/add-impl.rs | 4 +- .../const-generics/const-generic-defaults.rs | 2 +- .../const-generics/const-generics-docs.rs | 16 ++-- .../rustdoc-html/const-generics/const-impl.rs | 12 +-- .../const-param-type-references-generics.rs | 2 +- .../const-generics/generic_const_exprs.rs | 2 +- .../const-equate-pred.rs | 2 +- .../constant/assoc-const-has-projection-ty.rs | 2 +- .../constant/assoc-consts-underscore.rs | 2 +- .../constant/assoc-consts-version.rs | 2 +- tests/rustdoc-html/constant/assoc-consts.rs | 14 ++-- .../constant/associated-consts.rs | 8 +- tests/rustdoc-html/constant/const-display.rs | 8 +- tests/rustdoc-html/constant/const-doc.rs | 2 +- .../constant/const-trait-and-impl-methods.rs | 4 +- tests/rustdoc-html/constant/const.rs | 2 +- .../constant/generic-const-items.rs | 2 +- .../rustdoc-html/constant/link-assoc-const.rs | 2 +- .../constant/rfc-2632-const-trait-impl.rs | 2 +- .../cargo-transitive-no-index/s.rs | 8 +- .../cross-crate-info/cargo-transitive/s.rs | 8 +- .../cross-crate-info/cargo-two-no-index/e.rs | 6 +- .../cross-crate-info/cargo-two/e.rs | 6 +- .../cross-crate-info/index-on-last/e.rs | 6 +- .../cross-crate-info/kitchen-sink/i.rs | 8 +- .../single-crate-baseline/q.rs | 2 +- .../single-crate-no-index/q.rs | 2 +- .../write-docs-somewhere-else/e.rs | 6 +- tests/rustdoc-html/cross-crate-links.rs | 6 +- ...ecl-line-wrapping-empty-arg-list.decl.html | 2 +- .../decl-trailing-whitespace.declaration.html | 12 +-- tests/rustdoc-html/default-trait-method.rs | 2 +- .../deprecated-future-staged-api.rs | 4 +- tests/rustdoc-html/deprecated-future.rs | 2 +- tests/rustdoc-html/deprecated.rs | 14 ++-- .../deref-methods-19190-foreign-type.rs | 2 +- .../deref-methods-19190-inline.rs | 6 +- tests/rustdoc-html/deref-methods-19190.rs | 2 +- tests/rustdoc-html/deref/deref-const-fn.rs | 4 +- .../deref/deref-methods-24686-target.rs | 2 +- .../deref/deref-multiple-impl-blocks.rs | 2 +- tests/rustdoc-html/deref/deref-mut-35169-2.rs | 2 +- tests/rustdoc-html/deref/deref-mut-35169.rs | 2 +- tests/rustdoc-html/deref/deref-mut-methods.rs | 2 +- .../deref/deref-recursive-pathbuf.rs | 2 +- tests/rustdoc-html/deref/deref-recursive.rs | 2 +- tests/rustdoc-html/deref/deref-slice-core.rs | 2 +- .../rustdoc-html/deref/deref-to-primitive.rs | 2 +- tests/rustdoc-html/deref/deref-typedef.rs | 2 +- .../deref/escape-deref-methods.rs | 2 +- .../deref/negative-deref-impl-128801.rs | 2 +- .../deref/recursive-deref-sidebar.rs | 4 +- tests/rustdoc-html/deref/recursive-deref.rs | 18 ++-- .../deref/sidebar-links-deref-100679.rs | 6 +- .../deref/sidebar-links-deref-chain.rs | 8 +- .../sidebar-links-duplicate-impls-33054.rs | 2 +- .../doc-attr-comment-mix-42760.rs | 2 +- .../doc-cfg/cfg-attr-proc-macro.rs | 2 +- tests/rustdoc-html/doc-cfg/cfg-attr.rs | 2 +- tests/rustdoc-html/doc-cfg/doc-auto-cfg-2.rs | 18 ++-- .../doc-cfg/doc-auto-cfg-public-in-private.rs | 2 +- tests/rustdoc-html/doc-cfg/doc-cfg-hide.rs | 8 +- .../doc-cfg/doc-cfg-implicit-gate.rs | 2 +- .../rustdoc-html/doc-cfg/doc-cfg-implicit.rs | 8 +- .../doc-cfg/doc-cfg-simplification.rs | 6 +- tests/rustdoc-html/doc-cfg/doc-cfg-traits.rs | 4 +- tests/rustdoc-html/doc-cfg/doc-cfg.rs | 2 +- .../doc-cfg/doc_auto_cfg_reexports.rs | 4 +- tests/rustdoc-html/doc-cfg/duplicate-cfg.rs | 10 +-- .../doc-cfg/mutually-exclusive-cfg-item.rs | 2 +- tests/rustdoc-html/doc-cfg/reexports.rs | 6 +- .../doc-cfg/trait-impls-manual.rs | 8 +- tests/rustdoc-html/doc-cfg/trait-impls.rs | 8 +- tests/rustdoc-html/doc-hidden-method-13698.rs | 4 +- tests/rustdoc-html/double-hyphen-to-dash.rs | 2 +- tests/rustdoc-html/double-quote-escape.rs | 2 +- tests/rustdoc-html/duplicate-flags.rs | 2 +- tests/rustdoc-html/dyn-compatibility.rs | 2 +- tests/rustdoc-html/early-unindent.rs | 4 +- tests/rustdoc-html/empty-section.rs | 2 +- .../rustdoc-html/empty-tuple-struct-118180.rs | 4 +- tests/rustdoc-html/enum/enum-headings.rs | 2 +- .../enum/enum-non-exhaustive-108925.rs | 2 +- .../enum-variant-doc-hidden-field-88600.rs | 2 +- .../enum/enum-variant-fields-heading.rs | 2 +- .../enum/enum-variant-non_exhaustive.rs | 2 +- tests/rustdoc-html/enum/enum-variant-value.rs | 38 ++++----- .../render-enum-variant-structlike-32395.rs | 4 +- tests/rustdoc-html/enum/strip-enum-variant.rs | 2 +- .../extern/extern-default-method.rs | 6 +- tests/rustdoc-html/extern/extern-links.rs | 2 +- tests/rustdoc-html/extern/external-cross.rs | 2 +- tests/rustdoc-html/extern/external-doc.rs | 4 +- .../extern/link-extern-crate-item-30109.rs | 2 +- tests/rustdoc-html/extern/pub-extern-crate.rs | 2 +- ...long_typename.extremely_long_typename.html | 2 +- tests/rustdoc-html/file-creation-111249.rs | 5 +- tests/rustdoc-html/files-creation-hidden.rs | 6 +- tests/rustdoc-html/final-trait-method.rs | 2 +- tests/rustdoc-html/fn-bound.rs | 2 +- tests/rustdoc-html/fn-type.rs | 6 +- tests/rustdoc-html/footnote/footnote-ids.rs | 2 +- .../footnote/footnote-in-summary.rs | 2 +- ...nstable-if-unmarked-106421-not-internal.rs | 2 +- .../force-unstable-if-unmarked-106421.rs | 2 +- .../gat-linkification-109488.rs | 2 +- tests/rustdoc-html/heading-levels-89309.rs | 2 +- tests/rustdoc-html/hidden-methods.rs | 4 +- tests/rustdoc-html/hidden-trait-methods.rs | 2 +- .../hidden/display-hidden-items.rs | 12 +-- ...rait-methods-with-document-hidden-items.rs | 2 +- tests/rustdoc-html/hide-unstable-trait.rs | 4 +- .../higher-ranked-trait-bounds.rs | 4 +- tests/rustdoc-html/impl/blanket-impl-78673.rs | 4 +- .../blanket-impl-trumps-auto-trait-impl.rs | 2 +- .../impl/cross-crate-hidden-impl-parameter.rs | 8 +- .../deduplicate-glob-import-impl-21474.rs | 2 +- tests/rustdoc-html/impl/deprecated-impls.rs | 6 +- .../impl/doc_auto_cfg_nested_impl.rs | 2 +- tests/rustdoc-html/impl/duplicated_impl.rs | 2 +- tests/rustdoc-html/impl/empty-impl-block.rs | 4 +- tests/rustdoc-html/impl/empty-impls.rs | 2 +- tests/rustdoc-html/impl/extern-impl-trait.rs | 4 +- tests/rustdoc-html/impl/extern-impl.rs | 2 +- tests/rustdoc-html/impl/generic-impl.rs | 6 +- .../impl/hidden-implementors-90781.rs | 8 +- .../impl/hidden-trait-struct-impls.rs | 6 +- ...e-mut-methods-if-no-derefmut-impl-74083.rs | 2 +- .../impl/impl-alias-substituted.rs | 2 +- .../impl/impl-assoc-type-21092.rs | 2 +- .../impl/impl-associated-items-order.rs | 2 +- .../impl/impl-associated-items-sidebar.rs | 2 +- tests/rustdoc-html/impl/impl-box.rs | 2 +- .../impl/impl-fundamental-nesting.rs | 4 +- .../rustdoc-html/impl/impl-in-const-block.rs | 2 +- tests/rustdoc-html/impl/impl-parts.rs | 2 +- tests/rustdoc-html/impl/impl-ref-20175.rs | 2 +- .../inline-impl-through-glob-import-100204.rs | 4 +- tests/rustdoc-html/impl/manual_impl.rs | 6 +- .../method-link-foreign-trait-impl-17476.rs | 2 +- .../impl/negative-impl-no-items.rs | 4 +- .../impl/negative-impl-sidebar.rs | 2 +- tests/rustdoc-html/impl/negative-impl.rs | 8 +- .../impl/rustc-incoherent-impls.rs | 2 +- .../impl/same-crate-hidden-impl-parameter.rs | 8 +- .../sidebar-trait-impl-disambiguate-78701.rs | 2 +- .../impl/struct-implementations-title.rs | 2 +- tests/rustdoc-html/impl/trait-impl.rs | 2 +- ...it-implementations-duplicate-self-45584.rs | 4 +- .../rustdoc-html/impl/universal-impl-trait.rs | 4 +- .../unneeded-trait-implementations-title.rs | 2 +- tests/rustdoc-html/import-remapped-paths.rs | 2 +- tests/rustdoc-html/impossible-default.rs | 8 +- tests/rustdoc-html/inherent-projections.rs | 6 +- tests/rustdoc-html/inline_cross/add-docs.rs | 4 +- .../assoc-const-private-fields-99630.rs | 2 +- .../rustdoc-html/inline_cross/assoc-items.rs | 2 +- .../inline_cross/assoc_item_trait_bounds.rs | 2 +- tests/rustdoc-html/inline_cross/async-fn.rs | 2 +- tests/rustdoc-html/inline_cross/attributes.rs | 2 +- .../inline_cross/const-fn-27362.rs | 2 +- tests/rustdoc-html/inline_cross/cross-glob.rs | 3 + .../inline_cross/default-trait-method.rs | 2 +- .../rustdoc-html/inline_cross/doc-auto-cfg.rs | 6 +- .../doc-hidden-broken-link-28480.rs | 4 +- .../doc-hidden-extern-trait-impl-29584.rs | 2 +- .../doc-reachability-impl-31948-1.rs | 2 +- .../doc-reachability-impl-31948-2.rs | 2 +- .../doc-reachability-impl-31948.rs | 6 +- .../early-late-bound-lifetime-params.rs | 2 +- .../inline_cross/generic-const-items.rs | 2 +- tests/rustdoc-html/inline_cross/hidden-use.rs | 2 +- .../inline_cross/impl-inline-without-trait.rs | 2 +- tests/rustdoc-html/inline_cross/impl_trait.rs | 2 +- .../inline_cross/intra-doc-crate/self.rs | 6 +- .../reexport-with-anonymous-lifetime-98697.rs | 4 +- .../inline_cross/renamed-via-module.rs | 16 ++-- .../ret-pos-impl-trait-in-trait.rs | 6 +- .../inline_cross/rustc-private-76736-1.rs | 4 +- .../inline_cross/rustc-private-76736-2.rs | 4 +- .../inline_cross/rustc-private-76736-3.rs | 4 +- .../inline_cross/rustc-private-76736-4.rs | 4 +- .../inline_cross/sugar-closure-crate-21801.rs | 2 +- tests/rustdoc-html/inline_cross/trait-vis.rs | 2 +- .../blanket-impl-reexported-trait-94183.rs | 2 +- .../inline_local/doc-no-inline-32343.rs | 6 +- .../fully-stable-path-is-better.rs | 4 +- .../glob-private-document-private-items.rs | 24 +++--- .../rustdoc-html/inline_local/glob-private.rs | 24 +++--- tests/rustdoc-html/inline_local/hidden-use.rs | 2 +- .../inline_local/parent-path-is-better.rs | 8 +- .../inline_local/please_inline.rs | 4 +- .../inline_local/pub-re-export-28537.rs | 4 +- .../inline_local/staged-inline.rs | 4 +- tests/rustdoc-html/inline_local/trait-vis.rs | 2 +- tests/rustdoc-html/internal.rs | 4 +- .../intra-doc/adt-through-alias.rs | 16 ++-- tests/rustdoc-html/intra-doc/anchors.rs | 4 +- .../intra-doc/assoc-reexport-super.rs | 2 +- .../intra-doc/associated-defaults.rs | 8 +- .../intra-doc/associated-items.rs | 18 ++-- tests/rustdoc-html/intra-doc/basic.rs | 22 ++--- .../intra-doc/crate-relative-assoc.rs | 2 +- .../rustdoc-html/intra-doc/crate-relative.rs | 2 +- .../intra-doc/cross-crate/basic.rs | 2 +- .../intra-doc/cross-crate/hidden.rs | 2 +- .../intra-doc/cross-crate/macro.rs | 2 +- .../intra-doc/cross-crate/module.rs | 2 +- .../intra-doc/cross-crate/submodule-inner.rs | 2 +- .../intra-doc/cross-crate/traits.rs | 4 +- tests/rustdoc-html/intra-doc/deprecated.rs | 6 +- .../intra-doc/disambiguators-removed.rs | 4 +- .../rustdoc-html/intra-doc/enum-self-82209.rs | 2 +- .../intra-doc/enum-struct-field.rs | 2 +- .../intra-doc/enum-variant-field-title.rs | 2 +- .../extern-crate-only-used-in-link.rs | 2 +- tests/rustdoc-html/intra-doc/field.rs | 8 +- .../intra-doc/filter-out-private.rs | 4 +- .../rustdoc-html/intra-doc/generic-params.rs | 26 +++--- .../intra-doc/generic-trait-impl.rs | 2 +- .../intra-doc/ice-intra-doc-links-107995.rs | 6 +- .../intra-doc/inherent-associated-types.rs | 8 +- .../inline-same-item-with-different-names.rs | 12 +-- .../intra-doc-link-method-trait-impl-72340.rs | 2 +- .../intra-doc/link-in-footnotes-132208.rs | 4 +- ...ame-name-different-disambiguator-108459.rs | 8 +- .../intra-doc/mixed-inner-outer.rs | 4 +- tests/rustdoc-html/intra-doc/mod-ambiguity.rs | 4 +- tests/rustdoc-html/intra-doc/mod-relative.rs | 2 +- tests/rustdoc-html/intra-doc/nested-use.rs | 6 +- .../intra-doc/prim-associated-traits.rs | 36 ++++---- .../rustdoc-html/intra-doc/prim-precedence.rs | 6 +- tests/rustdoc-html/intra-doc/private.rs | 6 +- tests/rustdoc-html/intra-doc/proc-macro.rs | 4 +- .../rustdoc-html/intra-doc/raw-ident-self.rs | 4 +- .../intra-doc/reexport-additional-docs.rs | 2 +- tests/rustdoc-html/intra-doc/self-cache.rs | 4 +- .../intra-doc/self-impl-in-submodule-84827.rs | 4 +- tests/rustdoc-html/intra-doc/self.rs | 22 ++--- tests/rustdoc-html/intra-doc/trait-impl.rs | 6 +- tests/rustdoc-html/intra-doc/trait-item.rs | 2 +- tests/rustdoc-html/intra-doc/type-alias.rs | 2 +- .../rustdoc-html/jump-to-def/derive-macro.rs | 2 +- .../jump-to-def/doc-links-calls.rs | 2 +- tests/rustdoc-html/jump-to-def/doc-links.rs | 10 +-- .../rustdoc-html/jump-to-def/hidden-links.rs | 2 +- .../jump-to-def/incoherent_impl.rs | 8 +- .../jump-to-def/item-with-derive.rs | 4 +- .../jump-to-def/non-local-method.rs | 10 +-- tests/rustdoc-html/jump-to-def/patterns.rs | 4 +- .../rustdoc-html/jump-to-def/prelude-types.rs | 4 +- tests/rustdoc-html/jump-to-def/turbofish.rs | 2 +- .../macro/const-rendering-macros-33302.rs | 6 +- .../rustdoc-html/macro/external-macro-src.rs | 2 +- .../macro/macro-const-display-115295.rs | 4 +- .../macro/macro-higher-kinded-function.rs | 2 +- .../markdown-table-escape-pipe-27862.rs | 2 +- tests/rustdoc-html/masked.rs | 10 +-- tests/rustdoc-html/method-list.rs | 2 +- .../mixing-doc-comments-and-attrs.rs | 6 +- tests/rustdoc-html/multiple-import-levels.rs | 6 +- tests/rustdoc-html/mut-params.rs | 2 +- .../rustdoc-html/nested-items-issue-111415.rs | 4 +- .../doc-notable_trait-negative.positive.html | 2 +- ...c-notable_trait-slice.bare_fn_matches.html | 2 +- .../doc-notable_trait.bare-fn.html | 2 +- .../notable-trait/doc-notable_trait.rs | 2 +- .../doc-notable_trait.some-struct-new.html | 2 +- .../doc-notable_trait.wrap-me.html | 2 +- .../notable-trait-badge-generic.rs | 2 +- .../notable-trait-badge-negative.rs | 2 +- .../notable-trait-badge-supertrait.rs | 2 +- ...able-trait-badge-unlinkable-cross-crate.rs | 2 +- .../notable-trait-badge-unlinkable.rs | 2 +- .../notable-trait/notable-trait-badge.rs | 4 +- .../spotlight-from-dependency.odd.html | 2 +- .../spotlight-from-dependency.rs | 2 +- .../rustdoc-html/primitive/primitive-link.rs | 10 +-- .../private/doc-hidden-private-67851-both.rs | 4 +- .../doc-hidden-private-67851-hidden.rs | 4 +- .../doc-hidden-private-67851-neither.rs | 4 +- .../doc-hidden-private-67851-private.rs | 4 +- .../empty-impl-block-private-with-doc.rs | 2 +- .../private/empty-impl-block-private.rs | 2 +- .../private/files-creation-private.rs | 9 +- tests/rustdoc-html/private/hidden-private.rs | 4 +- ...ne-private-with-intermediate-doc-hidden.rs | 2 +- .../private/inner-private-110422.rs | 4 +- .../missing-private-inlining-109258.rs | 8 +- .../private/private-fields-tuple-struct.rs | 12 +-- ...ic-impl-mention-private-generic-46380-2.rs | 2 +- .../private/traits-in-bodies-private.rs | 2 +- tests/rustdoc-html/pub-method.rs | 2 +- .../raw-ident-eliminate-r-hashtag.rs | 8 +- tests/rustdoc-html/read-more-unneeded.rs | 2 +- tests/rustdoc-html/redirect-map-empty.rs | 2 +- tests/rustdoc-html/redirect-map.rs | 4 +- tests/rustdoc-html/redirect-rename.rs | 16 ++-- tests/rustdoc-html/redirect.rs | 18 ++-- .../reexport/anonymous-reexport.rs | 2 +- .../reexport/blanket-reexport-item.rs | 2 +- .../rustdoc-html/reexport/cfg_doc_reexport.rs | 4 +- .../reexport/doc-hidden-reexports-109449.rs | 18 ++-- .../reexport/enum-variant-reexport-35488.rs | 2 +- tests/rustdoc-html/reexport/enum-variant.rs | 2 +- .../glob-reexport-attribute-merge-120487.rs | 4 +- ...b-reexport-attribute-merge-doc-auto-cfg.rs | 4 +- .../glob-reexport-feature-combination.rs | 6 +- .../reexport/infinite-redirection.rs | 4 +- .../reexport/inline-rename-34473.rs | 4 +- .../reexport/macro-reexport-inline.rs | 4 +- .../reexport/merge-glob-and-non-glob.rs | 4 +- .../reexport/pub-use-loop-107350.rs | 2 +- tests/rustdoc-html/reexport/reexport-doc.rs | 2 +- .../reexport/reexport-of-reexport-108679.rs | 6 +- .../reexport-trait-from-hidden-111064-2.rs | 5 +- .../reexport/reexports-of-same-name.rs | 4 +- tests/rustdoc-html/reexport/reexports-priv.rs | 56 ++++++------- tests/rustdoc-html/reexport/reexports.rs | 54 ++++++------ .../reexport/transient-reexports.rs | 2 +- .../reexport/underscore-import-61592.rs | 2 +- .../reexport/wrapped-unnamble-type-143222.rs | 4 +- tests/rustdoc-html/repr.rs | 42 +++++----- .../sidebar/logo-class-default.rs | 2 +- tests/rustdoc-html/sidebar/logo-class-rust.rs | 2 +- tests/rustdoc-html/sidebar/logo-class.rs | 4 +- tests/rustdoc-html/sidebar/module.rs | 2 +- tests/rustdoc-html/sidebar/sidebar-items.rs | 8 +- .../sidebar/sidebar-link-generation.rs | 2 +- tests/rustdoc-html/sidebar/top-toc-idmap.rs | 2 +- tests/rustdoc-html/sized_trait.rs | 6 +- tests/rustdoc-html/smoke.rs | 2 +- .../assoc-type-source-link.rs | 2 +- .../check-source-code-urls-to-def.rs | 4 +- .../source-code-pages/html-no-source.rs | 2 +- .../source-code-highlight.rs | 6 +- .../source-version-separator.rs | 2 +- .../source-code-pages/src-links-auto-impls.rs | 2 +- .../source-code-pages/src-links-external.rs | 2 +- .../source-code-pages/src-links.rs | 4 +- .../version-separator-without-source.rs | 2 +- tests/rustdoc-html/stability.rs | 34 ++++---- .../staged-api-deprecated-unstable-32374.rs | 16 ++-- tests/rustdoc-html/static-root-path.rs | 2 +- tests/rustdoc-html/struct-field.rs | 6 +- tests/rustdoc-html/structfields.rs | 10 +-- .../auto-trait-lifetimes-56822.rs | 2 +- tests/rustdoc-html/synthetic_auto/basic.rs | 2 +- tests/rustdoc-html/synthetic_auto/bounds.rs | 2 +- tests/rustdoc-html/synthetic_auto/complex.rs | 2 +- .../synthetic_auto/crate-local.rs | 2 +- .../rustdoc-html/synthetic_auto/lifetimes.rs | 2 +- tests/rustdoc-html/synthetic_auto/manual.rs | 2 +- tests/rustdoc-html/synthetic_auto/negative.rs | 2 +- tests/rustdoc-html/synthetic_auto/nested.rs | 2 +- .../synthetic_auto/next-solver-ambiguity.rs | 2 +- .../next-solver-possible-impl.rs | 2 +- .../synthetic_auto/no-redundancy.rs | 2 +- .../normalize-auto-trait-80233.rs | 2 +- tests/rustdoc-html/synthetic_auto/overflow.rs | 2 +- tests/rustdoc-html/synthetic_auto/project.rs | 2 +- .../synthetic_auto/self-referential.rs | 2 +- .../send-impl-conditional-60726.rs | 2 +- .../synthetic_auto/static-region.rs | 2 +- .../synthetic_auto/supertrait-bounds.rs | 2 +- tests/rustdoc-html/tab_title.rs | 4 +- tests/rustdoc-html/table-in-docblock.rs | 2 +- tests/rustdoc-html/titles.rs | 4 +- tests/rustdoc-html/toggle-item-contents.rs | 16 ++-- tests/rustdoc-html/toggle-method.rs | 2 +- tests/rustdoc-html/trait-read-more-161300.rs | 2 +- tests/rustdoc-html/trait-src-link.rs | 8 +- tests/rustdoc-html/traits-in-bodies.rs | 6 +- tests/rustdoc-html/tuple-struct-fields-doc.rs | 4 +- .../tuple-struct-where-clause-34928.rs | 2 +- .../rustdoc-html/type-layout-flag-required.rs | 2 +- tests/rustdoc-html/type-layout.rs | 32 ++++---- .../typedef/impl_trait_in_assoc_type.rs | 2 +- .../typedef/primitive-local-link-121106.rs | 2 +- .../typedef-inner-variants-lazy_type_alias.rs | 2 +- .../typedef/typedef-inner-variants.rs | 10 +-- tests/rustdoc-html/unicode.rs | 4 +- tests/rustdoc-html/union/union-fields-html.rs | 2 +- tests/rustdoc-html/union/union.rs | 2 +- tests/rustdoc-html/useless_lifetime_bound.rs | 4 +- tests/rustdoc-html/visibility.rs | 82 +++++++++---------- .../rustdoc-html/where.SWhere_Echo_impl.html | 2 +- .../where.SWhere_TraitWhere_item-decl.html | 2 +- tests/rustdoc-html/where.rs | 10 +-- .../whitespace-after-where-clause.rs | 12 +-- tests/rustdoc-html/without-redirect.rs | 2 +- 435 files changed, 1111 insertions(+), 1099 deletions(-) diff --git a/tests/rustdoc-gui/fields.goml b/tests/rustdoc-gui/fields.goml index dce9918c33242..a799f98ae2c4d 100644 --- a/tests/rustdoc-gui/fields.goml +++ b/tests/rustdoc-gui/fields.goml @@ -22,13 +22,13 @@ define-function: ( ) call-function: ("check-fields", { - "path": "struct.Struct.html", + "path": "type.Struct.html", "selector_1": "#structfield\.a", "selector_2": "#structfield\.b", }) call-function: ("check-fields", { - "path": "union.Union.html", + "path": "type.Union.html", "selector_1": "#structfield\.a", "selector_2": "#structfield\.b", }) diff --git a/tests/rustdoc-gui/go-to-collapsed-elem.goml b/tests/rustdoc-gui/go-to-collapsed-elem.goml index ff85f37047e92..bcf99ca642f20 100644 --- a/tests/rustdoc-gui/go-to-collapsed-elem.goml +++ b/tests/rustdoc-gui/go-to-collapsed-elem.goml @@ -19,8 +19,8 @@ define-function: ("collapsed-from-search", [], block { // Then we run the search. call-function: ("open-search", {}) write-into: (".search-input", "foo::must_use") - wait-for: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']" - click: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']" + wait-for: "//*[@id='search']//a[@href='../test_docs/type.Foo.html#method.must_use']" + click: "//*[@id='search']//a[@href='../test_docs/type.Foo.html#method.must_use']" assert-property: ("#implementations-list .implementors-toggle", {"open": "true"}) }) diff --git a/tests/rustdoc-gui/item-decl-comment-highlighting.goml b/tests/rustdoc-gui/item-decl-comment-highlighting.goml index 3ffbbe1c40f0b..903e72587ff63 100644 --- a/tests/rustdoc-gui/item-decl-comment-highlighting.goml +++ b/tests/rustdoc-gui/item-decl-comment-highlighting.goml @@ -24,17 +24,17 @@ define-function: ( }) call-function: ("check-item-decl-comment", { "theme": |theme|, - "url": "file://" + |DOC_PATH| + "/test_docs/private/struct.Struct.html", + "url": "file://" + |DOC_PATH| + "/test_docs/private/type.Struct.html", "comment_color": |comment_color|, }) call-function: ("check-item-decl-comment", { "theme": |theme|, - "url": "file://" + |DOC_PATH| + "/test_docs/private/struct.Tuple.html", + "url": "file://" + |DOC_PATH| + "/test_docs/private/type.Tuple.html", "comment_color": |comment_color|, }) call-function: ("check-item-decl-comment", { "theme": |theme|, - "url": "file://" + |DOC_PATH| + "/test_docs/private/union.Union.html", + "url": "file://" + |DOC_PATH| + "/test_docs/private/type.Union.html", "comment_color": |comment_color|, }) call-function: ("check-item-decl-comment", { diff --git a/tests/rustdoc-gui/search-result-impl-disambiguation.goml b/tests/rustdoc-gui/search-result-impl-disambiguation.goml index 2cdbfd574868f..7fee50d0af810 100644 --- a/tests/rustdoc-gui/search-result-impl-disambiguation.goml +++ b/tests/rustdoc-gui/search-result-impl-disambiguation.goml @@ -10,12 +10,12 @@ call-function: ("perform-search", {"query": "ZyxwvutMethodDisambiguation -> bool // Check the disambiguated link. assert-count: ("a.result-method", 1) assert-attribute: ("a.result-method", { - "href": "../test_docs/struct.ZyxwvutMethodDisambiguation.html#impl-ZyxwvutMethodDisambiguation/method.method_impl_disambiguation" + "href": "../test_docs/type.ZyxwvutMethodDisambiguation.html#impl-ZyxwvutMethodDisambiguation/method.method_impl_disambiguation" }) click: "a.result-method" wait-for: "#impl-ZyxwvutMethodDisambiguation" assert-document-property: ({ - "URL": "struct.ZyxwvutMethodDisambiguation.html#method.method_impl_disambiguation" + "URL": "type.ZyxwvutMethodDisambiguation.html#method.method_impl_disambiguation" }, ENDS_WITH) assert: "section:target" @@ -26,12 +26,12 @@ call-function: ("perform-search", {"query": "ZyxwvutMethodDisambiguation, usize // Check the disambiguated link. assert-count: ("a.result-method", 1) assert-attribute: ("a.result-method", { - "href": "../test_docs/struct.ZyxwvutMethodDisambiguation.html#impl-ZyxwvutTrait-for-ZyxwvutMethodDisambiguation/method.method_impl_disambiguation" + "href": "../test_docs/type.ZyxwvutMethodDisambiguation.html#impl-ZyxwvutTrait-for-ZyxwvutMethodDisambiguation/method.method_impl_disambiguation" }) click: "a.result-method" wait-for: "#impl-ZyxwvutMethodDisambiguation" assert-document-property: ({ - "URL": "struct.ZyxwvutMethodDisambiguation.html#method.method_impl_disambiguation-1" + "URL": "type.ZyxwvutMethodDisambiguation.html#method.method_impl_disambiguation-1" }, ENDS_WITH) assert: "section:target" @@ -42,7 +42,7 @@ go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=MultiImplBlockStruct->b call-function: ("wait-for-search-results", {}) assert-count: ("a.result-method", 1) assert-attribute: ("a.result-method", { - "href": "../lib2/another_mod/struct.MultiImplBlockStruct.html#impl-MultiImplBlockStruct/method.second_fn" + "href": "../lib2/another_mod/type.MultiImplBlockStruct.html#impl-MultiImplBlockStruct/method.second_fn" }) click: "a.result-method" wait-for: "details:has(summary > #impl-MultiImplBlockStruct-1) > div section[id='method.second_fn']:target" @@ -51,7 +51,7 @@ go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=MultiImplBlockStruct->u call-function: ("wait-for-search-results", {}) assert-count: ("a.result-method", 1) assert-attribute: ("a.result-method", { - "href": "../lib2/another_mod/struct.MultiImplBlockStruct.html#impl-MultiImplBlockTrait-for-MultiImplBlockStruct/method.second_fn" + "href": "../lib2/another_mod/type.MultiImplBlockStruct.html#impl-MultiImplBlockTrait-for-MultiImplBlockStruct/method.second_fn" }) click: "a.result-method" wait-for: "details:has(summary > #impl-MultiImplBlockTrait-for-MultiImplBlockStruct) > div section[id='method.second_fn-1']:target" diff --git a/tests/rustdoc-gui/setting-go-to-only-result.goml b/tests/rustdoc-gui/setting-go-to-only-result.goml index f94f45fe102ef..edf724d23f5c6 100644 --- a/tests/rustdoc-gui/setting-go-to-only-result.goml +++ b/tests/rustdoc-gui/setting-go-to-only-result.goml @@ -37,7 +37,7 @@ click: "#search-button" wait-for: "#alternative-display .search-input" write-into: (".search-input", "HasALongTraitWithParams") wait-for-document-property: {"title": "HasALongTraitWithParams in lib2 - Rust"} -assert-window-property: ({"location"."pathname": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH) +assert-window-property: ({"location"."pathname": "/lib2/type.HasALongTraitWithParams.html"}, ENDS_WITH) // Regression test for . // If "go-to-only-result" is enabled and you go back to history, it should not lead you back to the @@ -49,7 +49,7 @@ assert-window-property: ({"location"."pathname": "/lib2/index.html"}, ENDS_WITH) // We try again to see if it goes to the only result go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=HasALongTraitWithParams" wait-for-document-property: {"title": "HasALongTraitWithParams in lib2 - Rust"} -assert-document-property: ({"URL": "/lib2/struct.HasALongTraitWithParams.html"}, ENDS_WITH) +assert-document-property: ({"URL": "/lib2/type.HasALongTraitWithParams.html"}, ENDS_WITH) // We check the settings call-function: ("check-setting", { diff --git a/tests/rustdoc-gui/sidebar-modnav-position.goml b/tests/rustdoc-gui/sidebar-modnav-position.goml index eb86d118ab22d..a67078e731969 100644 --- a/tests/rustdoc-gui/sidebar-modnav-position.goml +++ b/tests/rustdoc-gui/sidebar-modnav-position.goml @@ -39,6 +39,6 @@ call-function: ("check-positions", {"url": "/test_docs/codeblock_sub/index.html" go-to: "file://" + |DOC_PATH| + "/test_docs/fields/struct.Struct.html" store-position: ("#rustdoc-modnav > h2", {"x": h2_x, "y": h2_y}) store-position: ("#rustdoc-modnav > ul:first-of-type > li:first-of-type", {"x": x, "y": y}) -call-function: ("check-positions", {"url": "/test_docs/fields/struct.Struct.html"}) -call-function: ("check-positions", {"url": "/test_docs/fields/union.Union.html"}) -call-function: ("check-positions", {"url": "/test_docs/fields/enum.Enum.html"}) +call-function: ("check-positions", {"url": "/test_docs/fields/type.Struct.html"}) +call-function: ("check-positions", {"url": "/test_docs/fields/type.Union.html"}) +call-function: ("check-positions", {"url": "/test_docs/fields/type.Enum.html"}) diff --git a/tests/rustdoc-gui/tooltips.goml b/tests/rustdoc-gui/tooltips.goml index 6e79196be2731..1317f0e4d47a9 100644 --- a/tests/rustdoc-gui/tooltips.goml +++ b/tests/rustdoc-gui/tooltips.goml @@ -12,4 +12,4 @@ define-function: ( ) call-function: ("check-font", {"path": "tooltips/fn.bar.html"}) -call-function: ("check-font", {"path": "tooltips/struct.X.html"}) +call-function: ("check-font", {"path": "tooltips/type.X.html"}) diff --git a/tests/rustdoc-html/all.rs b/tests/rustdoc-html/all.rs index 7056af8e3438d..6ee59a5b09d60 100644 --- a/tests/rustdoc-html/all.rs +++ b/tests/rustdoc-html/all.rs @@ -1,8 +1,8 @@ #![crate_name = "foo"] -//@ has foo/all.html '//a[@href="struct.Struct.html"]' 'Struct' -//@ has foo/all.html '//a[@href="enum.Enum.html"]' 'Enum' -//@ has foo/all.html '//a[@href="union.Union.html"]' 'Union' +//@ has foo/all.html '//a[@href="type.Struct.html"]' 'Struct' +//@ has foo/all.html '//a[@href="type.Enum.html"]' 'Enum' +//@ has foo/all.html '//a[@href="type.Union.html"]' 'Union' //@ has foo/all.html '//a[@href="constant.CONST.html"]' 'CONST' //@ has foo/all.html '//a[@href="static.STATIC.html"]' 'STATIC' //@ has foo/all.html '//a[@href="fn.function.html"]' 'function' @@ -23,6 +23,6 @@ mod private_module { pub struct ReexportedStruct; } -//@ has foo/all.html '//a[@href="struct.ReexportedStruct.html"]' 'ReexportedStruct' +//@ has foo/all.html '//a[@href="type.ReexportedStruct.html"]' 'ReexportedStruct' //@ !hasraw foo/all.html 'private_module' pub use private_module::ReexportedStruct; diff --git a/tests/rustdoc-html/anchors/anchor-id-duplicate-method-name-25001.rs b/tests/rustdoc-html/anchors/anchor-id-duplicate-method-name-25001.rs index d7f4e587d5efd..133988ba1602d 100644 --- a/tests/rustdoc-html/anchors/anchor-id-duplicate-method-name-25001.rs +++ b/tests/rustdoc-html/anchors/anchor-id-duplicate-method-name-25001.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/25001 #![crate_name="issue_25001"] -//@ has issue_25001/struct.Foo.html +//@ has issue_25001/type.Foo.html pub struct Foo(T); pub trait Bar { diff --git a/tests/rustdoc-html/anchors/anchor-id-trait-method-15169.rs b/tests/rustdoc-html/anchors/anchor-id-trait-method-15169.rs index 19eeeaee9d1b6..8812c98b3f85d 100644 --- a/tests/rustdoc-html/anchors/anchor-id-trait-method-15169.rs +++ b/tests/rustdoc-html/anchors/anchor-id-trait-method-15169.rs @@ -1,4 +1,4 @@ -//@ has issue_15169/struct.Foo.html '//*[@id="method.eq"]' 'fn eq' +//@ has issue_15169/type.Foo.html '//*[@id="method.eq"]' 'fn eq' // https://github.com/rust-lang/rust/issues/15169 #![crate_name="issue_15169"] diff --git a/tests/rustdoc-html/anchors/anchor-id-trait-tymethod-28478.rs b/tests/rustdoc-html/anchors/anchor-id-trait-tymethod-28478.rs index e7adba7d06ec2..197b7b2b579df 100644 --- a/tests/rustdoc-html/anchors/anchor-id-trait-tymethod-28478.rs +++ b/tests/rustdoc-html/anchors/anchor-id-trait-tymethod-28478.rs @@ -17,7 +17,7 @@ pub trait Bar { fn baz() { } } -//@ has issue_28478/struct.Foo.html +//@ has issue_28478/type.Foo.html pub struct Foo; impl Foo { diff --git a/tests/rustdoc-html/anchors/anchors.rs b/tests/rustdoc-html/anchors/anchors.rs index 255ef87351cb6..2a6b01b862746 100644 --- a/tests/rustdoc-html/anchors/anchors.rs +++ b/tests/rustdoc-html/anchors/anchors.rs @@ -23,7 +23,7 @@ pub trait Bar { fn bar() {} } -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' impl Bar for Foo { //@ has - '//*[@id="associatedtype.T"]/a[@class="anchor"]' '' type T = u32; diff --git a/tests/rustdoc-html/anchors/disambiguate-anchors-32890.rs b/tests/rustdoc-html/anchors/disambiguate-anchors-32890.rs index 0b726d5fba465..c67377f0cc840 100644 --- a/tests/rustdoc-html/anchors/disambiguate-anchors-32890.rs +++ b/tests/rustdoc-html/anchors/disambiguate-anchors-32890.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/32890 #![crate_name="issue_32890"] -//@ has issue_32890/struct.Foo.html +//@ has issue_32890/type.Foo.html pub struct Foo(T); impl Foo { diff --git a/tests/rustdoc-html/anchors/disambiguate-anchors-header-29449.rs b/tests/rustdoc-html/anchors/disambiguate-anchors-header-29449.rs index feb0632775e0e..ba5aaf5eff132 100644 --- a/tests/rustdoc-html/anchors/disambiguate-anchors-header-29449.rs +++ b/tests/rustdoc-html/anchors/disambiguate-anchors-header-29449.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/29449 #![crate_name="issue_29449"] -//@ has issue_29449/struct.Foo.html +//@ has issue_29449/type.Foo.html pub struct Foo; impl Foo { diff --git a/tests/rustdoc-html/anchors/method-anchor-in-blanket-impl-86620.rs b/tests/rustdoc-html/anchors/method-anchor-in-blanket-impl-86620.rs index 89e8712169a98..7c2ef0a37c2c8 100644 --- a/tests/rustdoc-html/anchors/method-anchor-in-blanket-impl-86620.rs +++ b/tests/rustdoc-html/anchors/method-anchor-in-blanket-impl-86620.rs @@ -6,6 +6,6 @@ extern crate issue_86620_1; use issue_86620_1::*; -//@ !has foo/struct.S.html '//*[@id="method.vzip"]//a[@class="fnname"]/@href' #tymethod.vzip -//@ has foo/struct.S.html '//*[@id="method.vzip"]//a[@class="anchor"]/@href' #method.vzip +//@ !has foo/type.S.html '//*[@id="method.vzip"]//a[@class="fnname"]/@href' #tymethod.vzip +//@ has foo/type.S.html '//*[@id="method.vzip"]//a[@class="anchor"]/@href' #method.vzip pub struct S; diff --git a/tests/rustdoc-html/anchors/trait-impl-items-links-and-anchors.rs b/tests/rustdoc-html/anchors/trait-impl-items-links-and-anchors.rs index c1845a33b9df0..d833f4f7bd00c 100644 --- a/tests/rustdoc-html/anchors/trait-impl-items-links-and-anchors.rs +++ b/tests/rustdoc-html/anchors/trait-impl-items-links-and-anchors.rs @@ -38,21 +38,21 @@ impl MyTrait for Vec { impl MyTrait for MyStruct { //@ has trait_impl_items_links_and_anchors/trait.MyTrait.html '//*[@id="associatedtype.Assoc-3"]//a[@class="anchor"]/@href' #associatedtype.Assoc-3 - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="associatedtype.Assoc"]//a[@class="associatedtype"]/@href' trait.MyTrait.html#associatedtype.Assoc - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="associatedtype.Assoc"]//a[@class="anchor"]/@href' #associatedtype.Assoc + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="associatedtype.Assoc"]//a[@class="associatedtype"]/@href' trait.MyTrait.html#associatedtype.Assoc + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="associatedtype.Assoc"]//a[@class="anchor"]/@href' #associatedtype.Assoc type Assoc = bool; //@ has trait_impl_items_links_and_anchors/trait.MyTrait.html '//*[@id="associatedconstant.VALUE-3"]//a[@class="anchor"]/@href' #associatedconstant.VALUE-3 - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="associatedconstant.VALUE"]//a[@class="constant"]/@href' trait.MyTrait.html#associatedconstant.VALUE - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="associatedconstant.VALUE"]//a[@class="anchor"]/@href' #associatedconstant.VALUE + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="associatedconstant.VALUE"]//a[@class="constant"]/@href' trait.MyTrait.html#associatedconstant.VALUE + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="associatedconstant.VALUE"]//a[@class="anchor"]/@href' #associatedconstant.VALUE const VALUE: u32 = 20; - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="method.trait_function"]//a[@class="fn"]/@href' trait.MyTrait.html#tymethod.trait_function - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="method.trait_function"]//a[@class="anchor"]/@href' #method.trait_function + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="method.trait_function"]//a[@class="fn"]/@href' trait.MyTrait.html#tymethod.trait_function + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="method.trait_function"]//a[@class="anchor"]/@href' #method.trait_function fn trait_function(&self) {} - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="method.defaulted_override"]//a[@class="fn"]/@href' trait.MyTrait.html#method.defaulted_override - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="method.defaulted_override"]//a[@class="anchor"]/@href' #method.defaulted_override + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="method.defaulted_override"]//a[@class="fn"]/@href' trait.MyTrait.html#method.defaulted_override + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="method.defaulted_override"]//a[@class="anchor"]/@href' #method.defaulted_override fn defaulted_override(&self) {} - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="method.defaulted"]//a[@class="fn"]/@href' trait.MyTrait.html#method.defaulted - //@ has trait_impl_items_links_and_anchors/struct.MyStruct.html '//*[@id="method.defaulted"]//a[@class="anchor"]/@href' #method.defaulted + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="method.defaulted"]//a[@class="fn"]/@href' trait.MyTrait.html#method.defaulted + //@ has trait_impl_items_links_and_anchors/type.MyStruct.html '//*[@id="method.defaulted"]//a[@class="anchor"]/@href' #method.defaulted } pub struct MyStruct; diff --git a/tests/rustdoc-html/array-links.link_box_generic.html b/tests/rustdoc-html/array-links.link_box_generic.html index 3481bb6a02547..88ed4ce691692 100644 --- a/tests/rustdoc-html/array-links.link_box_generic.html +++ b/tests/rustdoc-html/array-links.link_box_generic.html @@ -1 +1 @@ -pub fn delta<T>() -> MyBox<[T; 1]> \ No newline at end of file +pub fn delta<T>() -> MyBox<[T; 1]> \ No newline at end of file diff --git a/tests/rustdoc-html/array-links.link_box_u32.html b/tests/rustdoc-html/array-links.link_box_u32.html index e864ae55c9f4b..79a81751adef9 100644 --- a/tests/rustdoc-html/array-links.link_box_u32.html +++ b/tests/rustdoc-html/array-links.link_box_u32.html @@ -1 +1 @@ -pub fn gamma() -> MyBox<[u32; 1]> \ No newline at end of file +pub fn gamma() -> MyBox<[u32; 1]> \ No newline at end of file diff --git a/tests/rustdoc-html/asref-for-and-of-local-82465.rs b/tests/rustdoc-html/asref-for-and-of-local-82465.rs index 9c96b72ee2714..2e26af37febed 100644 --- a/tests/rustdoc-html/asref-for-and-of-local-82465.rs +++ b/tests/rustdoc-html/asref-for-and-of-local-82465.rs @@ -4,7 +4,7 @@ use std::convert::AsRef; pub struct Local; -//@ has foo/struct.Local.html '//h3[@class="code-header"]' 'impl AsRef for Local' +//@ has foo/type.Local.html '//h3[@class="code-header"]' 'impl AsRef for Local' impl AsRef for Local { fn as_ref(&self) -> &str { todo!() diff --git a/tests/rustdoc-html/assoc/cross-crate-hidden-assoc-trait-items.rs b/tests/rustdoc-html/assoc/cross-crate-hidden-assoc-trait-items.rs index d3771c2e7a276..f18cc6c23fbdb 100644 --- a/tests/rustdoc-html/assoc/cross-crate-hidden-assoc-trait-items.rs +++ b/tests/rustdoc-html/assoc/cross-crate-hidden-assoc-trait-items.rs @@ -10,7 +10,7 @@ // visible items instead and assert that there are *exactly two* associated items // (by counting the number of `section`s). This is more robust and future-proof. -//@ has dependent/struct.Ty.html +//@ has dependent/type.Ty.html //@ has - '//*[@id="associatedtype.VisibleAssoc"]' 'type VisibleAssoc = ()' //@ has - '//*[@id="associatedconstant.VISIBLE_ASSOC"]' 'const VISIBLE_ASSOC: ()' //@ count - '//*[@class="impl-items"]/section' 2 diff --git a/tests/rustdoc-html/assoc/doc-assoc-item.rs b/tests/rustdoc-html/assoc/doc-assoc-item.rs index 2eb82abfc0ba2..000785f55e928 100644 --- a/tests/rustdoc-html/assoc/doc-assoc-item.rs +++ b/tests/rustdoc-html/assoc/doc-assoc-item.rs @@ -8,7 +8,7 @@ pub trait Bar { fn foo(foo: Self::Fuu); } -//@ has doc_assoc_item/struct.Foo.html '//*[@class="impl"]' 'impl> Foo' +//@ has doc_assoc_item/type.Foo.html '//*[@class="impl"]' 'impl> Foo' impl> Foo { pub fn new(t: T) -> Foo { Foo { diff --git a/tests/rustdoc-html/assoc/normalize-assoc-item.rs b/tests/rustdoc-html/assoc/normalize-assoc-item.rs index ddb1cc1a6e1d6..195856d3af086 100644 --- a/tests/rustdoc-html/assoc/normalize-assoc-item.rs +++ b/tests/rustdoc-html/assoc/normalize-assoc-item.rs @@ -30,9 +30,9 @@ pub fn f2() -> ::X { } pub struct S { - //@ has 'normalize_assoc_item/struct.S.html' '//span[@id="structfield.box_me_up"]' 'box_me_up: Box' + //@ has 'normalize_assoc_item/type.S.html' '//span[@id="structfield.box_me_up"]' 'box_me_up: Box' pub box_me_up: ::X, - //@ has 'normalize_assoc_item/struct.S.html' '//span[@id="structfield.generic"]' 'generic: (usize, isize)' + //@ has 'normalize_assoc_item/type.S.html' '//span[@id="structfield.generic"]' 'generic: (usize, isize)' pub generic: as Trait>::X, } @@ -49,10 +49,10 @@ impl Trait for Generic { // These can't be normalized because they depend on a generic parameter. // However the user can choose whether the text should be displayed as `Inner::X` or `::X`. -//@ has 'normalize_assoc_item/struct.Unknown.html' '//pre[@class="rust item-decl"]' 'pub struct Unknown(pub ::X);' +//@ has 'normalize_assoc_item/type.Unknown.html' '//pre[@class="rust item-decl"]' 'pub struct Unknown(pub ::X);' pub struct Unknown(pub ::X); -//@ has 'normalize_assoc_item/struct.Unknown2.html' '//pre[@class="rust item-decl"]' 'pub struct Unknown2(pub Inner::X);' +//@ has 'normalize_assoc_item/type.Unknown2.html' '//pre[@class="rust item-decl"]' 'pub struct Unknown2(pub Inner::X);' pub struct Unknown2(pub Inner::X); trait Lifetimes<'a> { diff --git a/tests/rustdoc-html/async/async-fn-delegation.rs b/tests/rustdoc-html/async/async-fn-delegation.rs index 7d891ac8be637..1602eaea8c13e 100644 --- a/tests/rustdoc-html/async/async-fn-delegation.rs +++ b/tests/rustdoc-html/async/async-fn-delegation.rs @@ -34,8 +34,8 @@ pub reuse Trait::nonunit; pub struct S; impl Trait for S {} -//@ has async_delegation/struct.S.html '//*[@class="code-header"]' 'pub async fn unit(self: &S)' -//@ has async_delegation/struct.S.html '//*[@class="code-header"]' 'pub async fn nonunit(self: &S) -> i32' +//@ has async_delegation/type.S.html '//*[@class="code-header"]' 'pub async fn unit(self: &S)' +//@ has async_delegation/type.S.html '//*[@class="code-header"]' 'pub async fn nonunit(self: &S) -> i32' impl S { pub reuse Trait::unit { self } pub reuse Trait::nonunit { self } diff --git a/tests/rustdoc-html/async/async-fn.rs b/tests/rustdoc-html/async/async-fn.rs index 3d49766c55e21..ffa53a455baed 100644 --- a/tests/rustdoc-html/async/async-fn.rs +++ b/tests/rustdoc-html/async/async-fn.rs @@ -34,7 +34,7 @@ pub async fn quux() -> impl Bar { () } -//@ has async_fn/struct.Foo.html +//@ has async_fn/type.Foo.html //@ matches - '//h4[@class="code-header"]' 'pub async fn f\(\)$' //@ matches - '//h4[@class="code-header"]' 'pub async unsafe fn g\(\)$' //@ matches - '//h4[@class="code-header"]' 'pub async fn mut_self\(self, first: usize\)$' @@ -78,7 +78,7 @@ pub async fn elided_in_input_trait(t: impl Pattern<'_>) {} struct AsyncFdReadyGuard<'a, T> { x: &'a T } impl Foo { - //@ has async_fn/struct.Foo.html + //@ has async_fn/type.Foo.html //@ has - '//*[@class="method"]' 'pub async fn complicated_lifetimes( &self, context: &impl Bar, ) -> impl Iterator' pub async fn complicated_lifetimes(&self, context: &impl Bar) -> impl Iterator { [0].iter() diff --git a/tests/rustdoc-html/async/async-trait.rs b/tests/rustdoc-html/async/async-trait.rs index a6ee340e2dd93..cd4567daaad97 100644 --- a/tests/rustdoc-html/async/async-trait.rs +++ b/tests/rustdoc-html/async/async-trait.rs @@ -7,7 +7,7 @@ extern crate async_trait_dep; pub struct Oink {} -//@ has 'async_trait/struct.Oink.html' '//h4[@class="code-header"]' "async fn woof()" +//@ has 'async_trait/type.Oink.html' '//h4[@class="code-header"]' "async fn woof()" impl async_trait_dep::Meow for Oink { async fn woof() { todo!() diff --git a/tests/rustdoc-html/attributes.rs b/tests/rustdoc-html/attributes.rs index 8a6dd5ab33d55..3251a17001244 100644 --- a/tests/rustdoc-html/attributes.rs +++ b/tests/rustdoc-html/attributes.rs @@ -26,7 +26,7 @@ pub extern "C" fn escape_html() {} #[unsafe(link_section = ".text")] pub extern "C" fn example() {} -//@ has foo/struct.Repr.html '//*[@class="code-attribute"]' '#[repr(C, align(8))]' +//@ has foo/type.Repr.html '//*[@class="code-attribute"]' '#[repr(C, align(8))]' #[repr(C, align(8))] pub struct Repr; @@ -37,18 +37,18 @@ macro_rules! macro_rule { () => {}; } -//@ has 'foo/enum.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "enum")]' +//@ has 'foo/type.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "enum")]' #[unsafe(link_section = "enum")] pub enum Enum { - //@ has 'foo/enum.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "a")]' + //@ has 'foo/type.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "a")]' //@ has - '//*[@class="variants"]//*[@class="code-attribute"]' '#[unsafe(link_section = "a")]' #[unsafe(link_section = "a")] A, - //@ has 'foo/enum.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "quz")]' + //@ has 'foo/type.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "quz")]' //@ has - '//*[@class="variants"]//*[@class="code-attribute"]' '#[unsafe(link_section = "quz")]' #[unsafe(link_section = "quz")] Quz { - //@ has 'foo/enum.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "b")]' + //@ has 'foo/type.Enum.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "b")]' //@ has - '//*[@class="variants"]//*[@class="code-attribute"]' '#[unsafe(link_section = "b")]' #[unsafe(link_section = "b")] b: (), @@ -69,19 +69,19 @@ pub trait Trait { fn foo() {} } -//@ has 'foo/union.Union.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "union")]' +//@ has 'foo/type.Union.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "union")]' #[unsafe(link_section = "union")] pub union Union { - //@ has 'foo/union.Union.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "x")]' + //@ has 'foo/type.Union.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "x")]' #[unsafe(link_section = "x")] pub x: u32, y: f32, } -//@ has 'foo/struct.Struct.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "struct")]' +//@ has 'foo/type.Struct.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "struct")]' #[unsafe(link_section = "struct")] pub struct Struct { - //@ has 'foo/struct.Struct.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "x")]' + //@ has 'foo/type.Struct.html' '//*[@class="code-attribute"]' '#[unsafe(link_section = "x")]' //@ has - '//*[@id="structfield.x"]//*[@class="code-attribute"]' '#[unsafe(link_section = "x")]' #[unsafe(link_section = "x")] pub x: u32, @@ -89,6 +89,6 @@ pub struct Struct { } // Check that the attributes from the trait items show up consistently in the impl. -//@ has 'foo/struct.Struct.html' '//*[@id="trait-implementations-list"]//*[@class="code-attribute"]' '#[unsafe(link_section = "bar")]' -//@ has 'foo/struct.Struct.html' '//*[@id="trait-implementations-list"]//*[@class="code-attribute"]' '#[unsafe(link_section = "foo")]' +//@ has 'foo/type.Struct.html' '//*[@id="trait-implementations-list"]//*[@class="code-attribute"]' '#[unsafe(link_section = "bar")]' +//@ has 'foo/type.Struct.html' '//*[@id="trait-implementations-list"]//*[@class="code-attribute"]' '#[unsafe(link_section = "foo")]' impl Trait for Struct {} diff --git a/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs b/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs index 14981783e5f35..554c1903602b6 100644 --- a/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs +++ b/tests/rustdoc-html/auto/auto-trait-bounds-by-associated-type-50159.rs @@ -16,7 +16,7 @@ where type Item2 = C; } -//@ has foo/struct.Switch.html +//@ has foo/type.Switch.html //@ has - '//h3[@class="code-header"]' 'impl Send for Switchwhere ::Item: Send' //@ has - '//h3[@class="code-header"]' 'impl Sync for Switchwhere ::Item: Sync' //@ count - '//*[@id="implementations-list"]//*[@class="impl"]' 0 diff --git a/tests/rustdoc-html/auto/auto-trait-bounds-inference-variables-54705.rs b/tests/rustdoc-html/auto/auto-trait-bounds-inference-variables-54705.rs index ef159fca87201..de3c29a42a43f 100644 --- a/tests/rustdoc-html/auto/auto-trait-bounds-inference-variables-54705.rs +++ b/tests/rustdoc-html/auto/auto-trait-bounds-inference-variables-54705.rs @@ -3,7 +3,7 @@ pub trait ScopeHandle<'scope> {} -//@ has foo/struct.ScopeFutureContents.html +//@ has foo/type.ScopeFutureContents.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<'scope, S> Send for ScopeFutureContents<'scope, S>where S: Sync" // diff --git a/tests/rustdoc-html/auto/auto-trait-bounds-where-51236.rs b/tests/rustdoc-html/auto/auto-trait-bounds-where-51236.rs index c892b6d0abf70..0ccadc5e4467b 100644 --- a/tests/rustdoc-html/auto/auto-trait-bounds-where-51236.rs +++ b/tests/rustdoc-html/auto/auto-trait-bounds-where-51236.rs @@ -9,7 +9,7 @@ pub mod traits { } } -//@ has foo/struct.Owned.html +//@ has foo/type.Owned.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Send for Ownedwhere >::Reader: Send" pub struct Owned where T: for<'a> ::traits::Owned<'a> { diff --git a/tests/rustdoc-html/auto/auto-trait-negative-impl-55321.rs b/tests/rustdoc-html/auto/auto-trait-negative-impl-55321.rs index 147f44da11781..df7837a8d7c3f 100644 --- a/tests/rustdoc-html/auto/auto-trait-negative-impl-55321.rs +++ b/tests/rustdoc-html/auto/auto-trait-negative-impl-55321.rs @@ -3,7 +3,7 @@ #![feature(negative_impls)] -//@ has foo/struct.A.html +//@ has foo/type.A.html //@ has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl !Send for A" //@ has - '//*[@id="trait-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ @@ -13,7 +13,7 @@ pub struct A(); impl !Send for A {} impl !Sync for A {} -//@ has foo/struct.B.html +//@ has foo/type.B.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl !Send for B" //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ diff --git a/tests/rustdoc-html/auto/auto-trait-not-send.rs b/tests/rustdoc-html/auto/auto-trait-not-send.rs index 0a31952f5e10e..2bb4fc1dc58b8 100644 --- a/tests/rustdoc-html/auto/auto-trait-not-send.rs +++ b/tests/rustdoc-html/auto/auto-trait-not-send.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has - '//*[@id="impl-Send-for-Foo"]' 'impl !Send for Foo' //@ has - '//*[@id="impl-Sync-for-Foo"]' 'impl !Sync for Foo' pub struct Foo(*const i8); diff --git a/tests/rustdoc-html/auxiliary/enum-primitive.rs b/tests/rustdoc-html/auxiliary/enum-primitive.rs index ed1da253a9732..3b4f75fde67c2 100644 --- a/tests/rustdoc-html/auxiliary/enum-primitive.rs +++ b/tests/rustdoc-html/auxiliary/enum-primitive.rs @@ -22,7 +22,7 @@ //! This crate exports a macro `enum_from_primitive!` that wraps an //! `enum` declaration and automatically adds an implementation of //! `num::FromPrimitive` (reexported here), to allow conversion from -//! primitive integers to the enum. It therefore provides an +//! primitive integers to the type. It therefore provides an //! alternative to the built-in `#[derive(FromPrimitive)]`, which //! requires the unstable `std::num::FromPrimitive` and is disabled in //! Rust 1.0. diff --git a/tests/rustdoc-html/bold-tag-101743.rs b/tests/rustdoc-html/bold-tag-101743.rs index 3cd4005a4fadf..47d2655afd736 100644 --- a/tests/rustdoc-html/bold-tag-101743.rs +++ b/tests/rustdoc-html/bold-tag-101743.rs @@ -14,6 +14,6 @@ impl Repr { // If we change back to rendering the value of consts, check this doesn't add // a tag, but escapes correctly - //@ !has foo/struct.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '=' + //@ !has foo/type.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '=' pub const BASE: IBig = base_as_ibig::(); } diff --git a/tests/rustdoc-html/cap-lints.rs b/tests/rustdoc-html/cap-lints.rs index 30f9be0424c6a..676675ca2d8d3 100644 --- a/tests/rustdoc-html/cap-lints.rs +++ b/tests/rustdoc-html/cap-lints.rs @@ -3,7 +3,7 @@ // therefore should not concern itself with the lints. #[deny(warnings)] -//@ has cap_lints/struct.Foo.html //* 'Foo' +//@ has cap_lints/type.Foo.html //* 'Foo' pub struct Foo { field: i32, } diff --git a/tests/rustdoc-html/cfg-doctest.rs b/tests/rustdoc-html/cfg-doctest.rs index a2272e6ca00d9..ecd6ac769f842 100644 --- a/tests/rustdoc-html/cfg-doctest.rs +++ b/tests/rustdoc-html/cfg-doctest.rs @@ -1,5 +1,5 @@ -//@ !has cfg_doctest/struct.SomeStruct.html -//@ !has cfg_doctest/index.html '//a/@href' 'struct.SomeStruct.html' +//@ !has cfg_doctest/type.SomeStruct.html +//@ !has cfg_doctest/index.html '//a/@href' 'type.SomeStruct.html' /// Sneaky, this isn't actually part of docs. #[cfg(doctest)] diff --git a/tests/rustdoc-html/check-styled-link.rs b/tests/rustdoc-html/check-styled-link.rs index a74a3c9466ff5..6414bfe001890 100644 --- a/tests/rustdoc-html/check-styled-link.rs +++ b/tests/rustdoc-html/check-styled-link.rs @@ -2,7 +2,7 @@ pub struct Foo; -//@ has foo/struct.Bar.html '//a[@href="struct.Foo.html"]' 'Foo' +//@ has foo/type.Bar.html '//a[@href="type.Foo.html"]' 'Foo' /// Code-styled reference to [`Foo`]. pub struct Bar; diff --git a/tests/rustdoc-html/codeblock/custom_code_classes.rs b/tests/rustdoc-html/codeblock/custom_code_classes.rs index 1e89b0761a6d3..d6bdffe9f3119 100644 --- a/tests/rustdoc-html/codeblock/custom_code_classes.rs +++ b/tests/rustdoc-html/codeblock/custom_code_classes.rs @@ -4,7 +4,7 @@ #![feature(no_core)] #![no_core] -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' //@ has - '//*[@id="main-content"]//pre[@class="language-whatever hoho-c"]' 'main;' //@ has - '//*[@id="main-content"]//pre[@class="language-whatever2 haha-c"]' 'main;' //@ has - '//*[@id="main-content"]//pre[@class="language-whatever4 huhu-c"]' 'main;' diff --git a/tests/rustdoc-html/codeblock/doctest-escape-boring-41783.rs b/tests/rustdoc-html/codeblock/doctest-escape-boring-41783.rs index 2d614f63da64f..bf382831a1ff6 100644 --- a/tests/rustdoc-html/codeblock/doctest-escape-boring-41783.rs +++ b/tests/rustdoc-html/codeblock/doctest-escape-boring-41783.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/41783 #![crate_name="foo"] -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ !hasraw - 'space' //@ !hasraw - 'comment' //@ hasraw - '#[outer]' diff --git a/tests/rustdoc-html/codeblock/slice-links.link_box_generic.html b/tests/rustdoc-html/codeblock/slice-links.link_box_generic.html index 38aaf20808cf1..30b02ce9c3150 100644 --- a/tests/rustdoc-html/codeblock/slice-links.link_box_generic.html +++ b/tests/rustdoc-html/codeblock/slice-links.link_box_generic.html @@ -1 +1 @@ -pub fn delta<T>() -> MyBox<[T]> \ No newline at end of file +pub fn delta<T>() -> MyBox<[T]> \ No newline at end of file diff --git a/tests/rustdoc-html/codeblock/slice-links.link_box_u32.html b/tests/rustdoc-html/codeblock/slice-links.link_box_u32.html index 7bec7582df7c9..c3195e5529483 100644 --- a/tests/rustdoc-html/codeblock/slice-links.link_box_u32.html +++ b/tests/rustdoc-html/codeblock/slice-links.link_box_u32.html @@ -1 +1 @@ -pub fn gamma() -> MyBox<[u32]> \ No newline at end of file +pub fn gamma() -> MyBox<[u32]> \ No newline at end of file diff --git a/tests/rustdoc-html/codeblock/unindent.rs b/tests/rustdoc-html/codeblock/unindent.rs index f9787b076c19d..c0a60a16e84d0 100644 --- a/tests/rustdoc-html/codeblock/unindent.rs +++ b/tests/rustdoc-html/codeblock/unindent.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Example.html +//@ has foo/type.Example.html //@ matches - '//pre[@class="rust rust-example-rendered"]' \ // '(?m)let example = Example::new\(\)\n \.first\(\)\n \.second\(\)\n \.build\(\);\Z' /// ```rust @@ -11,7 +11,7 @@ /// ``` pub struct Example; -//@ has foo/struct.F.html +//@ has foo/type.F.html //@ matches - '//pre[@class="rust rust-example-rendered"]' \ // '(?m)let example = Example::new\(\)\n \.first\(\)\n \.another\(\)\n \.build\(\);\Z' ///```rust @@ -22,7 +22,7 @@ pub struct Example; /// ``` pub struct F; -//@ has foo/struct.G.html +//@ has foo/type.G.html //@ matches - '//pre[@class="rust rust-example-rendered"]' \ // '(?m)let example = Example::new\(\)\n\.first\(\)\n \.another\(\)\n\.build\(\);\Z' ///```rust @@ -33,26 +33,26 @@ pub struct F; ///``` pub struct G; -//@ has foo/struct.H.html +//@ has foo/type.H.html //@ has - '//div[@class="docblock"]/p' 'no whitespace lol' ///no whitespace #[doc = " lol"] pub struct H; -//@ has foo/struct.I.html +//@ has foo/type.I.html //@ matches - '//pre[@class="rust rust-example-rendered"]' '(?m)4 whitespaces!\Z' /// 4 whitespaces! #[doc = "something"] pub struct I; -//@ has foo/struct.J.html +//@ has foo/type.J.html //@ matches - '//div[@class="docblock"]/p' '(?m)a\nno whitespace\nJust some text.\Z' ///a ///no whitespace #[doc = include_str!("unindent.md")] pub struct J; -//@ has foo/struct.K.html +//@ has foo/type.K.html //@ matches - '//pre[@class="rust rust-example-rendered"]' '(?m)4 whitespaces!\Z' ///a /// diff --git a/tests/rustdoc-html/const-fn-76501.rs b/tests/rustdoc-html/const-fn-76501.rs index fac49b0fd20fd..fadeaf6c69704 100644 --- a/tests/rustdoc-html/const-fn-76501.rs +++ b/tests/rustdoc-html/const-fn-76501.rs @@ -7,11 +7,11 @@ pub const fn bloop() -> i32 { 1 } -/// A struct. +/// A type. pub struct Struct {} impl Struct { - //@ has 'foo/struct.Struct.html' '//*[@class="method"]' \ + //@ has 'foo/type.Struct.html' '//*[@class="method"]' \ // 'pub const fn blurp() -> i32' /// A useless function that always returns 1. pub const fn blurp() -> i32 { diff --git a/tests/rustdoc-html/const-fn-effects.rs b/tests/rustdoc-html/const-fn-effects.rs index df060a1aa1a16..65934390dd46e 100644 --- a/tests/rustdoc-html/const-fn-effects.rs +++ b/tests/rustdoc-html/const-fn-effects.rs @@ -7,7 +7,7 @@ pub const fn bar() -> usize { 2 } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//*[@class="method"]' 'const fn new()' pub struct Foo(usize); diff --git a/tests/rustdoc-html/const-fn.rs b/tests/rustdoc-html/const-fn.rs index 8cb0cb6bf1d4b..473d2d1bfa355 100644 --- a/tests/rustdoc-html/const-fn.rs +++ b/tests/rustdoc-html/const-fn.rs @@ -7,7 +7,7 @@ pub const fn bar() -> usize { 2 } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//*[@class="method"]' 'const fn new()' pub struct Foo(usize); diff --git a/tests/rustdoc-html/const-generics/add-impl.rs b/tests/rustdoc-html/const-generics/add-impl.rs index 1fea0f847b261..8c791f7a05623 100644 --- a/tests/rustdoc-html/const-generics/add-impl.rs +++ b/tests/rustdoc-html/const-generics/add-impl.rs @@ -2,12 +2,12 @@ use std::ops::Add; -//@ has foo/struct.Simd.html '//pre[@class="rust item-decl"]' 'pub struct Simd' +//@ has foo/type.Simd.html '//pre[@class="rust item-decl"]' 'pub struct Simd' pub struct Simd { inner: T, } -//@ has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl Add for Simd' +//@ has foo/type.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl Add for Simd' impl Add for Simd { type Output = Self; diff --git a/tests/rustdoc-html/const-generics/const-generic-defaults.rs b/tests/rustdoc-html/const-generics/const-generic-defaults.rs index 090f17cc98870..4d441d5bb140a 100644 --- a/tests/rustdoc-html/const-generics/const-generic-defaults.rs +++ b/tests/rustdoc-html/const-generics/const-generic-defaults.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.Foo.html '//pre[@class="rust item-decl"]' \ // 'pub struct Foo(' pub struct Foo(T); diff --git a/tests/rustdoc-html/const-generics/const-generics-docs.rs b/tests/rustdoc-html/const-generics/const-generics-docs.rs index e261585263bac..1ac4acc83c40e 100644 --- a/tests/rustdoc-html/const-generics/const-generics-docs.rs +++ b/tests/rustdoc-html/const-generics/const-generics-docs.rs @@ -6,7 +6,7 @@ extern crate extern_crate; //@ has foo/fn.extern_fn.html '//pre[@class="rust item-decl"]' \ // 'pub fn extern_fn() -> impl Iterator' pub use extern_crate::extern_fn; -//@ has foo/struct.ExternTy.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.ExternTy.html '//pre[@class="rust item-decl"]' \ // 'pub struct ExternTy {' pub use extern_crate::ExternTy; //@ has foo/type.TyAlias.html '//pre[@class="rust item-decl"]' \ @@ -30,13 +30,13 @@ impl Trait<2> for u8 {} impl Trait<{1 + 2}> for u8 {} impl Trait for [u8; N] {} -//@ has foo/struct.Foo.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.Foo.html '//pre[@class="rust item-decl"]' \ // 'pub struct Foo where u8: Trait' pub struct Foo where u8: Trait; -//@ has foo/struct.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar(' +//@ has foo/type.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar(' pub struct Bar([T; N]); -//@ has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header"]' 'impl Foowhere u8: Trait' +//@ has foo/type.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header"]' 'impl Foowhere u8: Trait' impl Foo where u8: Trait { //@ has - '//*[@id="associatedconstant.FOO_ASSOC"]' 'pub const FOO_ASSOC: usize' pub const FOO_ASSOC: usize = M + 13; @@ -47,7 +47,7 @@ impl Foo where u8: Trait { } } -//@ has foo/struct.Bar.html '//*[@id="impl-Bar%3Cu8,+M%3E"]/h3[@class="code-header"]' 'impl Bar' +//@ has foo/type.Bar.html '//*[@id="impl-Bar%3Cu8,+M%3E"]/h3[@class="code-header"]' 'impl Bar' impl Bar { //@ has - '//*[@id="method.hey"]' \ // 'pub fn hey(&self) -> Foowhere u8: Trait' @@ -91,7 +91,7 @@ macro_rules! define_me { } } -//@ has foo/struct.Foz.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.Foz.html '//pre[@class="rust item-decl"]' \ // 'pub struct Foz(/* private fields */);' define_me!(Foz); @@ -109,7 +109,7 @@ pub fn q_user() -> [u8; <[u8; 13] as Q>::ASSOC] { [0; <[u8; 13] as Q>::ASSOC] } -//@ has foo/union.Union.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.Union.html '//pre[@class="rust item-decl"]' \ // 'pub union Union' pub union Union { //@ has - //pre "pub arr: [u8; N]" @@ -118,7 +118,7 @@ pub union Union { pub another_arr: [(); N], } -//@ has foo/enum.Enum.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.Enum.html '//pre[@class="rust item-decl"]' \ // 'pub enum Enum' pub enum Enum { //@ has - //pre "Variant([u8; N])" diff --git a/tests/rustdoc-html/const-generics/const-impl.rs b/tests/rustdoc-html/const-generics/const-impl.rs index 279a78422541b..985e1f70219ee 100644 --- a/tests/rustdoc-html/const-generics/const-impl.rs +++ b/tests/rustdoc-html/const-generics/const-impl.rs @@ -10,21 +10,21 @@ pub enum Order { Unsorted, } -//@ has foo/struct.VSet.html '//pre[@class="rust item-decl"]' 'pub struct VSet' -//@ has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT,+ORDER%3E"]/h3[@class="code-header"]' 'impl Send for VSet' -//@ has foo/struct.VSet.html '//*[@id="impl-Sync-for-VSet%3CT,+ORDER%3E"]/h3[@class="code-header"]' 'impl Sync for VSet' +//@ has foo/type.VSet.html '//pre[@class="rust item-decl"]' 'pub struct VSet' +//@ has foo/type.VSet.html '//*[@id="impl-Send-for-VSet%3CT,+ORDER%3E"]/h3[@class="code-header"]' 'impl Send for VSet' +//@ has foo/type.VSet.html '//*[@id="impl-Sync-for-VSet%3CT,+ORDER%3E"]/h3[@class="code-header"]' 'impl Sync for VSet' pub struct VSet { inner: Vec, } -//@ has foo/struct.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Sorted+%7D%3E"]/h3[@class="code-header"]' 'impl VSet' +//@ has foo/type.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Sorted+%7D%3E"]/h3[@class="code-header"]' 'impl VSet' impl VSet { pub fn new() -> Self { Self { inner: Vec::new() } } } -//@ has foo/struct.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Unsorted+%7D%3E"]/h3[@class="code-header"]' 'impl VSet' +//@ has foo/type.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Unsorted+%7D%3E"]/h3[@class="code-header"]' 'impl VSet' impl VSet { pub fn new() -> Self { Self { inner: Vec::new() } @@ -33,7 +33,7 @@ impl VSet { pub struct Escape; -//@ has foo/struct.Escape.html '//*[@id="impl-Escape%3C%22%3Cscript%3Ealert(%5C%22Escape%5C%22);%3C/script%3E%22%3E"]/h3[@class="code-header"]' 'impl Escapealert("Escape");"#>' +//@ has foo/type.Escape.html '//*[@id="impl-Escape%3C%22%3Cscript%3Ealert(%5C%22Escape%5C%22);%3C/script%3E%22%3E"]/h3[@class="code-header"]' 'impl Escapealert("Escape");"#>' impl Escapealert("Escape");"#> { pub fn f() {} } diff --git a/tests/rustdoc-html/const-generics/const-param-type-references-generics.rs b/tests/rustdoc-html/const-generics/const-param-type-references-generics.rs index 47bf3e253e69d..8575e20e92854 100644 --- a/tests/rustdoc-html/const-generics/const-param-type-references-generics.rs +++ b/tests/rustdoc-html/const-generics/const-param-type-references-generics.rs @@ -12,5 +12,5 @@ pub fn instantiate() { takes(Bar::<2, { [1; 2] }>); } -//@ has foo/struct.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar' +//@ has foo/type.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar' //@ has foo/fn.takes.html '//pre[@class="rust item-decl"]' 'pub fn takes(_: Bar)' diff --git a/tests/rustdoc-html/const-generics/generic_const_exprs.rs b/tests/rustdoc-html/const-generics/generic_const_exprs.rs index c406fa5d03417..2ea1dba1b8127 100644 --- a/tests/rustdoc-html/const-generics/generic_const_exprs.rs +++ b/tests/rustdoc-html/const-generics/generic_const_exprs.rs @@ -2,6 +2,6 @@ #![feature(generic_const_exprs)] #![allow(incomplete_features)] // make sure that `ConstEvaluatable` predicates dont cause rustdoc to ICE #77647 -//@ has foo/struct.Ice.html '//pre[@class="rust item-decl"]' \ +//@ has foo/type.Ice.html '//pre[@class="rust item-decl"]' \ // 'pub struct Ice where [(); { _ }]:;' pub struct Ice where [(); N + 1]:; diff --git a/tests/rustdoc-html/const-generics/lazy_normalization_consts/const-equate-pred.rs b/tests/rustdoc-html/const-generics/lazy_normalization_consts/const-equate-pred.rs index c9d80d68aa147..40984ad6a2933 100644 --- a/tests/rustdoc-html/const-generics/lazy_normalization_consts/const-equate-pred.rs +++ b/tests/rustdoc-html/const-generics/lazy_normalization_consts/const-equate-pred.rs @@ -11,7 +11,7 @@ pub struct Hasher { unsafe impl Send for Hasher {} -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//h3[@class="code-header"]' 'impl Send for Foo' pub struct Foo { hasher: Hasher<[u8; 3]>, diff --git a/tests/rustdoc-html/constant/assoc-const-has-projection-ty.rs b/tests/rustdoc-html/constant/assoc-const-has-projection-ty.rs index ed0789dade574..a6ebcb9060bb1 100644 --- a/tests/rustdoc-html/constant/assoc-const-has-projection-ty.rs +++ b/tests/rustdoc-html/constant/assoc-const-has-projection-ty.rs @@ -25,7 +25,7 @@ pub struct Struct; impl Trait for Struct { type Ty = u32; - //@ has it/struct.Struct.html + //@ has it/type.Struct.html //@ has - '//*[@id="associatedconstant.CT"]' 'const CT: Self::Ty = 1' const CT: Self::Ty = 1; } diff --git a/tests/rustdoc-html/constant/assoc-consts-underscore.rs b/tests/rustdoc-html/constant/assoc-consts-underscore.rs index f48098094db58..4d7852869f431 100644 --- a/tests/rustdoc-html/constant/assoc-consts-underscore.rs +++ b/tests/rustdoc-html/constant/assoc-consts-underscore.rs @@ -14,7 +14,7 @@ pub trait Trait { } impl Trait for Struct { - //@ !has assoc_consts_underscore/struct.Struct.html '//*[@id="associatedconstant.REQUIRED"]' \ + //@ !has assoc_consts_underscore/type.Struct.html '//*[@id="associatedconstant.REQUIRED"]' \ // 'const REQUIRED: Struct = _' //@ has - '//*[@id="associatedconstant.REQUIRED"]' 'const REQUIRED: Struct' const REQUIRED: Struct = Struct { _private: () }; diff --git a/tests/rustdoc-html/constant/assoc-consts-version.rs b/tests/rustdoc-html/constant/assoc-consts-version.rs index db4d759acabc2..48a490121716e 100644 --- a/tests/rustdoc-html/constant/assoc-consts-version.rs +++ b/tests/rustdoc-html/constant/assoc-consts-version.rs @@ -8,7 +8,7 @@ pub struct SomeStruct; impl SomeStruct { - //@ has 'foo/struct.SomeStruct.html' \ + //@ has 'foo/type.SomeStruct.html' \ // '//*[@id="associatedconstant.SOME_CONST"]//span[@class="since"]' '1.1.2' #[stable(since="1.1.2", feature="rust2")] pub const SOME_CONST: usize = 0; diff --git a/tests/rustdoc-html/constant/assoc-consts.rs b/tests/rustdoc-html/constant/assoc-consts.rs index 0994ec7517e3e..0d3c7a8b9198b 100644 --- a/tests/rustdoc-html/constant/assoc-consts.rs +++ b/tests/rustdoc-html/constant/assoc-consts.rs @@ -13,7 +13,7 @@ pub trait Foo { pub struct Bar; impl Foo for Bar { - //@ has assoc_consts/struct.Bar.html '//h3[@class="code-header"]' 'impl Foo for Bar' + //@ has assoc_consts/type.Bar.html '//h3[@class="code-header"]' 'impl Foo for Bar' //@ has - '//*[@id="associatedconstant.FOO"]' 'const FOO: usize' const FOO: usize = 12; //@ has - '//*[@id="associatedconstant.FOO_NO_DEFAULT"]' 'const FOO_NO_DEFAULT: bool' @@ -24,7 +24,7 @@ impl Foo for Bar { } impl Bar { - //@ has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAR"]' \ + //@ has assoc_consts/type.Bar.html '//*[@id="associatedconstant.BAR"]' \ // 'const BAR: usize' pub const BAR: usize = 3; @@ -36,7 +36,7 @@ impl Bar { pub struct Baz<'a, U: 'a, T>(T, &'a [U]); impl Bar { - //@ has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAZ"]' \ + //@ has assoc_consts/type.Bar.html '//*[@id="associatedconstant.BAZ"]' \ // "const BAZ: Baz<'static, u8, u32>" pub const BAZ: Baz<'static, u8, u32> = Baz(321, &[1, 2, 3]); } @@ -44,15 +44,15 @@ impl Bar { pub fn f(_: &(ToString + 'static)) {} impl Bar { - //@ has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.F"]' \ + //@ has assoc_consts/type.Bar.html '//*[@id="associatedconstant.F"]' \ // "const F: fn(&(dyn ToString + 'static))" pub const F: fn(_: &(ToString + 'static)) = f; } impl Bar { - //@ !hasraw assoc_consts/struct.Bar.html 'BAR_PRIVATE' + //@ !hasraw assoc_consts/type.Bar.html 'BAR_PRIVATE' const BAR_PRIVATE: char = 'a'; - //@ !hasraw assoc_consts/struct.Bar.html 'BAR_HIDDEN' + //@ !hasraw assoc_consts/type.Bar.html 'BAR_HIDDEN' #[doc(hidden)] pub const BAR_HIDDEN: &'static str = "a"; } @@ -81,7 +81,7 @@ pub trait Qux { const QUX_DEFAULT2: u32 = 3; } -//@ has assoc_consts/struct.Bar.html '//h3[@class="code-header"]' 'impl Qux for Bar' +//@ has assoc_consts/type.Bar.html '//h3[@class="code-header"]' 'impl Qux for Bar' impl Qux for Bar { //@ has - '//*[@id="associatedconstant.QUX0"]' 'const QUX0: u8' //@ has - '//*[@class="docblock"]' "Docs for QUX0 in trait." diff --git a/tests/rustdoc-html/constant/associated-consts.rs b/tests/rustdoc-html/constant/associated-consts.rs index 2a7269a89befa..420589c871cd8 100644 --- a/tests/rustdoc-html/constant/associated-consts.rs +++ b/tests/rustdoc-html/constant/associated-consts.rs @@ -8,7 +8,7 @@ pub trait Trait { pub struct Bar; -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' //@ !has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants' //@ !has - '//div[@class="sidebar-elems"]//a' 'FOO' impl Trait for Bar { @@ -21,7 +21,7 @@ pub enum Foo { A, } -//@ has 'foo/enum.Foo.html' +//@ has 'foo/type.Foo.html' //@ !has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants' //@ !has - '//div[@class="sidebar-elems"]//a' 'FOO' impl Trait for Foo { @@ -32,7 +32,7 @@ impl Trait for Foo { pub struct Baz; -//@ has 'foo/struct.Baz.html' +//@ has 'foo/type.Baz.html' //@ has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants' //@ has - '//div[@class="sidebar-elems"]//a' 'FOO' impl Baz { @@ -43,7 +43,7 @@ pub enum Quux { B, } -//@ has 'foo/enum.Quux.html' +//@ has 'foo/type.Quux.html' //@ has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants' //@ has - '//div[@class="sidebar-elems"]//a' 'FOO' impl Quux { diff --git a/tests/rustdoc-html/constant/const-display.rs b/tests/rustdoc-html/constant/const-display.rs index bc4270c421d5d..ae04cf9505b60 100644 --- a/tests/rustdoc-html/constant/const-display.rs +++ b/tests/rustdoc-html/constant/const-display.rs @@ -61,19 +61,19 @@ pub mod unstable { pub struct Foo; impl Foo { - //@ has 'foo/struct.Foo.html' '//*[@id="method.gated"]/h4[@class="code-header"]' 'pub fn gated() -> u32' + //@ has 'foo/type.Foo.html' '//*[@id="method.gated"]/h4[@class="code-header"]' 'pub fn gated() -> u32' //@ has - '//span[@class="since"]' '1.0.0 (const: unstable)' #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature="foo", issue = "none")] pub const fn gated() -> u32 { 42 } - //@ has 'foo/struct.Foo.html' '//*[@id="method.gated_unsafe"]/h4[@class="code-header"]' 'pub unsafe fn gated_unsafe() -> u32' + //@ has 'foo/type.Foo.html' '//*[@id="method.gated_unsafe"]/h4[@class="code-header"]' 'pub unsafe fn gated_unsafe() -> u32' //@ has - '//span[@class="since"]' '1.0.0 (const: unstable)' #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature="foo", issue = "none")] pub const unsafe fn gated_unsafe() -> u32 { 42 } - //@ has 'foo/struct.Foo.html' '//*[@id="method.stable_impl"]/h4[@class="code-header"]' 'pub const fn stable_impl() -> u32' + //@ has 'foo/type.Foo.html' '//*[@id="method.stable_impl"]/h4[@class="code-header"]' 'pub const fn stable_impl() -> u32' //@ has - '//span[@class="since"]' '1.0.0 (const: 1.2.0)' #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const2", since = "1.2.0")] @@ -85,7 +85,7 @@ pub struct Bar; impl Bar { // Show non-const stabilities that are the same as the enclosing item. - //@ has 'foo/struct.Bar.html' '//span[@class="since"]' '1.0.0 (const: 1.2.0)' + //@ has 'foo/type.Bar.html' '//span[@class="since"]' '1.0.0 (const: 1.2.0)' #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const2", since = "1.2.0")] pub const fn stable_impl() -> u32 { 42 } diff --git a/tests/rustdoc-html/constant/const-doc.rs b/tests/rustdoc-html/constant/const-doc.rs index f33083a267c8d..c490a6a720f26 100644 --- a/tests/rustdoc-html/constant/const-doc.rs +++ b/tests/rustdoc-html/constant/const-doc.rs @@ -11,7 +11,7 @@ pub struct ContentType { } impl ContentType { - //@ has const_doc/struct.ContentType.html + //@ has const_doc/type.ContentType.html //@ has - '//*[@id="associatedconstant.Any"]' 'const Any: ContentType' pub const Any: ContentType = ContentType { ttype: Foo { f: PhantomData, }, subtype: Foo { f: PhantomData, }, diff --git a/tests/rustdoc-html/constant/const-trait-and-impl-methods.rs b/tests/rustdoc-html/constant/const-trait-and-impl-methods.rs index c2ac9d1588034..b3fec58e63bf9 100644 --- a/tests/rustdoc-html/constant/const-trait-and-impl-methods.rs +++ b/tests/rustdoc-html/constant/const-trait-and-impl-methods.rs @@ -15,7 +15,7 @@ pub const trait Tr { pub struct ConstImpl {} pub struct NonConstImpl {} -//@ has foo/struct.ConstImpl.html +//@ has foo/type.ConstImpl.html //@ has - '//*[@id="method.required"]' 'fn required()' //@ !has - '//*[@id="method.required"]' 'const' //@ has - '//*[@id="method.defaulted"]' 'fn defaulted()' @@ -24,7 +24,7 @@ const impl Tr for ConstImpl { fn required() {} } -//@ has foo/struct.NonConstImpl.html +//@ has foo/type.NonConstImpl.html //@ has - '//*[@id="method.required"]' 'fn required()' //@ !has - '//*[@id="method.required"]' 'const' //@ has - '//*[@id="method.defaulted"]' 'fn defaulted()' diff --git a/tests/rustdoc-html/constant/const.rs b/tests/rustdoc-html/constant/const.rs index fe6a828505ab2..4fe1324fcd395 100644 --- a/tests/rustdoc-html/constant/const.rs +++ b/tests/rustdoc-html/constant/const.rs @@ -3,7 +3,7 @@ pub struct Foo; impl Foo { - //@ has const/struct.Foo.html '//*[@id="method.new"]//h4[@class="code-header"]' 'const unsafe fn new' + //@ has const/type.Foo.html '//*[@id="method.new"]//h4[@class="code-header"]' 'const unsafe fn new' pub const unsafe fn new() -> Foo { Foo } diff --git a/tests/rustdoc-html/constant/generic-const-items.rs b/tests/rustdoc-html/constant/generic-const-items.rs index 353f9c2dc6230..c043928f3a6df 100644 --- a/tests/rustdoc-html/constant/generic-const-items.rs +++ b/tests/rustdoc-html/constant/generic-const-items.rs @@ -44,7 +44,7 @@ pub trait Trait { pub struct Implementor; -//@ has generic_const_items/struct.Implementor.html +//@ has generic_const_items/type.Implementor.html //@ has - '//h3[@class="code-header"]' 'impl Trait for Implementor' impl Trait for Implementor { //@ has - '//*[@id="associatedconstant.C"]' \ diff --git a/tests/rustdoc-html/constant/link-assoc-const.rs b/tests/rustdoc-html/constant/link-assoc-const.rs index 56b82fb2d39b3..d2d929f242b5f 100644 --- a/tests/rustdoc-html/constant/link-assoc-const.rs +++ b/tests/rustdoc-html/constant/link-assoc-const.rs @@ -1,7 +1,7 @@ #![crate_name = "foo"] //@ has foo/index.html '//a[@href="foo/constant.FIRSTCONST.html"]' 'foo::FIRSTCONST' -//@ has foo/index.html '//a[@href="struct.Bar.html#associatedconstant.CONST"]' 'Bar::CONST' +//@ has foo/index.html '//a[@href="type.Bar.html#associatedconstant.CONST"]' 'Bar::CONST' //! We have here [`foo::FIRSTCONST`] and [`Bar::CONST`]. diff --git a/tests/rustdoc-html/constant/rfc-2632-const-trait-impl.rs b/tests/rustdoc-html/constant/rfc-2632-const-trait-impl.rs index c3040802e201d..bd469d5f421f7 100644 --- a/tests/rustdoc-html/constant/rfc-2632-const-trait-impl.rs +++ b/tests/rustdoc-html/constant/rfc-2632-const-trait-impl.rs @@ -59,7 +59,7 @@ where } impl S { - //@ !has foo/struct.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '[const]' + //@ !has foo/type.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '[const]' //@ has - '//section[@id="method.foo"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn' //@ !has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '[const]' //@ has - '//section[@id="method.foo"]/h4[@class="code-header"]/div[@class="where"]' ': Fn' diff --git a/tests/rustdoc-html/cross-crate-info/cargo-transitive-no-index/s.rs b/tests/rustdoc-html/cross-crate-info/cargo-transitive-no-index/s.rs index 088ab242d2769..1b2e47e86a7fa 100644 --- a/tests/rustdoc-html/cross-crate-info/cargo-transitive-no-index/s.rs +++ b/tests/rustdoc-html/cross-crate-info/cargo-transitive-no-index/s.rs @@ -1,10 +1,10 @@ //@ aux-build:t.rs //@ build-aux-docs -//@ has q/struct.Quebec.html -//@ has s/struct.Sierra.html +//@ has q/type.Quebec.html +//@ has s/type.Sierra.html //@ has t/trait.Tango.html -//@ hasraw s/struct.Sierra.html 'Tango' -//@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html' +//@ hasraw s/type.Sierra.html 'Tango' +//@ hasraw trait.impl/t/trait.Tango.js 'type.Sierra.html' //@ hasraw search.index/name/*.js 'Tango' //@ hasraw search.index/name/*.js 'Sierra' //@ hasraw search.index/name/*.js 'Quebec' diff --git a/tests/rustdoc-html/cross-crate-info/cargo-transitive/s.rs b/tests/rustdoc-html/cross-crate-info/cargo-transitive/s.rs index fb6eef0bf691b..700ca16047f21 100644 --- a/tests/rustdoc-html/cross-crate-info/cargo-transitive/s.rs +++ b/tests/rustdoc-html/cross-crate-info/cargo-transitive/s.rs @@ -8,11 +8,11 @@ //@ has index.html '//ul[@class="all-items"]//a[@href="q/index.html"]' 'q' //@ has index.html '//ul[@class="all-items"]//a[@href="s/index.html"]' 's' //@ has index.html '//ul[@class="all-items"]//a[@href="t/index.html"]' 't' -//@ has q/struct.Quebec.html -//@ has s/struct.Sierra.html +//@ has q/type.Quebec.html +//@ has s/type.Sierra.html //@ has t/trait.Tango.html -//@ hasraw s/struct.Sierra.html 'Tango' -//@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html' +//@ hasraw s/type.Sierra.html 'Tango' +//@ hasraw trait.impl/t/trait.Tango.js 'type.Sierra.html' //@ hasraw search.index/name/*.js 'Tango' //@ hasraw search.index/name/*.js 'Sierra' //@ hasraw search.index/name/*.js 'Quebec' diff --git a/tests/rustdoc-html/cross-crate-info/cargo-two-no-index/e.rs b/tests/rustdoc-html/cross-crate-info/cargo-two-no-index/e.rs index 533756705526f..651940f87400e 100644 --- a/tests/rustdoc-html/cross-crate-info/cargo-two-no-index/e.rs +++ b/tests/rustdoc-html/cross-crate-info/cargo-two-no-index/e.rs @@ -1,9 +1,9 @@ //@ aux-build:f.rs //@ build-aux-docs -//@ has e/enum.Echo.html +//@ has e/type.Echo.html //@ has f/trait.Foxtrot.html -//@ hasraw e/enum.Echo.html 'Foxtrot' -//@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html' +//@ hasraw e/type.Echo.html 'Foxtrot' +//@ hasraw trait.impl/f/trait.Foxtrot.js 'type.Echo.html' //@ hasraw search.index/name/*.js 'Foxtrot' //@ hasraw search.index/name/*.js 'Echo' diff --git a/tests/rustdoc-html/cross-crate-info/cargo-two/e.rs b/tests/rustdoc-html/cross-crate-info/cargo-two/e.rs index 936e75c97af72..f599ca47770ae 100644 --- a/tests/rustdoc-html/cross-crate-info/cargo-two/e.rs +++ b/tests/rustdoc-html/cross-crate-info/cargo-two/e.rs @@ -7,10 +7,10 @@ //@ has index.html '//h1' 'List of all crates' //@ has index.html '//ul[@class="all-items"]//a[@href="f/index.html"]' 'f' //@ has index.html '//ul[@class="all-items"]//a[@href="e/index.html"]' 'e' -//@ has e/enum.Echo.html +//@ has e/type.Echo.html //@ has f/trait.Foxtrot.html -//@ hasraw e/enum.Echo.html 'Foxtrot' -//@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html' +//@ hasraw e/type.Echo.html 'Foxtrot' +//@ hasraw trait.impl/f/trait.Foxtrot.js 'type.Echo.html' //@ hasraw search.index/name/*.js 'Foxtrot' //@ hasraw search.index/name/*.js 'Echo' diff --git a/tests/rustdoc-html/cross-crate-info/index-on-last/e.rs b/tests/rustdoc-html/cross-crate-info/index-on-last/e.rs index dbaeaf5b72536..8629a4d064032 100644 --- a/tests/rustdoc-html/cross-crate-info/index-on-last/e.rs +++ b/tests/rustdoc-html/cross-crate-info/index-on-last/e.rs @@ -7,10 +7,10 @@ //@ has index.html '//h1' 'List of all crates' //@ has index.html '//ul[@class="all-items"]//a[@href="f/index.html"]' 'f' //@ has index.html '//ul[@class="all-items"]//a[@href="e/index.html"]' 'e' -//@ has e/enum.Echo.html +//@ has e/type.Echo.html //@ has f/trait.Foxtrot.html -//@ hasraw e/enum.Echo.html 'Foxtrot' -//@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html' +//@ hasraw e/type.Echo.html 'Foxtrot' +//@ hasraw trait.impl/f/trait.Foxtrot.js 'type.Echo.html' //@ hasraw search.index/name/*.js 'Foxtrot' //@ hasraw search.index/name/*.js 'Echo' diff --git a/tests/rustdoc-html/cross-crate-info/kitchen-sink/i.rs b/tests/rustdoc-html/cross-crate-info/kitchen-sink/i.rs index 979d77d8c42ea..c7afbb760cab5 100644 --- a/tests/rustdoc-html/cross-crate-info/kitchen-sink/i.rs +++ b/tests/rustdoc-html/cross-crate-info/kitchen-sink/i.rs @@ -13,12 +13,12 @@ //@ has index.html '//ul[@class="all-items"]//a[@href="r/index.html"]' 'r' //@ has index.html '//ul[@class="all-items"]//a[@href="s/index.html"]' 's' //@ has index.html '//ul[@class="all-items"]//a[@href="t/index.html"]' 't' -//@ has q/struct.Quebec.html +//@ has q/type.Quebec.html //@ has r/type.Romeo.html -//@ has s/struct.Sierra.html +//@ has s/type.Sierra.html //@ has t/trait.Tango.html -//@ hasraw s/struct.Sierra.html 'Tango' -//@ hasraw trait.impl/t/trait.Tango.js 'struct.Sierra.html' +//@ hasraw s/type.Sierra.html 'Tango' +//@ hasraw trait.impl/t/trait.Tango.js 'type.Sierra.html' //@ hasraw search.index/name/*.js 'Quebec' //@ hasraw search.index/name/*.js 'Romeo' //@ hasraw search.index/name/*.js 'Sierra' diff --git a/tests/rustdoc-html/cross-crate-info/single-crate-baseline/q.rs b/tests/rustdoc-html/cross-crate-info/single-crate-baseline/q.rs index 439ab23de185d..b3e6010c1d64c 100644 --- a/tests/rustdoc-html/cross-crate-info/single-crate-baseline/q.rs +++ b/tests/rustdoc-html/cross-crate-info/single-crate-baseline/q.rs @@ -5,7 +5,7 @@ //@ has index.html //@ has index.html '//h1' 'List of all crates' //@ has index.html '//ul[@class="all-items"]//a[@href="q/index.html"]' 'q' -//@ has q/struct.Quebec.html +//@ has q/type.Quebec.html //@ hasraw search.index/name/*.js 'Quebec' // there's nothing cross-crate going on here diff --git a/tests/rustdoc-html/cross-crate-info/single-crate-no-index/q.rs b/tests/rustdoc-html/cross-crate-info/single-crate-no-index/q.rs index b3703658465a4..eaa4f35d5ff84 100644 --- a/tests/rustdoc-html/cross-crate-info/single-crate-no-index/q.rs +++ b/tests/rustdoc-html/cross-crate-info/single-crate-no-index/q.rs @@ -1,5 +1,5 @@ //@ build-aux-docs -//@ has q/struct.Quebec.html +//@ has q/type.Quebec.html //@ hasraw search.index/name/*.js 'Quebec' // there's nothing cross-crate going on here diff --git a/tests/rustdoc-html/cross-crate-info/write-docs-somewhere-else/e.rs b/tests/rustdoc-html/cross-crate-info/write-docs-somewhere-else/e.rs index 6ded19546b886..c04165209abff 100644 --- a/tests/rustdoc-html/cross-crate-info/write-docs-somewhere-else/e.rs +++ b/tests/rustdoc-html/cross-crate-info/write-docs-somewhere-else/e.rs @@ -1,9 +1,9 @@ //@ aux-build:f.rs //@ build-aux-docs -//@ has e/enum.Echo.html +//@ has e/type.Echo.html //@ !has f/trait.Foxtrot.html -//@ hasraw e/enum.Echo.html 'Foxtrot' -//@ hasraw trait.impl/f/trait.Foxtrot.js 'enum.Echo.html' +//@ hasraw e/type.Echo.html 'Foxtrot' +//@ hasraw trait.impl/f/trait.Foxtrot.js 'type.Echo.html' //@ !hasraw search.index/name/*.js 'Foxtrot' //@ hasraw search.index/name/*.js 'Echo' diff --git a/tests/rustdoc-html/cross-crate-links.rs b/tests/rustdoc-html/cross-crate-links.rs index b051d41cad4ba..48f90b83b3c9b 100644 --- a/tests/rustdoc-html/cross-crate-links.rs +++ b/tests/rustdoc-html/cross-crate-links.rs @@ -30,15 +30,15 @@ pub use all_item_types::foo_fn; #[doc(no_inline)] pub use all_item_types::FooTrait; -//@ has 'foo/index.html' '//a[@href="../all_item_types/struct.FooStruct.html"]' 'FooStruct' +//@ has 'foo/index.html' '//a[@href="../all_item_types/type.FooStruct.html"]' 'FooStruct' #[doc(no_inline)] pub use all_item_types::FooStruct; -//@ has 'foo/index.html' '//a[@href="../all_item_types/enum.FooEnum.html"]' 'FooEnum' +//@ has 'foo/index.html' '//a[@href="../all_item_types/type.FooEnum.html"]' 'FooEnum' #[doc(no_inline)] pub use all_item_types::FooEnum; -//@ has 'foo/index.html' '//a[@href="../all_item_types/union.FooUnion.html"]' 'FooUnion' +//@ has 'foo/index.html' '//a[@href="../all_item_types/type.FooUnion.html"]' 'FooUnion' #[doc(no_inline)] pub use all_item_types::FooUnion; diff --git a/tests/rustdoc-html/decl-line-wrapping-empty-arg-list.decl.html b/tests/rustdoc-html/decl-line-wrapping-empty-arg-list.decl.html index 12c6bc214a725..057b8f47b3a46 100644 --- a/tests/rustdoc-html/decl-line-wrapping-empty-arg-list.decl.html +++ b/tests/rustdoc-html/decl-line-wrapping-empty-arg-list.decl.html @@ -1 +1 @@ -
pub fn create() -> Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000
\ No newline at end of file +
pub fn create() -> Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000
\ No newline at end of file diff --git a/tests/rustdoc-html/decl-trailing-whitespace.declaration.html b/tests/rustdoc-html/decl-trailing-whitespace.declaration.html index 0cc3f0fa244e1..b888bade99e8d 100644 --- a/tests/rustdoc-html/decl-trailing-whitespace.declaration.html +++ b/tests/rustdoc-html/decl-trailing-whitespace.declaration.html @@ -2,16 +2,16 @@ // Required methods fn poll_write( self, - cx: &mut Option<String>, + cx: &mut Option<String>, buf: &mut [usize], - ) -> Option<Result<usize, Error>>; - fn poll_flush(self, cx: &mut Option<String>) -> Option<Result<(), Error>>; - fn poll_close(self, cx: &mut Option<String>) -> Option<Result<(), Error>>; + ) -> Option<Result<usize, Error>>; + fn poll_flush(self, cx: &mut Option<String>) -> Option<Result<(), Error>>; + fn poll_close(self, cx: &mut Option<String>) -> Option<Result<(), Error>>; // Provided method fn poll_write_vectored( self, - cx: &mut Option<String>, + cx: &mut Option<String>, bufs: &[usize], - ) -> Option<Result<usize, Error>> { ... } + ) -> Option<Result<usize, Error>> { ... } } \ No newline at end of file diff --git a/tests/rustdoc-html/default-trait-method.rs b/tests/rustdoc-html/default-trait-method.rs index 5a1d256e906e1..c39801e27cfdd 100644 --- a/tests/rustdoc-html/default-trait-method.rs +++ b/tests/rustdoc-html/default-trait-method.rs @@ -23,7 +23,7 @@ pub trait Item { fn xyzzy() {} } -//@ has default_trait_method/struct.Foo.html +//@ has default_trait_method/type.Foo.html pub struct Foo; impl Item for Foo { //@ has - '//*[@id="method.foo"]' 'default fn foo()' diff --git a/tests/rustdoc-html/deprecated-future-staged-api.rs b/tests/rustdoc-html/deprecated-future-staged-api.rs index 1bb44e2a5206f..15a41f30a3e41 100644 --- a/tests/rustdoc-html/deprecated-future-staged-api.rs +++ b/tests/rustdoc-html/deprecated-future-staged-api.rs @@ -3,7 +3,7 @@ //@ has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \ // 'Deprecation planned' -//@ has deprecated_future_staged_api/struct.S1.html '//*[@class="stab deprecated"]' \ +//@ has deprecated_future_staged_api/type.S1.html '//*[@class="stab deprecated"]' \ // 'Deprecating in 99.99.99: effectively never' #[deprecated(since = "99.99.99", note = "effectively never")] #[stable(feature = "deprecated_future_staged_api", since = "1.0.0")] @@ -11,7 +11,7 @@ pub struct S1; //@ has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \ // 'Deprecation planned' -//@ has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \ +//@ has deprecated_future_staged_api/type.S2.html '//*[@class="stab deprecated"]' \ // 'Deprecating in a future version: literally never' #[deprecated(since = "TBD", note = "literally never")] #[stable(feature = "deprecated_future_staged_api", since = "1.0.0")] diff --git a/tests/rustdoc-html/deprecated-future.rs b/tests/rustdoc-html/deprecated-future.rs index 8e669e43bf700..bb9a78337396f 100644 --- a/tests/rustdoc-html/deprecated-future.rs +++ b/tests/rustdoc-html/deprecated-future.rs @@ -1,6 +1,6 @@ //@ has deprecated_future/index.html '//*[@class="stab deprecated"]' \ // 'Deprecated' -//@ has deprecated_future/struct.S.html '//*[@class="stab deprecated"]' \ +//@ has deprecated_future/type.S.html '//*[@class="stab deprecated"]' \ // 'Deprecated since 99.99.99: effectively never' #[deprecated(since = "99.99.99", note = "effectively never")] pub struct S; diff --git a/tests/rustdoc-html/deprecated.rs b/tests/rustdoc-html/deprecated.rs index c7db816cffcfc..5ccd28dec6105 100644 --- a/tests/rustdoc-html/deprecated.rs +++ b/tests/rustdoc-html/deprecated.rs @@ -1,7 +1,7 @@ //@ has deprecated/index.html '//dt/span[@class="stab deprecated"]' 'Deprecated' //@ has - '//dd' 'Deprecated docs' -//@ has deprecated/struct.S.html '//*[@class="stab deprecated"]' \ +//@ has deprecated/type.S.html '//*[@class="stab deprecated"]' \ // 'Deprecated since 1.0.0: text' /// Deprecated docs #[deprecated(since = "1.0.0", note = "text")] @@ -11,27 +11,27 @@ pub struct S; /// Docs pub struct T; -//@ matches deprecated/struct.U.html '//*[@class="stab deprecated"]' \ +//@ matches deprecated/type.U.html '//*[@class="stab deprecated"]' \ // 'Deprecated since 1.0.0$' #[deprecated(since = "1.0.0")] pub struct U; -//@ matches deprecated/struct.V.html '//*[@class="stab deprecated"]' \ +//@ matches deprecated/type.V.html '//*[@class="stab deprecated"]' \ // 'Deprecated: text$' #[deprecated(note = "text")] pub struct V; -//@ matches deprecated/struct.W.html '//*[@class="stab deprecated"]' \ +//@ matches deprecated/type.W.html '//*[@class="stab deprecated"]' \ // 'Deprecated$' #[deprecated] pub struct W; -//@ matches deprecated/struct.X.html '//*[@class="stab deprecated"]' \ +//@ matches deprecated/type.X.html '//*[@class="stab deprecated"]' \ // 'Deprecated: shorthand reason: code$' #[deprecated = "shorthand reason: `code`"] pub struct X; -//@ matches deprecated/struct.Y.html '//*[@class="stab deprecated"]//p[1]' 'multiple' -//@ matches deprecated/struct.Y.html '//*[@class="stab deprecated"]//p[2]' 'paragraphs' +//@ matches deprecated/type.Y.html '//*[@class="stab deprecated"]//p[1]' 'multiple' +//@ matches deprecated/type.Y.html '//*[@class="stab deprecated"]//p[2]' 'paragraphs' #[deprecated = "multiple\n\nparagraphs"] pub struct Y; diff --git a/tests/rustdoc-html/deref-methods-19190-foreign-type.rs b/tests/rustdoc-html/deref-methods-19190-foreign-type.rs index 7ac0521eb296f..04e71ba1de633 100644 --- a/tests/rustdoc-html/deref-methods-19190-foreign-type.rs +++ b/tests/rustdoc-html/deref-methods-19190-foreign-type.rs @@ -11,6 +11,6 @@ impl Deref for Bar { fn deref(&self) -> &String { loop {} } } -//@ has issue_19190_2/struct.Bar.html +//@ has issue_19190_2/type.Bar.html //@ !has - '//*[@id="method.new"]' 'fn new() -> String' //@ has - '//*[@id="method.as_str"]' 'fn as_str(&self) -> &str' diff --git a/tests/rustdoc-html/deref-methods-19190-inline.rs b/tests/rustdoc-html/deref-methods-19190-inline.rs index 942edbd5aafab..7cee18c9f38df 100644 --- a/tests/rustdoc-html/deref-methods-19190-inline.rs +++ b/tests/rustdoc-html/deref-methods-19190-inline.rs @@ -9,17 +9,17 @@ extern crate issue_19190_3; use std::ops::Deref; use issue_19190_3::Baz; -//@ has issue_19190_3/struct.Foo.html +//@ has issue_19190_3/type.Foo.html //@ has - '//*[@id="method.as_str"]' 'fn as_str(&self) -> &str' //@ !has - '//*[@id="method.new"]' 'fn new() -> String' pub use issue_19190_3::Foo; -//@ has issue_19190_3/struct.Bar.html +//@ has issue_19190_3/type.Bar.html //@ has - '//*[@id="method.baz"]' 'fn baz(&self)' //@ !has - '//*[@id="method.static_baz"]' 'fn static_baz()' pub use issue_19190_3::Bar; -//@ has issue_19190_3/struct.MyBar.html +//@ has issue_19190_3/type.MyBar.html //@ has - '//*[@id="method.baz"]' 'fn baz(&self)' //@ !has - '//*[@id="method.static_baz"]' 'fn static_baz()' pub struct MyBar; diff --git a/tests/rustdoc-html/deref-methods-19190.rs b/tests/rustdoc-html/deref-methods-19190.rs index ea10ac3b6780c..bb09c31c584d2 100644 --- a/tests/rustdoc-html/deref-methods-19190.rs +++ b/tests/rustdoc-html/deref-methods-19190.rs @@ -16,7 +16,7 @@ impl Deref for Bar { fn deref(&self) -> &Foo { loop {} } } -//@ has issue_19190/struct.Bar.html +//@ has issue_19190/type.Bar.html //@ has - '//*[@id="method.foo"]//h4[@class="code-header"]' 'fn foo(&self)' //@ has - '//*[@id="method.foo"]' 'fn foo(&self)' //@ !has - '//*[@id="method.static_foo"]//h4[@class="code-header"]' 'fn static_foo()' diff --git a/tests/rustdoc-html/deref/deref-const-fn.rs b/tests/rustdoc-html/deref/deref-const-fn.rs index fa1e4730071b2..401671794125f 100644 --- a/tests/rustdoc-html/deref/deref-const-fn.rs +++ b/tests/rustdoc-html/deref/deref-const-fn.rs @@ -7,7 +7,7 @@ #![stable(feature = "rust1", since = "1.0.0")] -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' #[stable(feature = "rust1", since = "1.0.0")] pub struct Bar; @@ -24,7 +24,7 @@ pub struct Foo { value: Bar, } -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has - '//*[@id="method.len"]' 'pub fn len(&self) -> usize' //@ has - '//*[@id="method.len"]//span[@class="since"]' '1.0.0' //@ !has - '//*[@id="method.len"]//span[@class="since"]' '(const: 1.0.0)' diff --git a/tests/rustdoc-html/deref/deref-methods-24686-target.rs b/tests/rustdoc-html/deref/deref-methods-24686-target.rs index e019488ca8023..387d9c8aba3c6 100644 --- a/tests/rustdoc-html/deref/deref-methods-24686-target.rs +++ b/tests/rustdoc-html/deref/deref-methods-24686-target.rs @@ -13,7 +13,7 @@ impl Foo { // Note that the same href is used both on the method itself, // and on the sidebar items. -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//a[@href="#method.get_i32"]' 'get_i32' //@ !has - '//a[@href="#method.get_u32"]' 'get_u32' //@ count - '//ul[@class="block deref-methods"]//a' 1 diff --git a/tests/rustdoc-html/deref/deref-multiple-impl-blocks.rs b/tests/rustdoc-html/deref/deref-multiple-impl-blocks.rs index 2ce35627546a4..fa6e0c0165932 100644 --- a/tests/rustdoc-html/deref/deref-multiple-impl-blocks.rs +++ b/tests/rustdoc-html/deref/deref-multiple-impl-blocks.rs @@ -2,7 +2,7 @@ use std::ops::{Deref, DerefMut}; -//@ has foo/struct.Vec.html +//@ has foo/type.Vec.html //@ count - '//h2[@id="deref-methods-Slice"]' 1 //@ count - '//div[@id="deref-methods-Slice-1"]' 1 //@ count - '//div[@id="deref-methods-Slice-1"][@class="impl-items"]' 1 diff --git a/tests/rustdoc-html/deref/deref-mut-35169-2.rs b/tests/rustdoc-html/deref/deref-mut-35169-2.rs index 37462790f2e68..3a8aa4f068c83 100644 --- a/tests/rustdoc-html/deref/deref-mut-35169-2.rs +++ b/tests/rustdoc-html/deref/deref-mut-35169-2.rs @@ -26,7 +26,7 @@ impl DerefMut for Bar { fn deref_mut(&mut self) -> &mut Foo { loop {} } } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//*[@id="method.by_ref"]//h4[@class="code-header"]' 'fn by_ref(&self)' //@ has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)' //@ has - '//*[@id="method.by_explicit_ref"]//h4[@class="code-header"]' 'fn by_explicit_ref(self: &Foo)' diff --git a/tests/rustdoc-html/deref/deref-mut-35169.rs b/tests/rustdoc-html/deref/deref-mut-35169.rs index 07a3754f79559..36fcb1d9d7b7c 100644 --- a/tests/rustdoc-html/deref/deref-mut-35169.rs +++ b/tests/rustdoc-html/deref/deref-mut-35169.rs @@ -21,7 +21,7 @@ impl Deref for Bar { fn deref(&self) -> &Foo { loop {} } } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//*[@id="method.by_ref"]//h4[@class="code-header"]' 'fn by_ref(&self)' //@ has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)' //@ has - '//*[@id="method.by_explicit_ref"]//h4[@class="code-header"]' 'fn by_explicit_ref(self: &Foo)' diff --git a/tests/rustdoc-html/deref/deref-mut-methods.rs b/tests/rustdoc-html/deref/deref-mut-methods.rs index 83214ca3b8a0a..b35d0fad3040d 100644 --- a/tests/rustdoc-html/deref/deref-mut-methods.rs +++ b/tests/rustdoc-html/deref/deref-mut-methods.rs @@ -8,7 +8,7 @@ impl Foo { pub fn foo(&mut self) {} } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//*[@class="sidebar-elems"]//*[@class="block deref-methods"]//a[@href="#method.foo"]' 'foo' pub struct Bar { foo: Foo, diff --git a/tests/rustdoc-html/deref/deref-recursive-pathbuf.rs b/tests/rustdoc-html/deref/deref-recursive-pathbuf.rs index be6b18115035d..6db0113451ddf 100644 --- a/tests/rustdoc-html/deref/deref-recursive-pathbuf.rs +++ b/tests/rustdoc-html/deref/deref-recursive-pathbuf.rs @@ -2,7 +2,7 @@ // levels and across multiple crates. // For `Deref` on non-foreign types, look at `deref-recursive.rs`. -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has '-' '//*[@id="deref-methods-PathBuf"]' 'Methods from Deref' //@ has '-' '//*[@class="impl-items"]//*[@id="method.as_path"]' 'pub fn as_path(&self)' //@ has '-' '//*[@id="deref-methods-Path"]' 'Methods from Deref' diff --git a/tests/rustdoc-html/deref/deref-recursive.rs b/tests/rustdoc-html/deref/deref-recursive.rs index 604ce7a40c07e..0e7c6236e810c 100644 --- a/tests/rustdoc-html/deref/deref-recursive.rs +++ b/tests/rustdoc-html/deref/deref-recursive.rs @@ -2,7 +2,7 @@ // levels if needed. // For `Deref` on foreign types, look at `deref-recursive-pathbuf.rs`. -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has '-' '//*[@id="deref-methods-Bar"]' 'Methods from Deref' //@ has '-' '//*[@class="impl-items"]//*[@id="method.bar"]' 'pub fn bar(&self)' //@ has '-' '//*[@id="deref-methods-Baz"]' 'Methods from Deref' diff --git a/tests/rustdoc-html/deref/deref-slice-core.rs b/tests/rustdoc-html/deref/deref-slice-core.rs index 3a21c19ddd13a..58f384368ab86 100644 --- a/tests/rustdoc-html/deref/deref-slice-core.rs +++ b/tests/rustdoc-html/deref/deref-slice-core.rs @@ -5,7 +5,7 @@ use core::ops::Deref; -//@ has 'deref_slice_core/struct.MyArray.html' +//@ has 'deref_slice_core/type.MyArray.html' //@ has '-' '//*[@id="deref-methods-%5BT%5D"]' 'Methods from Deref' //@ has '-' '//*[@class="impl-items"]//*[@id="method.len"]' 'pub fn len(&self)' diff --git a/tests/rustdoc-html/deref/deref-to-primitive.rs b/tests/rustdoc-html/deref/deref-to-primitive.rs index 6fdc382b2213b..6d6ce2bba5d98 100644 --- a/tests/rustdoc-html/deref/deref-to-primitive.rs +++ b/tests/rustdoc-html/deref/deref-to-primitive.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has - '//*[@id="deref-methods-i32"]' 'Methods from Deref' //@ has - '//*[@id="deref-methods-i32-1"]//*[@id="associatedconstant.BITS"]/h4' \ // 'pub const BITS: u32 = u32::BITS' diff --git a/tests/rustdoc-html/deref/deref-typedef.rs b/tests/rustdoc-html/deref/deref-typedef.rs index 44324cc6f41c9..31d83809b28a2 100644 --- a/tests/rustdoc-html/deref/deref-typedef.rs +++ b/tests/rustdoc-html/deref/deref-typedef.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' //@ has '-' '//*[@id="deref-methods-FooJ"]' 'Methods from Deref' //@ has '-' '//*[@class="impl-items"]//*[@id="method.foo_a"]' 'pub fn foo_a(&self)' //@ has '-' '//*[@class="impl-items"]//*[@id="method.foo_b"]' 'pub fn foo_b(&self)' diff --git a/tests/rustdoc-html/deref/escape-deref-methods.rs b/tests/rustdoc-html/deref/escape-deref-methods.rs index 2e423640f6786..177585fd2fee1 100644 --- a/tests/rustdoc-html/deref/escape-deref-methods.rs +++ b/tests/rustdoc-html/deref/escape-deref-methods.rs @@ -26,7 +26,7 @@ impl Deref for TitleList { } } -//@ has foo/struct.TitleList.html +//@ has foo/type.TitleList.html //@ has - '//div[@class="sidebar-elems"]//h3' 'Methods from Deref>' impl DerefMut for TitleList { fn deref_mut(&mut self) -> &mut Self::Target { diff --git a/tests/rustdoc-html/deref/negative-deref-impl-128801.rs b/tests/rustdoc-html/deref/negative-deref-impl-128801.rs index 51be958c33bbb..6a6d8e68eb2bf 100644 --- a/tests/rustdoc-html/deref/negative-deref-impl-128801.rs +++ b/tests/rustdoc-html/deref/negative-deref-impl-128801.rs @@ -6,7 +6,7 @@ pub struct Source; -//@ has foo/struct.Source.html +//@ has foo/type.Source.html // Verify negative Deref impl is rendered in the main content. //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'impl !Deref for Source' diff --git a/tests/rustdoc-html/deref/recursive-deref-sidebar.rs b/tests/rustdoc-html/deref/recursive-deref-sidebar.rs index 0af5326f3dca3..86aa2c6f571e6 100644 --- a/tests/rustdoc-html/deref/recursive-deref-sidebar.rs +++ b/tests/rustdoc-html/deref/recursive-deref-sidebar.rs @@ -9,13 +9,13 @@ impl B { pub fn foo_b(&self) {} } pub struct C {} impl C { pub fn foo_c(&self) {} } -//@ has recursive_deref_sidebar/struct.A.html '//*[@class="sidebar-elems"]//section' 'foo_b' +//@ has recursive_deref_sidebar/type.A.html '//*[@class="sidebar-elems"]//section' 'foo_b' impl Deref for A { type Target = B; fn deref(&self) -> &B { todo!() } } -//@ has recursive_deref_sidebar/struct.A.html '//*[@class="sidebar-elems"]//section' 'foo_c' +//@ has recursive_deref_sidebar/type.A.html '//*[@class="sidebar-elems"]//section' 'foo_c' impl Deref for B { type Target = C; fn deref(&self) -> &C { todo!() } diff --git a/tests/rustdoc-html/deref/recursive-deref.rs b/tests/rustdoc-html/deref/recursive-deref.rs index 286abef382c00..532540635da15 100644 --- a/tests/rustdoc-html/deref/recursive-deref.rs +++ b/tests/rustdoc-html/deref/recursive-deref.rs @@ -9,7 +9,7 @@ impl C { pub fn c(&self) {} } -//@ has recursive_deref/struct.A.html '//h3[@class="code-header"]' 'impl Deref for A' +//@ has recursive_deref/type.A.html '//h3[@class="code-header"]' 'impl Deref for A' //@ has '-' '//*[@class="impl-items"]//*[@id="method.c"]' 'pub fn c(&self)' impl Deref for A { type Target = B; @@ -19,7 +19,7 @@ impl Deref for A { } } -//@ has recursive_deref/struct.B.html '//h3[@class="code-header"]' 'impl Deref for B' +//@ has recursive_deref/type.B.html '//h3[@class="code-header"]' 'impl Deref for B' //@ has '-' '//*[@class="impl-items"]//*[@id="method.c"]' 'pub fn c(&self)' impl Deref for B { type Target = C; @@ -29,7 +29,7 @@ impl Deref for B { } } -//@ has recursive_deref/struct.C.html '//h3[@class="code-header"]' 'impl Deref for C' +//@ has recursive_deref/type.C.html '//h3[@class="code-header"]' 'impl Deref for C' impl Deref for C { type Target = B; @@ -49,7 +49,7 @@ impl G { pub fn g() {} } -//@ has recursive_deref/struct.D.html '//h3[@class="code-header"]' 'impl Deref for D' +//@ has recursive_deref/type.D.html '//h3[@class="code-header"]' 'impl Deref for D' // We also check that `G::g` method isn't rendered because there is no `self` argument. //@ !has '-' '//*[@id="deref-methods-G"]' '' impl Deref for D { @@ -60,7 +60,7 @@ impl Deref for D { } } -//@ has recursive_deref/struct.E.html '//h3[@class="code-header"]' 'impl Deref for E' +//@ has recursive_deref/type.E.html '//h3[@class="code-header"]' 'impl Deref for E' // We also check that `G::g` method isn't rendered because there is no `self` argument. //@ !has '-' '//*[@id="deref-methods-G"]' '' impl Deref for E { @@ -71,7 +71,7 @@ impl Deref for E { } } -//@ has recursive_deref/struct.F.html '//h3[@class="code-header"]' 'impl Deref for F' +//@ has recursive_deref/type.F.html '//h3[@class="code-header"]' 'impl Deref for F' // We also check that `G::g` method isn't rendered because there is no `self` argument. //@ !has '-' '//*[@id="deref-methods-G"]' '' impl Deref for F { @@ -82,7 +82,7 @@ impl Deref for F { } } -//@ has recursive_deref/struct.G.html '//h3[@class="code-header"]' 'impl Deref for G' +//@ has recursive_deref/type.G.html '//h3[@class="code-header"]' 'impl Deref for G' impl Deref for G { type Target = E; @@ -100,7 +100,7 @@ impl I { pub fn i() {} } -//@ has recursive_deref/struct.H.html '//h3[@class="code-header"]' 'impl Deref for H' +//@ has recursive_deref/type.H.html '//h3[@class="code-header"]' 'impl Deref for H' //@ !has '-' '//*[@id="deref-methods-I"]' '' impl Deref for H { type Target = I; @@ -110,7 +110,7 @@ impl Deref for H { } } -//@ has recursive_deref/struct.I.html '//h3[@class="code-header"]' 'impl Deref for I' +//@ has recursive_deref/type.I.html '//h3[@class="code-header"]' 'impl Deref for I' impl Deref for I { type Target = H; diff --git a/tests/rustdoc-html/deref/sidebar-links-deref-100679.rs b/tests/rustdoc-html/deref/sidebar-links-deref-100679.rs index d0c37529487eb..b0a9d0e54b887 100644 --- a/tests/rustdoc-html/deref/sidebar-links-deref-100679.rs +++ b/tests/rustdoc-html/deref/sidebar-links-deref-100679.rs @@ -12,7 +12,7 @@ impl std::ops::Deref for Vec { } } -//@ has foo/struct.Vec.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty"]' \ +//@ has foo/type.Vec.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty"]' \ // "is_empty" impl Vec { pub fn is_empty(&self) -> bool { @@ -20,9 +20,9 @@ impl Vec { } } -//@ has foo/struct.Vec.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty-1"]' \ +//@ has foo/type.Vec.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty-1"]' \ // "is_empty" -//@ has foo/struct.Slice.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty"]' \ +//@ has foo/type.Slice.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty"]' \ // "is_empty" impl Slice { pub fn is_empty(&self) -> bool { diff --git a/tests/rustdoc-html/deref/sidebar-links-deref-chain.rs b/tests/rustdoc-html/deref/sidebar-links-deref-chain.rs index 2b67228f5de30..d71c342599b5a 100644 --- a/tests/rustdoc-html/deref/sidebar-links-deref-chain.rs +++ b/tests/rustdoc-html/deref/sidebar-links-deref-chain.rs @@ -15,7 +15,7 @@ impl std::ops::Deref for S0 { type Target = S1; fn deref(&self) -> &S1 { &S1 } } impl std::ops::Deref for S1 { type Target = S2; fn deref(&self) -> &S2 { &S2 } } impl std::ops::Deref for S2 { type Target = S3; fn deref(&self) -> &S3 { &S3 } } -//@ has foo/struct.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo"]' 'foo' -//@ has foo/struct.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo-1"]' 'foo' -//@ has foo/struct.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo-2"]' 'foo' -//@ has foo/struct.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo-3"]' 'foo' +//@ has foo/type.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo"]' 'foo' +//@ has foo/type.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo-1"]' 'foo' +//@ has foo/type.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo-2"]' 'foo' +//@ has foo/type.S0.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.foo-3"]' 'foo' diff --git a/tests/rustdoc-html/deref/sidebar-links-duplicate-impls-33054.rs b/tests/rustdoc-html/deref/sidebar-links-duplicate-impls-33054.rs index 84637a6aea3d6..6feb4403d9c5d 100644 --- a/tests/rustdoc-html/deref/sidebar-links-duplicate-impls-33054.rs +++ b/tests/rustdoc-html/deref/sidebar-links-duplicate-impls-33054.rs @@ -2,7 +2,7 @@ // https://github.com/rust-lang/rust/issues/100679 #![crate_name="foo"] -//@ has foo/impls/struct.Foo.html +//@ has foo/impls/type.Foo.html //@ has - '//h3[@class="code-header"]' 'impl Foo' //@ has - '//h3[@class="code-header"]' 'impl Bar for Foo' //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1 diff --git a/tests/rustdoc-html/doc-attr-comment-mix-42760.rs b/tests/rustdoc-html/doc-attr-comment-mix-42760.rs index c457ac74d8d1b..190a53151168e 100644 --- a/tests/rustdoc-html/doc-attr-comment-mix-42760.rs +++ b/tests/rustdoc-html/doc-attr-comment-mix-42760.rs @@ -3,7 +3,7 @@ #![allow(rustdoc::invalid_rust_codeblocks)] -//@ has foo/struct.NonGen.html +//@ has foo/type.NonGen.html //@ has - '//h2' 'Example' /// Item docs. diff --git a/tests/rustdoc-html/doc-cfg/cfg-attr-proc-macro.rs b/tests/rustdoc-html/doc-cfg/cfg-attr-proc-macro.rs index d4f44a333bd25..55519fdf30254 100644 --- a/tests/rustdoc-html/doc-cfg/cfg-attr-proc-macro.rs +++ b/tests/rustdoc-html/doc-cfg/cfg-attr-proc-macro.rs @@ -7,7 +7,7 @@ extern crate cfg_attr_proc_macro; pub trait Trait {} -//@ has 'foo/struct.B.html' +//@ has 'foo/type.B.html' //@ has - '//*[@id="impl-Trait-for-B"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on non-crate feature boop only.' #[cfg_attr(not(feature = "boop"), derive(cfg_attr_proc_macro::Yop))] diff --git a/tests/rustdoc-html/doc-cfg/cfg-attr.rs b/tests/rustdoc-html/doc-cfg/cfg-attr.rs index 96338d3c40c0e..165f97e069622 100644 --- a/tests/rustdoc-html/doc-cfg/cfg-attr.rs +++ b/tests/rustdoc-html/doc-cfg/cfg-attr.rs @@ -4,7 +4,7 @@ #![crate_name = "foo"] #![feature(doc_cfg)] -//@ has 'foo/struct.Test.html' +//@ has 'foo/type.Test.html' //@ has - '//*[@id="impl-Debug-for-Test"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on non-crate feature debug only.' //@ has - '//*[@id="impl-Clone-for-Test"]/*[@class="item-info"]/*[@class="stab portability"]' \ diff --git a/tests/rustdoc-html/doc-cfg/doc-auto-cfg-2.rs b/tests/rustdoc-html/doc-cfg/doc-auto-cfg-2.rs index a33c5830157fb..a12f5b343bb78 100644 --- a/tests/rustdoc-html/doc-cfg/doc-auto-cfg-2.rs +++ b/tests/rustdoc-html/doc-cfg/doc-auto-cfg-2.rs @@ -13,21 +13,21 @@ //@ count - '//*[@title="Available on non-crate feature `hidden` only"]' 2 #[cfg(not(feature = "hidden"))] pub mod m { - //@ count 'foo/m/struct.A.html' '//*[@class="stab portability"]' 0 + //@ count 'foo/m/type.A.html' '//*[@class="stab portability"]' 0 pub struct A; //@ has 'foo/m/inner/index.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.' #[doc(auto_cfg(show(feature, values("hidden"))))] pub mod inner { - //@ has 'foo/m/inner/struct.B.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.' + //@ has 'foo/m/inner/type.B.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.' pub struct B; - //@ count 'foo/m/inner/struct.A.html' '//*[@class="stab portability"]' 0 + //@ count 'foo/m/inner/type.A.html' '//*[@class="stab portability"]' 0 #[doc(auto_cfg(hide(feature, values("hidden"))))] pub struct A; } - //@ has 'foo/m/struct.B.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.' + //@ has 'foo/m/type.B.html' '//*[@class="stab portability"]' 'Available on non-crate feature hidden only.' #[doc(auto_cfg(show(feature, values("hidden"))))] pub struct B; } @@ -38,11 +38,11 @@ pub mod m { #[doc(auto_cfg = false)] pub mod n { // Should not have `moustache` listed. - //@ count 'foo/n/struct.X.html' '//*[@class="stab portability"]' 0 + //@ count 'foo/n/type.X.html' '//*[@class="stab portability"]' 0 pub struct X; // Should re-enable `auto_cfg` and make `moustache` listed. - //@ has 'foo/n/struct.Y.html' '//*[@class="stab portability"]' \ + //@ has 'foo/n/type.Y.html' '//*[@class="stab portability"]' \ // 'Available on non-crate feature moustache only.' #[doc(auto_cfg)] pub struct Y; @@ -53,13 +53,13 @@ pub mod n { // 'Available on non-crate feature moustache only.' #[doc(auto_cfg = true)] pub mod inner { - //@ has 'foo/n/inner/struct.Y.html' '//*[@class="stab portability"]' \ + //@ has 'foo/n/inner/type.Y.html' '//*[@class="stab portability"]' \ // 'Available on non-crate feature moustache only.' pub struct Y; } // Should re-enable `auto_cfg` and make `moustache` listed. - //@ has 'foo/n/struct.Z.html' '//*[@class="stab portability"]' \ + //@ has 'foo/n/type.Z.html' '//*[@class="stab portability"]' \ // 'Available on non-crate feature moustache only.' #[doc(auto_cfg(hide(feature, values("hidden"))))] pub struct Z; @@ -70,7 +70,7 @@ pub mod n { // 'Available on non-crate feature pistache only.' #[doc(cfg(not(feature = "pistache")))] pub mod o { - //@ has 'foo/o/struct.A.html' '//*[@class="stab portability"]' \ + //@ has 'foo/o/type.A.html' '//*[@class="stab portability"]' \ // 'Available on non-crate feature pistache and non-crate feature tarte only.' #[doc(cfg(not(feature = "tarte")))] pub struct A; diff --git a/tests/rustdoc-html/doc-cfg/doc-auto-cfg-public-in-private.rs b/tests/rustdoc-html/doc-cfg/doc-auto-cfg-public-in-private.rs index b78e3f1b932c2..c2eb2c9e9bdf7 100644 --- a/tests/rustdoc-html/doc-cfg/doc-auto-cfg-public-in-private.rs +++ b/tests/rustdoc-html/doc-cfg/doc-auto-cfg-public-in-private.rs @@ -9,7 +9,7 @@ pub struct X; #[cfg(not(feature = "blob"))] fn foo() { impl X { - //@ has 'foo/struct.X.html' + //@ has 'foo/type.X.html' //@ has - '//*[@class="stab portability"]' 'Available on non-crate feature blob only.' pub fn bar() {} } diff --git a/tests/rustdoc-html/doc-cfg/doc-cfg-hide.rs b/tests/rustdoc-html/doc-cfg/doc-cfg-hide.rs index 72c33d209c7a1..4ad5a473ea164 100644 --- a/tests/rustdoc-html/doc-cfg/doc-cfg-hide.rs +++ b/tests/rustdoc-html/doc-cfg/doc-cfg-hide.rs @@ -3,20 +3,20 @@ #![doc(auto_cfg(hide(feature, values("solecism"))))] -//@ has 'oud/struct.Solecism.html' +//@ has 'oud/type.Solecism.html' //@ count - '//*[@class="stab portability"]' 0 //@ compile-flags:--cfg feature="solecism" #[cfg(feature = "solecism")] pub struct Solecism; -//@ has 'oud/struct.Scribacious.html' +//@ has 'oud/type.Scribacious.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate feature solecism' #[cfg(feature = "solecism")] #[doc(cfg(feature = "solecism"))] pub struct Scribacious; -//@ has 'oud/struct.Hyperdulia.html' +//@ has 'oud/type.Hyperdulia.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate features hyperdulia only' //@ compile-flags:--cfg feature="hyperdulia" @@ -24,7 +24,7 @@ pub struct Scribacious; #[cfg(feature = "hyperdulia")] pub struct Hyperdulia; -//@ has 'oud/struct.Oystercatcher.html' +//@ has 'oud/type.Oystercatcher.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate features oystercatcher only' //@ compile-flags:--cfg feature="oystercatcher" diff --git a/tests/rustdoc-html/doc-cfg/doc-cfg-implicit-gate.rs b/tests/rustdoc-html/doc-cfg/doc-cfg-implicit-gate.rs index 9ae8b8fca4f7a..a2216ad892b85 100644 --- a/tests/rustdoc-html/doc-cfg/doc-cfg-implicit-gate.rs +++ b/tests/rustdoc-html/doc-cfg/doc-cfg-implicit-gate.rs @@ -2,7 +2,7 @@ #![feature(doc_cfg)] #![crate_name = "xenogenous"] -//@ has 'xenogenous/struct.Worricow.html' +//@ has 'xenogenous/type.Worricow.html' //@ count - '//*[@class="stab portability"]' 1 #[cfg(feature = "worricow")] pub struct Worricow; diff --git a/tests/rustdoc-html/doc-cfg/doc-cfg-implicit.rs b/tests/rustdoc-html/doc-cfg/doc-cfg-implicit.rs index c092675ee5cf9..9590d8a9a0774 100644 --- a/tests/rustdoc-html/doc-cfg/doc-cfg-implicit.rs +++ b/tests/rustdoc-html/doc-cfg/doc-cfg-implicit.rs @@ -1,21 +1,21 @@ #![crate_name = "funambulism"] #![feature(doc_cfg)] -//@ has 'funambulism/struct.Disorbed.html' +//@ has 'funambulism/type.Disorbed.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate feature disorbed' //@ compile-flags:--cfg feature="disorbed" #[cfg(feature = "disorbed")] pub struct Disorbed; -//@ has 'funambulism/struct.Aesthesia.html' +//@ has 'funambulism/type.Aesthesia.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate feature aesthesia' //@ compile-flags:--cfg feature="aesthesia" #[doc(cfg(feature = "aesthesia"))] pub struct Aesthesia; -//@ has 'funambulism/struct.Pliothermic.html' +//@ has 'funambulism/type.Pliothermic.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate feature pliothermic' //@ compile-flags:--cfg feature="epopoeist" @@ -23,7 +23,7 @@ pub struct Aesthesia; #[doc(cfg(feature = "pliothermic"))] pub struct Pliothermic; -//@ has 'funambulism/struct.Simillimum.html' +//@ has 'funambulism/type.Simillimum.html' //@ count - '//*[@class="stab portability"]' 0 //@ compile-flags:--cfg feature="simillimum" #[cfg(feature = "simillimum")] diff --git a/tests/rustdoc-html/doc-cfg/doc-cfg-simplification.rs b/tests/rustdoc-html/doc-cfg/doc-cfg-simplification.rs index d984b48ff9957..edb080b1d3f6d 100644 --- a/tests/rustdoc-html/doc-cfg/doc-cfg-simplification.rs +++ b/tests/rustdoc-html/doc-cfg/doc-cfg-simplification.rs @@ -61,12 +61,12 @@ pub mod ratel { #[doc(cfg(feature = "thionic"))] pub type Thionic = (); - //@ has 'globuliferous/ratel/struct.Eventration.html' + //@ has 'globuliferous/ratel/type.Eventration.html' //@ count - '//*[@class="stab portability"]' 1 //@ matches - '//*[@class="stab portability"]' 'crate feature ratel' pub struct Eventration; - //@ has 'globuliferous/ratel/struct.Zincic.html' + //@ has 'globuliferous/ratel/type.Zincic.html' //@ count - '//*[@class="stab portability"]' 2 //@ matches - '//*[@class="stab portability"]' 'crate features ratel and zincic' //@ matches - '//*[@class="stab portability"]' 'crate feature rutherford' @@ -78,7 +78,7 @@ pub mod ratel { pub rutherford: (), } - //@ has 'globuliferous/ratel/enum.Cosmotellurian.html' + //@ has 'globuliferous/ratel/type.Cosmotellurian.html' //@ count - '//*[@class="stab portability"]' 10 //@ matches - '//*[@class="stab portability"]' 'crate features cosmotellurian and ratel' //@ matches - '//*[@class="stab portability"]' 'crate feature biotaxy' diff --git a/tests/rustdoc-html/doc-cfg/doc-cfg-traits.rs b/tests/rustdoc-html/doc-cfg/doc-cfg-traits.rs index 1256a7ae2c171..c227e5a56e139 100644 --- a/tests/rustdoc-html/doc-cfg/doc-cfg-traits.rs +++ b/tests/rustdoc-html/doc-cfg/doc-cfg-traits.rs @@ -72,7 +72,7 @@ impl Jurisconsult for T {} #[doc(cfg(feature = "unit"))] impl Jurisconsult for () {} -//@ has 'myrmecophagous/struct.Ultimogeniture.html' +//@ has 'myrmecophagous/type.Ultimogeniture.html' //@ count - '//*[@class="stab portability"]' 8 // //@ matches - '//*[@class="stab portability"]' 'crate feature zibib' @@ -96,7 +96,7 @@ impl Jurisconsult for Ultimogeniture {} #[doc(cfg(feature = "copy"))] impl Copy for Ultimogeniture {} -//@ has 'myrmecophagous/struct.Quarter.html' +//@ has 'myrmecophagous/type.Quarter.html' //@ count - '//*[@class="stab portability"]' 9 //@ matches - '//*[@class="stab portability"]' 'crate feature quarter' // diff --git a/tests/rustdoc-html/doc-cfg/doc-cfg.rs b/tests/rustdoc-html/doc-cfg/doc-cfg.rs index 730c7e41decb7..1ea8f0d6356ef 100644 --- a/tests/rustdoc-html/doc-cfg/doc-cfg.rs +++ b/tests/rustdoc-html/doc-cfg/doc-cfg.rs @@ -1,6 +1,6 @@ #![feature(doc_cfg)] -//@ has doc_cfg/struct.Portable.html +//@ has doc_cfg/type.Portable.html //@ !has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' '' //@ has - '//*[@id="method.unix_and_arm_only_function"]' 'fn unix_and_arm_only_function()' //@ has - '//*[@class="stab portability"]' 'Available on ARM and Unix only.' diff --git a/tests/rustdoc-html/doc-cfg/doc_auto_cfg_reexports.rs b/tests/rustdoc-html/doc-cfg/doc_auto_cfg_reexports.rs index ecfe9aabcfed4..cc80af99b5c0b 100644 --- a/tests/rustdoc-html/doc-cfg/doc_auto_cfg_reexports.rs +++ b/tests/rustdoc-html/doc-cfg/doc_auto_cfg_reexports.rs @@ -5,7 +5,7 @@ // Check with `std` item. //@ has 'foo/index.html' '//*[@class="stab portability"]' 'Non-moustache' -//@ has 'foo/struct.C.html' '//*[@class="stab portability"]' \ +//@ has 'foo/type.C.html' '//*[@class="stab portability"]' \ // 'Available on non-crate feature moustache only.' #[cfg(not(feature = "moustache"))] pub use std::cell::RefCell as C; @@ -16,7 +16,7 @@ mod x { } //@ has 'foo/index.html' '//*[@class="stab portability"]' 'Non-pistache' -//@ has 'foo/struct.B.html' '//*[@class="stab portability"]' \ +//@ has 'foo/type.B.html' '//*[@class="stab portability"]' \ // 'Available on non-crate feature pistache only.' #[cfg(not(feature = "pistache"))] pub use crate::x::B; diff --git a/tests/rustdoc-html/doc-cfg/duplicate-cfg.rs b/tests/rustdoc-html/doc-cfg/duplicate-cfg.rs index 3cd8b626558b7..fb41fe48bdb7c 100644 --- a/tests/rustdoc-html/doc-cfg/duplicate-cfg.rs +++ b/tests/rustdoc-html/doc-cfg/duplicate-cfg.rs @@ -5,7 +5,7 @@ //@ matches '-' '//dt//*[@class="stab portability"]' '^sync$' //@ has '-' '//dt//*[@class="stab portability"]/@title' 'Available on crate feature `sync` only' -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has '-' '//*[@class="stab portability"]' 'sync' #[doc(cfg(feature = "sync"))] #[doc(cfg(feature = "sync"))] @@ -16,7 +16,7 @@ pub struct Foo; //@ has '-' '//*[@class="stab portability"]' 'Available on crate feature sync only.' #[doc(cfg(feature = "sync"))] pub mod bar { - //@ has 'foo/bar/struct.Bar.html' + //@ has 'foo/bar/type.Bar.html' //@ has '-' '//*[@class="stab portability"]' 'Available on crate feature sync only.' #[doc(cfg(feature = "sync"))] pub struct Bar; @@ -26,7 +26,7 @@ pub mod bar { //@ has '-' '//*[@class="stab portability"]' 'Available on crate features send and sync only.' #[doc(cfg(all(feature = "sync", feature = "send")))] pub mod baz { - //@ has 'foo/baz/struct.Baz.html' + //@ has 'foo/baz/type.Baz.html' //@ has '-' '//*[@class="stab portability"]' 'Available on crate features send and sync only.' #[doc(cfg(feature = "sync"))] pub struct Baz; @@ -36,7 +36,7 @@ pub mod baz { //@ has '-' '//*[@class="stab portability"]' 'Available on crate feature sync only.' #[doc(cfg(feature = "sync"))] pub mod qux { - //@ has 'foo/qux/struct.Qux.html' + //@ has 'foo/qux/type.Qux.html' //@ has '-' '//*[@class="stab portability"]' 'Available on crate features send and sync only.' #[doc(cfg(all(feature = "sync", feature = "send")))] pub struct Qux; @@ -46,7 +46,7 @@ pub mod qux { //@ has '-' '//*[@class="stab portability"]' 'Available on foo and crate feature send and crate feature sync only.' #[doc(cfg(all(feature = "sync", feature = "send", foo)))] pub mod quux { - //@ has 'foo/quux/struct.Quux.html' + //@ has 'foo/quux/type.Quux.html' //@ has '-' '//*[@class="stab portability"]' 'Available on bar and foo and crate feature send and crate feature sync only.' #[doc(cfg(all(feature = "send", feature = "sync", bar)))] pub struct Quux; diff --git a/tests/rustdoc-html/doc-cfg/mutually-exclusive-cfg-item.rs b/tests/rustdoc-html/doc-cfg/mutually-exclusive-cfg-item.rs index d168bcdf0b41a..42ab46abea650 100644 --- a/tests/rustdoc-html/doc-cfg/mutually-exclusive-cfg-item.rs +++ b/tests/rustdoc-html/doc-cfg/mutually-exclusive-cfg-item.rs @@ -8,7 +8,7 @@ pub struct S; impl S { - //@ has 'foo/struct.S.html' + //@ has 'foo/type.S.html' //@ count - '//*[@id="method.new"]/..//*[@class="stab portability"]' 0 #[doc(auto_cfg = false)] #[cfg(panic = "unwind")] diff --git a/tests/rustdoc-html/doc-cfg/reexports.rs b/tests/rustdoc-html/doc-cfg/reexports.rs index 25f40ae648050..f1ca1dcd575b9 100644 --- a/tests/rustdoc-html/doc-cfg/reexports.rs +++ b/tests/rustdoc-html/doc-cfg/reexports.rs @@ -6,16 +6,16 @@ #![feature(doc_cfg)] #![crate_name = "foo"] -//@ has 'foo/struct.FlatBanana.html' +//@ has 'foo/type.FlatBanana.html' //@ has - '//*[@class="item-info"]/*[@class="stab portability"]' 'Available on non-crate feature banana and non-crate feature yoyo only.' -//@ has 'foo/struct.SubBanana.html' +//@ has 'foo/type.SubBanana.html' //@ has - '//*[@class="item-info"]/*[@class="stab portability"]' 'Available on non-crate feature ananas and non-crate feature banana and non-crate feature yoyo only.' #[cfg(not(feature = "yoyo"))] pub use self::banana::*; -//@ has 'foo/struct.Yolo.html' +//@ has 'foo/type.Yolo.html' //@ has - '//*[@class="item-info"]/*[@class="stab portability"]' 'Available on non-crate feature ananas and non-crate feature banana only.' pub use self::banana::SubBanana as Yolo; diff --git a/tests/rustdoc-html/doc-cfg/trait-impls-manual.rs b/tests/rustdoc-html/doc-cfg/trait-impls-manual.rs index 890c484c1e1de..f512cd24686f3 100644 --- a/tests/rustdoc-html/doc-cfg/trait-impls-manual.rs +++ b/tests/rustdoc-html/doc-cfg/trait-impls-manual.rs @@ -22,7 +22,7 @@ pub trait Foo { pub struct X; -//@ has 'foo/struct.X.html' +//@ has 'foo/type.X.html' //@ count - '//*[@id="impl-Bob-for-X"]' 1 //@ count - '//*[@id="impl-Bob-for-X"]/*[@class="item-info"]' 1 //@ count - '//*[@id="impl-Trait-for-X"]' 1 @@ -60,7 +60,7 @@ mod imp3 { pub struct Y; -//@ has 'foo/struct.Y.html' +//@ has 'foo/type.Y.html' //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]' 1 //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]/*[@class="item-info"]' 0 #[doc(cfg(any(target_pointer_width = "64", target_arch = "wasm32")))] @@ -71,7 +71,7 @@ mod imp4 { pub struct Z; -//@ has 'foo/struct.Z.html' +//@ has 'foo/type.Z.html' //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]' 1 //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]/*[@class="item-info"]' 0 #[doc(cfg(any(target_pointer_width = "64", target_arch = "wasm32")))] @@ -83,7 +83,7 @@ mod imp5 { // The "witness" which has the item info. pub struct W; -//@ has 'foo/struct.W.html' +//@ has 'foo/type.W.html' //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]' 1 //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]/*[@class="item-info"]' 1 #[doc(cfg(any(target_pointer_width = "64", target_arch = "wasm32")))] diff --git a/tests/rustdoc-html/doc-cfg/trait-impls.rs b/tests/rustdoc-html/doc-cfg/trait-impls.rs index 4242e57bf434f..39bc7dae8546d 100644 --- a/tests/rustdoc-html/doc-cfg/trait-impls.rs +++ b/tests/rustdoc-html/doc-cfg/trait-impls.rs @@ -25,7 +25,7 @@ pub trait Foo { pub struct X; -//@ has 'foo/struct.X.html' +//@ has 'foo/type.X.html' //@ count - '//*[@id="impl-Bob-for-X"]' 1 //@ count - '//*[@id="impl-Bob-for-X"]/*[@class="item-info"]' 0 //@ count - '//*[@id="impl-Trait-for-X"]' 1 @@ -63,7 +63,7 @@ mod imp3 { pub struct Y; -//@ has 'foo/struct.Y.html' +//@ has 'foo/type.Y.html' //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]' 1 //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]/*[@class="item-info"]' 0 #[cfg(any(target_pointer_width = "64", target_arch = "wasm32"))] @@ -74,7 +74,7 @@ mod imp4 { pub struct Z; -//@ has 'foo/struct.Z.html' +//@ has 'foo/type.Z.html' //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]' 1 //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]/*[@class="item-info"]' 0 #[cfg(any(target_pointer_width = "64", target_arch = "wasm32"))] @@ -86,7 +86,7 @@ mod imp5 { // The "witness" which has the item info. pub struct W; -//@ has 'foo/struct.W.html' +//@ has 'foo/type.W.html' //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]' 1 //@ count - '//*[@id="implementations-list"]//*[@class="impl-items"]//*[@class="item-info"]' 1 #[cfg(any(target_pointer_width = "64", target_arch = "wasm32"))] diff --git a/tests/rustdoc-html/doc-hidden-method-13698.rs b/tests/rustdoc-html/doc-hidden-method-13698.rs index 5c0ad18ee2989..602624f361e4f 100644 --- a/tests/rustdoc-html/doc-hidden-method-13698.rs +++ b/tests/rustdoc-html/doc-hidden-method-13698.rs @@ -7,7 +7,7 @@ extern crate issue_13698; pub struct Foo; -//@ !has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo' +//@ !has issue_13698/type.Foo.html '//*[@id="method.foo"]' 'fn foo' impl issue_13698::Foo for Foo {} pub trait Bar { @@ -15,5 +15,5 @@ pub trait Bar { fn bar(&self) {} } -//@ !has issue_13698/struct.Foo.html '//*[@id="method.bar"]' 'fn bar' +//@ !has issue_13698/type.Foo.html '//*[@id="method.bar"]' 'fn bar' impl Bar for Foo {} diff --git a/tests/rustdoc-html/double-hyphen-to-dash.rs b/tests/rustdoc-html/double-hyphen-to-dash.rs index c14acd065cde0..040d2805e1ab5 100644 --- a/tests/rustdoc-html/double-hyphen-to-dash.rs +++ b/tests/rustdoc-html/double-hyphen-to-dash.rs @@ -3,7 +3,7 @@ #![crate_name = "foo"] //@ has 'foo/index.html' '//dd' '–' -//@ has 'foo/struct.Bar.html' '//*[@class="docblock"]' '–' +//@ has 'foo/type.Bar.html' '//*[@class="docblock"]' '–' /// -- pub struct Bar; diff --git a/tests/rustdoc-html/double-quote-escape.rs b/tests/rustdoc-html/double-quote-escape.rs index 9c8fb8fc6daa7..bce8125cf8537 100644 --- a/tests/rustdoc-html/double-quote-escape.rs +++ b/tests/rustdoc-html/double-quote-escape.rs @@ -6,6 +6,6 @@ pub trait Foo { pub struct Bar; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//*[@class="sidebar-elems"]//section//a[@href="#impl-Foo%3Cunsafe+extern+%22C%22+fn()%3E-for-Bar"]' 'Foo' impl Foo for Bar {} diff --git a/tests/rustdoc-html/duplicate-flags.rs b/tests/rustdoc-html/duplicate-flags.rs index 230eedfba62e2..e7834f2dc362f 100644 --- a/tests/rustdoc-html/duplicate-flags.rs +++ b/tests/rustdoc-html/duplicate-flags.rs @@ -1,4 +1,4 @@ //@ compile-flags: --document-private-items --document-private-items -//@ has duplicate_flags/struct.Private.html +//@ has duplicate_flags/type.Private.html struct Private; diff --git a/tests/rustdoc-html/dyn-compatibility.rs b/tests/rustdoc-html/dyn-compatibility.rs index 2d13c8a88bfdb..4e31ba0695313 100644 --- a/tests/rustdoc-html/dyn-compatibility.rs +++ b/tests/rustdoc-html/dyn-compatibility.rs @@ -21,7 +21,7 @@ pub trait DynCompatible { fn foo(&self); } -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ count - '//*[@class="dyn-compatibility-info"]' 0 //@ count - '//*[@id="dyn-compatibility"]' 0 pub struct Foo; diff --git a/tests/rustdoc-html/early-unindent.rs b/tests/rustdoc-html/early-unindent.rs index 33342aaee0e1e..7214d2f1b6309 100644 --- a/tests/rustdoc-html/early-unindent.rs +++ b/tests/rustdoc-html/early-unindent.rs @@ -6,8 +6,8 @@ pub mod app { pub struct S; impl S { - //@ has 'foo/app/struct.S.html' - //@ has - '//a[@href="../enums/enum.Foo.html#method.by_name"]' 'Foo::by_name' + //@ has 'foo/app/type.S.html' + //@ has - '//a[@href="../enums/type.Foo.html#method.by_name"]' 'Foo::by_name' /** Doc comment hello! [`Foo::by_name`](`crate::enums::Foo::by_name`). */ diff --git a/tests/rustdoc-html/empty-section.rs b/tests/rustdoc-html/empty-section.rs index 1e6e725a5a7b9..0323959599066 100644 --- a/tests/rustdoc-html/empty-section.rs +++ b/tests/rustdoc-html/empty-section.rs @@ -3,7 +3,7 @@ pub struct Foo; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ !hasraw - 'Auto Trait Implementations' // Manually un-implement all auto traits for Foo: impl !Send for Foo {} diff --git a/tests/rustdoc-html/empty-tuple-struct-118180.rs b/tests/rustdoc-html/empty-tuple-struct-118180.rs index 614857ad5aeab..e003e5a0e8374 100644 --- a/tests/rustdoc-html/empty-tuple-struct-118180.rs +++ b/tests/rustdoc-html/empty-tuple-struct-118180.rs @@ -1,12 +1,12 @@ // https://github.com/rust-lang/rust/issues/118180 #![crate_name="foo"] -//@ has foo/enum.Enum.html +//@ has foo/type.Enum.html pub enum Enum { //@ has - '//*[@id="variant.Empty"]//h3' 'Empty()' Empty(), } -//@ has foo/struct.Empty.html +//@ has foo/type.Empty.html //@ has - '//pre/code' 'Empty()' pub struct Empty(); diff --git a/tests/rustdoc-html/enum/enum-headings.rs b/tests/rustdoc-html/enum/enum-headings.rs index 6deabf1cd9a91..f17bdbf70855d 100644 --- a/tests/rustdoc-html/enum/enum-headings.rs +++ b/tests/rustdoc-html/enum/enum-headings.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -//@ has foo/enum.Token.html +//@ has foo/type.Token.html /// A token! /// # First /// Some following text... diff --git a/tests/rustdoc-html/enum/enum-non-exhaustive-108925.rs b/tests/rustdoc-html/enum/enum-non-exhaustive-108925.rs index ea2462449d2b7..fa69e8c38ab54 100644 --- a/tests/rustdoc-html/enum/enum-non-exhaustive-108925.rs +++ b/tests/rustdoc-html/enum/enum-non-exhaustive-108925.rs @@ -1,7 +1,7 @@ // https://github.com/rust-lang/rust/issues/108925 #![crate_name="foo"] -//@ has foo/enum.MyThing.html +//@ has foo/type.MyThing.html //@ has - '//code' 'Shown' //@ !has - '//code' 'NotShown' //@ !has - '//code' '// some variants omitted' diff --git a/tests/rustdoc-html/enum/enum-variant-doc-hidden-field-88600.rs b/tests/rustdoc-html/enum/enum-variant-doc-hidden-field-88600.rs index f1d461c66c3e9..e6e11524d3067 100644 --- a/tests/rustdoc-html/enum/enum-variant-doc-hidden-field-88600.rs +++ b/tests/rustdoc-html/enum/enum-variant-doc-hidden-field-88600.rs @@ -8,7 +8,7 @@ pub struct H; // Denotes a field which should not be hidden (shown). pub struct S; -//@ has foo/enum.FooEnum.html +//@ has foo/type.FooEnum.html pub enum FooEnum { //@ has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(/* private fields */)' //@ count - '//*[@id="variant.HiddenTupleItem.field.0"]' 0 diff --git a/tests/rustdoc-html/enum/enum-variant-fields-heading.rs b/tests/rustdoc-html/enum/enum-variant-fields-heading.rs index e210667d3c0d8..cab16b76360b1 100644 --- a/tests/rustdoc-html/enum/enum-variant-fields-heading.rs +++ b/tests/rustdoc-html/enum/enum-variant-fields-heading.rs @@ -3,7 +3,7 @@ #![crate_name = "foo"] -//@ has 'foo/enum.Foo.html' +//@ has 'foo/type.Foo.html' //@ has - '//*[@id="variant.A"]' 'A' //@ count - '//*[@id="variant.A.fields"]' 0 //@ has - '//*[@id="variant.B"]' 'B' diff --git a/tests/rustdoc-html/enum/enum-variant-non_exhaustive.rs b/tests/rustdoc-html/enum/enum-variant-non_exhaustive.rs index ea0234a49f640..3056afab679fa 100644 --- a/tests/rustdoc-html/enum/enum-variant-non_exhaustive.rs +++ b/tests/rustdoc-html/enum/enum-variant-non_exhaustive.rs @@ -2,7 +2,7 @@ #![crate_name = "foo"] -//@ snapshot type-code 'foo/enum.Type.html' '//pre[@class="rust item-decl"]/code' +//@ snapshot type-code 'foo/type.Type.html' '//pre[@class="rust item-decl"]/code' pub enum Type { #[non_exhaustive] // attribute that should not be shown diff --git a/tests/rustdoc-html/enum/enum-variant-value.rs b/tests/rustdoc-html/enum/enum-variant-value.rs index 9cc85dfe10dca..973dde903c8de 100644 --- a/tests/rustdoc-html/enum/enum-variant-value.rs +++ b/tests/rustdoc-html/enum/enum-variant-value.rs @@ -10,7 +10,7 @@ extern crate bar; // In this case, since all variants are C-like variants and at least one of them // has its value set, we display values for all of them. -//@ has 'foo/enum.A.html' +//@ has 'foo/type.A.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 12,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 13,' //@ has - '//*[@class="rust item-decl"]/code' 'C = 1_245,' @@ -26,7 +26,7 @@ pub enum A { // In this case, all variants are C-like variants but none of them has its value set. // Therefore we don't display values. -//@ has 'foo/enum.B.html' +//@ has 'foo/type.B.html' //@ has - '//*[@class="rust item-decl"]/code' 'A,' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ matches - '//*[@id="variant.A"]/h3' '^A$' @@ -38,7 +38,7 @@ pub enum B { // In this case, not all variants are C-like variants so we don't display values. -//@ has 'foo/enum.C.html' +//@ has 'foo/type.C.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 12,' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ has - '//*[@class="rust item-decl"]/code' 'C(u32),' @@ -55,7 +55,7 @@ pub enum C { // In this case, not all variants are C-like variants and no C-like variant has its // value set, so we don't display values. -//@ has 'foo/enum.D.html' +//@ has 'foo/type.D.html' //@ has - '//*[@class="rust item-decl"]/code' 'A,' //@ has - '//*[@class="rust item-decl"]/code' 'C(u32),' //@ matches - '//*[@id="variant.A"]/h3' '^A$' @@ -65,7 +65,7 @@ pub enum D { C(u32), } -//@ has 'foo/enum.E.html' +//@ has 'foo/type.E.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 12,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 13,' //@ has - '//*[@class="rust item-decl"]/code' 'C = 1_245,' @@ -74,14 +74,14 @@ pub enum D { //@ matches - '//*[@id="variant.C"]/h3' '^C = 1_245$' pub use bar::E; -//@ has 'foo/enum.F.html' +//@ has 'foo/type.F.html' //@ has - '//*[@class="rust item-decl"]/code' 'A,' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ matches - '//*[@id="variant.A"]/h3' '^A$' //@ matches - '//*[@id="variant.B"]/h3' '^B$' pub use bar::F; -//@ has 'foo/enum.G.html' +//@ has 'foo/type.G.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 12,' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ has - '//*[@class="rust item-decl"]/code' 'C(u32),' @@ -90,7 +90,7 @@ pub use bar::F; //@ has - '//*[@id="variant.C"]/h3' 'C(u32)' pub use bar::G; -//@ has 'foo/enum.H.html' +//@ has 'foo/type.H.html' //@ has - '//*[@class="rust item-decl"]/code' 'A,' //@ has - '//*[@class="rust item-decl"]/code' 'C(u32),' //@ matches - '//*[@id="variant.A"]/h3' '^A$' @@ -99,7 +99,7 @@ pub use bar::H; // Testing more complex cases. pub const X: isize = 2; -//@ has 'foo/enum.I.html' +//@ has 'foo/type.I.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 2,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 4,' //@ has - '//*[@class="rust item-decl"]/code' 'C = 9,' @@ -118,7 +118,7 @@ pub enum I { // Testing `repr`. -//@ has 'foo/enum.J.html' +//@ has 'foo/type.J.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 0,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 1,' //@ matches - '//*[@id="variant.A"]/h3' '^A = 0$' @@ -129,7 +129,7 @@ pub enum J { B, } -//@ has 'foo/enum.K.html' +//@ has 'foo/type.K.html' //@ has - '//*[@class="rust item-decl"]/code' 'A(u32),' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ has - '//*[@id="variant.A"]/h3' 'A(u32)' @@ -140,7 +140,7 @@ pub enum K { B, } -//@ has 'foo/enum.L.html' +//@ has 'foo/type.L.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 0,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 1,' //@ matches - '//*[@id="variant.A"]/h3' '^A = 0$' @@ -151,7 +151,7 @@ pub enum L { B, } -//@ has 'foo/enum.M.html' +//@ has 'foo/type.M.html' //@ has - '//*[@class="rust item-decl"]/code' 'A(u32),' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ has - '//*[@id="variant.A"]/h3' 'A(u32)' @@ -162,28 +162,28 @@ pub enum M { B, } -//@ has 'foo/enum.N.html' +//@ has 'foo/type.N.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 0,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 1,' //@ matches - '//*[@id="variant.A"]/h3' '^A = 0$' //@ matches - '//*[@id="variant.B"]/h3' '^B = 1$' pub use bar::N; -//@ has 'foo/enum.O.html' +//@ has 'foo/type.O.html' //@ has - '//*[@class="rust item-decl"]/code' 'A(u32),' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ has - '//*[@id="variant.A"]/h3' 'A(u32)' //@ matches - '//*[@id="variant.B"]/h3' '^B$' pub use bar::O; -//@ has 'foo/enum.P.html' +//@ has 'foo/type.P.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = 0,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 1,' //@ matches - '//*[@id="variant.A"]/h3' '^A = 0$' //@ matches - '//*[@id="variant.B"]/h3' '^B = 1$' pub use bar::P; -//@ has 'foo/enum.Q.html' +//@ has 'foo/type.Q.html' //@ has - '//*[@class="rust item-decl"]/code' 'A(u32),' //@ has - '//*[@class="rust item-decl"]/code' 'B,' //@ has - '//*[@id="variant.A"]/h3' 'A(u32)' @@ -191,7 +191,7 @@ pub use bar::P; pub use bar::Q; // Ensure signed implicit discriminants are rendered correctly after a negative explicit value. -//@ has 'foo/enum.R.html' +//@ has 'foo/type.R.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = -2,' //@ has - '//*[@class="rust item-decl"]/code' 'B = -1,' //@ matches - '//*[@id="variant.A"]/h3' '^A = -2$' @@ -202,7 +202,7 @@ pub enum R { } // Also check that incrementing -1 yields 0 for the next implicit variant. -//@ has 'foo/enum.S.html' +//@ has 'foo/type.S.html' //@ has - '//*[@class="rust item-decl"]/code' 'A = -1,' //@ has - '//*[@class="rust item-decl"]/code' 'B = 0,' //@ matches - '//*[@id="variant.A"]/h3' '^A = -1$' diff --git a/tests/rustdoc-html/enum/render-enum-variant-structlike-32395.rs b/tests/rustdoc-html/enum/render-enum-variant-structlike-32395.rs index d4cefb2911d02..0a399f9ae6bc5 100644 --- a/tests/rustdoc-html/enum/render-enum-variant-structlike-32395.rs +++ b/tests/rustdoc-html/enum/render-enum-variant-structlike-32395.rs @@ -5,13 +5,13 @@ // https://github.com/rust-lang/rust/issues/32395 #![crate_name="issue_32395"] -//@ has variant_struct/enum.Foo.html +//@ has variant_struct/type.Foo.html //@ !hasraw - 'pub qux' //@ !hasraw - 'pub(crate) qux' //@ !hasraw - 'pub Bar' extern crate variant_struct; -//@ has issue_32395/enum.Foo.html +//@ has issue_32395/type.Foo.html //@ !hasraw - 'pub qux' //@ !hasraw - 'pub(crate) qux' //@ !hasraw - 'pub Bar' diff --git a/tests/rustdoc-html/enum/strip-enum-variant.rs b/tests/rustdoc-html/enum/strip-enum-variant.rs index 9874588ef59f8..76995cc01423b 100644 --- a/tests/rustdoc-html/enum/strip-enum-variant.rs +++ b/tests/rustdoc-html/enum/strip-enum-variant.rs @@ -1,4 +1,4 @@ -//@ has strip_enum_variant/enum.MyThing.html +//@ has strip_enum_variant/type.MyThing.html //@ has - '//code' 'Shown' //@ !has - '//code' 'NotShown' //@ has - '//code' '// some variants omitted' diff --git a/tests/rustdoc-html/extern/extern-default-method.rs b/tests/rustdoc-html/extern/extern-default-method.rs index 1af9fab152e26..ef2a44014d3e6 100644 --- a/tests/rustdoc-html/extern/extern-default-method.rs +++ b/tests/rustdoc-html/extern/extern-default-method.rs @@ -16,8 +16,8 @@ extern crate rustdoc_extern_default_method as ext; // general: If the type `Struct` also had an inherent method called `provided`, the impl item // would link to that one even though those two methods are distinct items! -//@ count extern_default_method/struct.Struct.html '//*[@id="method.provided"]' 1 -//@ count extern_default_method/struct.Struct.html '//*[@id="method.provided"]//a[@class="fn"]' 1 +//@ count extern_default_method/type.Struct.html '//*[@id="method.provided"]' 1 +//@ count extern_default_method/type.Struct.html '//*[@id="method.provided"]//a[@class="fn"]' 1 //@ snapshot no_href_on_anchor - '//*[@id="method.provided"]//a[@class="fn"]' -//@ has extern_default_method/struct.Struct.html '//*[@id="method.provided"]//a[@class="anchor"]/@href' #method.provided +//@ has extern_default_method/type.Struct.html '//*[@id="method.provided"]//a[@class="anchor"]/@href' #method.provided pub use ext::Struct; diff --git a/tests/rustdoc-html/extern/extern-links.rs b/tests/rustdoc-html/extern/extern-links.rs index d1fee22475587..1bd88449a7b4d 100644 --- a/tests/rustdoc-html/extern/extern-links.rs +++ b/tests/rustdoc-html/extern/extern-links.rs @@ -16,6 +16,6 @@ pub use extern_links::Foo; #[doc(hidden)] pub mod hidden { //@ !has foo/hidden/extern_links/index.html - //@ !has foo/hidden/extern_links/struct.Foo.html + //@ !has foo/hidden/extern_links/type.Foo.html pub use extern_links; } diff --git a/tests/rustdoc-html/extern/external-cross.rs b/tests/rustdoc-html/extern/external-cross.rs index 13646ec38cfbc..8df17616ee46b 100644 --- a/tests/rustdoc-html/extern/external-cross.rs +++ b/tests/rustdoc-html/extern/external-cross.rs @@ -5,6 +5,6 @@ extern crate external_cross; -//@ has host/struct.NeedMoreDocs.html +//@ has host/type.NeedMoreDocs.html //@ has - '//h2' 'Cross-crate imported docs' pub use external_cross::NeedMoreDocs; diff --git a/tests/rustdoc-html/extern/external-doc.rs b/tests/rustdoc-html/extern/external-doc.rs index c81aa17ed5a47..06f0a5ff2da99 100644 --- a/tests/rustdoc-html/extern/external-doc.rs +++ b/tests/rustdoc-html/extern/external-doc.rs @@ -1,4 +1,4 @@ -//@ has external_doc/struct.IncludeStrDocs.html +//@ has external_doc/type.IncludeStrDocs.html //@ has - '//h2' 'External Docs' //@ has - '//h3' 'Inline Docs' #[doc = include_str!("auxiliary/external-doc.md")] @@ -7,7 +7,7 @@ pub struct IncludeStrDocs; macro_rules! dir { () => { "auxiliary" } } -//@ has external_doc/struct.EagerExpansion.html +//@ has external_doc/type.EagerExpansion.html //@ has - '//h2' 'External Docs' #[doc = include_str!(concat!(dir!(), "/external-doc.md"))] /// ## Inline Docs diff --git a/tests/rustdoc-html/extern/link-extern-crate-item-30109.rs b/tests/rustdoc-html/extern/link-extern-crate-item-30109.rs index 544cfa1497111..03fbdc4cdd1d8 100644 --- a/tests/rustdoc-html/extern/link-extern-crate-item-30109.rs +++ b/tests/rustdoc-html/extern/link-extern-crate-item-30109.rs @@ -12,6 +12,6 @@ pub mod quux { pub trait Foo {} //@ has issue_30109/quux/trait.Foo.html \ - // '//a/@href' '../issue_30109_1/struct.Bar.html' + // '//a/@href' '../issue_30109_1/type.Bar.html' impl Foo for Bar {} } diff --git a/tests/rustdoc-html/extern/pub-extern-crate.rs b/tests/rustdoc-html/extern/pub-extern-crate.rs index 05f70301e33c3..840c77521c104 100644 --- a/tests/rustdoc-html/extern/pub-extern-crate.rs +++ b/tests/rustdoc-html/extern/pub-extern-crate.rs @@ -4,6 +4,6 @@ //@ !has - '//code' 'pub extern crate inner' //@ has - '//a/@href' 'inner/index.html' //@ has pub_extern_crate/inner/index.html -//@ has pub_extern_crate/inner/struct.SomeStruct.html +//@ has pub_extern_crate/inner/type.SomeStruct.html #[doc(inline)] pub extern crate inner; diff --git a/tests/rustdoc-html/extremely_long_typename.extremely_long_typename.html b/tests/rustdoc-html/extremely_long_typename.extremely_long_typename.html index 64c4d5fb3e3b9..e785969eaf238 100644 --- a/tests/rustdoc-html/extremely_long_typename.extremely_long_typename.html +++ b/tests/rustdoc-html/extremely_long_typename.extremely_long_typename.html @@ -1 +1 @@ -
CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer
\ No newline at end of file +
CreateSubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer
\ No newline at end of file diff --git a/tests/rustdoc-html/file-creation-111249.rs b/tests/rustdoc-html/file-creation-111249.rs index 7a075a1583f30..76d99e85e4d50 100644 --- a/tests/rustdoc-html/file-creation-111249.rs +++ b/tests/rustdoc-html/file-creation-111249.rs @@ -14,7 +14,8 @@ pub trait MetaSized: PointeeSized {} pub trait Sized: MetaSized {} //@ files "foo" "['all.html', 'visible', 'index.html', 'sidebar-items.js', 'hidden', \ -// 'struct.Bar.html', 'trait.Sized.html', 'trait.MetaSized.html', 'trait.PointeeSized.html']" +// 'struct.Bar.html', 'trait.Sized.html', 'trait.MetaSized.html', \ +// 'trait.PointeeSized.html', 'type.Bar.html']" //@ files "foo/visible" "['trait.Foo.html', 'index.html', 'sidebar-items.js']" //@ files "foo/hidden" "['inner']" //@ files "foo/hidden/inner" "['trait.Foo.html']" @@ -45,6 +46,8 @@ pub mod hidden { pub use hidden::inner as visible; //@ has 'foo/struct.Bar.html' +//@ matchesraw - '' +//@ has 'foo/type.Bar.html' //@ count - '//*[@id="impl-Foo-for-Bar"]' 1 pub struct Bar; diff --git a/tests/rustdoc-html/files-creation-hidden.rs b/tests/rustdoc-html/files-creation-hidden.rs index 8adf84d6640d5..3eeca759a515a 100644 --- a/tests/rustdoc-html/files-creation-hidden.rs +++ b/tests/rustdoc-html/files-creation-hidden.rs @@ -1,14 +1,14 @@ #![crate_name="foo"] //@ files foo '["index.html", "all.html", "sidebar-items.js"]' -//@ !has "foo/struct.Foo.html" +//@ !has "foo/type.Foo.html" #[doc(hidden)] pub struct Foo; -//@ !has "foo/struct.Bar.html" +//@ !has "foo/type.Bar.html" pub use crate::Foo as Bar; -//@ !has "foo/struct.Baz.html" +//@ !has "foo/type.Baz.html" #[doc(hidden)] pub use crate::Foo as Baz; diff --git a/tests/rustdoc-html/final-trait-method.rs b/tests/rustdoc-html/final-trait-method.rs index 016578a8b0e74..3337e9e0e807d 100644 --- a/tests/rustdoc-html/final-trait-method.rs +++ b/tests/rustdoc-html/final-trait-method.rs @@ -12,7 +12,7 @@ pub trait Item { fn bar() {} } -//@ has final_trait_method/struct.Foo.html +//@ has final_trait_method/type.Foo.html pub struct Foo; impl Item for Foo { //@ has - '//*[@id="method.bar"]' 'fn bar()' diff --git a/tests/rustdoc-html/fn-bound.rs b/tests/rustdoc-html/fn-bound.rs index 460b6b14e7923..19cf85ebb2c70 100644 --- a/tests/rustdoc-html/fn-bound.rs +++ b/tests/rustdoc-html/fn-bound.rs @@ -11,7 +11,7 @@ pub struct ConditionalIterator { } -//@ has 'fn_bound/struct.ConditionalIterator.html' '//h3[@class="code-header"]' 'impl Iterator for ConditionalIterator' +//@ has 'fn_bound/type.ConditionalIterator.html' '//h3[@class="code-header"]' 'impl Iterator for ConditionalIterator' impl Iterator for ConditionalIterator { type Item = (); diff --git a/tests/rustdoc-html/fn-type.rs b/tests/rustdoc-html/fn-type.rs index 6d63e5cea4a9c..f4209e84d4cbf 100644 --- a/tests/rustdoc-html/fn-type.rs +++ b/tests/rustdoc-html/fn-type.rs @@ -8,6 +8,6 @@ pub struct Foo<'a, T> { pub hrtb_lifetime: for<'b, 'c> fn(one: &'b i32, two: &'c &'b i32) -> (&'b i32, &'c i32), } -//@ has 'foo/struct.Foo.html' '//span[@id="structfield.generic"]' "generic: fn(val: &T) -> T" -//@ has 'foo/struct.Foo.html' '//span[@id="structfield.lifetime"]' "lifetime: fn(val: &'a i32) -> i32" -//@ has 'foo/struct.Foo.html' '//span[@id="structfield.hrtb_lifetime"]' "hrtb_lifetime: for<'b, 'c> fn(one: &'b i32, two: &'c &'b i32) -> (&'b i32, &'c i32)" +//@ has 'foo/type.Foo.html' '//span[@id="structfield.generic"]' "generic: fn(val: &T) -> T" +//@ has 'foo/type.Foo.html' '//span[@id="structfield.lifetime"]' "lifetime: fn(val: &'a i32) -> i32" +//@ has 'foo/type.Foo.html' '//span[@id="structfield.hrtb_lifetime"]' "hrtb_lifetime: for<'b, 'c> fn(one: &'b i32, two: &'c &'b i32) -> (&'b i32, &'c i32)" diff --git a/tests/rustdoc-html/footnote/footnote-ids.rs b/tests/rustdoc-html/footnote/footnote-ids.rs index d3a8435bb4701..d36dc03a86d8e 100644 --- a/tests/rustdoc-html/footnote/footnote-ids.rs +++ b/tests/rustdoc-html/footnote/footnote-ids.rs @@ -3,7 +3,7 @@ #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' pub struct Foo; diff --git a/tests/rustdoc-html/footnote/footnote-in-summary.rs b/tests/rustdoc-html/footnote/footnote-in-summary.rs index 2a9668a9963b0..a9f382afcf6a9 100644 --- a/tests/rustdoc-html/footnote/footnote-in-summary.rs +++ b/tests/rustdoc-html/footnote/footnote-in-summary.rs @@ -7,7 +7,7 @@ //@ has - '//dd' 'hello bla' //@ !has - '//dd/sup' '1' -//@ has 'foo/struct.S.html' +//@ has 'foo/type.S.html' //@ has - '//*[@class="docblock"]//sup' '1' //@ has - '//*[@class="docblock"]' 'hello 1 bla' diff --git a/tests/rustdoc-html/force-unstable-if-unmarked-106421-not-internal.rs b/tests/rustdoc-html/force-unstable-if-unmarked-106421-not-internal.rs index a85cfa78cdcda..097de8448af82 100644 --- a/tests/rustdoc-html/force-unstable-if-unmarked-106421-not-internal.rs +++ b/tests/rustdoc-html/force-unstable-if-unmarked-106421-not-internal.rs @@ -7,5 +7,5 @@ extern crate foo; -//@ !has bar/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise' +//@ !has bar/type.FatalError.html '//*[@id="method.raise"]' 'fn raise' pub use foo::FatalError; diff --git a/tests/rustdoc-html/force-unstable-if-unmarked-106421.rs b/tests/rustdoc-html/force-unstable-if-unmarked-106421.rs index aa88a569aef2f..7e3efa5c54eca 100644 --- a/tests/rustdoc-html/force-unstable-if-unmarked-106421.rs +++ b/tests/rustdoc-html/force-unstable-if-unmarked-106421.rs @@ -6,5 +6,5 @@ extern crate foo; -//@ has bar/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise' +//@ has bar/type.FatalError.html '//*[@id="method.raise"]' 'fn raise' pub use foo::FatalError; diff --git a/tests/rustdoc-html/generic-associated-types/gat-linkification-109488.rs b/tests/rustdoc-html/generic-associated-types/gat-linkification-109488.rs index be55a10b4033d..eb210c4f4678e 100644 --- a/tests/rustdoc-html/generic-associated-types/gat-linkification-109488.rs +++ b/tests/rustdoc-html/generic-associated-types/gat-linkification-109488.rs @@ -6,7 +6,7 @@ //@ has 'foo/type.A.html' //@ has - '//pre[@class="rust item-decl"]' '::P>' -//@ has - '//pre[@class="rust item-decl"]//a[@class="enum"]/@href' '{{channel}}/core/option/enum.Option.html' +//@ has - '//pre[@class="rust item-decl"]//a[@class="enum"]/@href' '{{channel}}/core/option/type.Option.html' pub type A = ::P>; /*private*/ trait Tr { diff --git a/tests/rustdoc-html/heading-levels-89309.rs b/tests/rustdoc-html/heading-levels-89309.rs index 772217c159499..5714351e778ad 100644 --- a/tests/rustdoc-html/heading-levels-89309.rs +++ b/tests/rustdoc-html/heading-levels-89309.rs @@ -12,7 +12,7 @@ pub trait Read { pub struct Foo; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html impl Foo { //@ has - '//h5' 'Implementation header' /// # Implementation header diff --git a/tests/rustdoc-html/hidden-methods.rs b/tests/rustdoc-html/hidden-methods.rs index ed9c1ee1aac29..04c4621ffdfce 100644 --- a/tests/rustdoc-html/hidden-methods.rs +++ b/tests/rustdoc-html/hidden-methods.rs @@ -16,13 +16,13 @@ pub mod hidden { } } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ !hasraw - 'Methods' //@ !has - '//code' 'impl Foo' //@ !hasraw - 'this_should_be_hidden' pub use hidden::Foo; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ !hasraw - 'Methods' //@ !has - '//code' 'impl Bar' //@ !hasraw - 'this_should_be_hidden' diff --git a/tests/rustdoc-html/hidden-trait-methods.rs b/tests/rustdoc-html/hidden-trait-methods.rs index 5f25d9925b0ff..02492506ef2be 100644 --- a/tests/rustdoc-html/hidden-trait-methods.rs +++ b/tests/rustdoc-html/hidden-trait-methods.rs @@ -15,7 +15,7 @@ pub trait Trait { fn g(); } -//@ has foo/struct.S.html +//@ has foo/type.S.html //@ !has - '//*[@id="associatedtype.Foo"]' 'type Foo' //@ has - '//*[@id="associatedtype.Bar"]' 'type Bar' //@ !has - '//*[@id="method.f"]' 'fn f()' diff --git a/tests/rustdoc-html/hidden/display-hidden-items.rs b/tests/rustdoc-html/hidden/display-hidden-items.rs index 6b548e3945600..6235cb78f3eec 100644 --- a/tests/rustdoc-html/hidden/display-hidden-items.rs +++ b/tests/rustdoc-html/hidden/display-hidden-items.rs @@ -37,7 +37,7 @@ pub trait Trait { } //@ has 'foo/index.html' '//dt/a[@class="struct"]' 'Struct' -//@ has 'foo/struct.Struct.html' +//@ has 'foo/type.Struct.html' pub struct Struct { //@ has - '//*[@id="structfield.a"]/code' 'a: u32' #[doc(hidden)] @@ -58,9 +58,9 @@ impl Trait for Struct { impl TraitHidden for Struct {} //@ has 'foo/index.html' '//dt/a[@class="enum"]' 'HiddenEnum' -//@ has 'foo/enum.HiddenEnum.html' -//@ has 'foo/enum.HiddenEnum.html' '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[doc(hidden)]' -//@ has 'foo/enum.HiddenEnum.html' '//*[@class="rust item-decl"]/code' 'pub enum HiddenEnum' +//@ has 'foo/type.HiddenEnum.html' +//@ has 'foo/type.HiddenEnum.html' '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[doc(hidden)]' +//@ has 'foo/type.HiddenEnum.html' '//*[@class="rust item-decl"]/code' 'pub enum HiddenEnum' #[doc(hidden)] pub enum HiddenEnum { A, @@ -68,8 +68,8 @@ pub enum HiddenEnum { //@ has 'foo/index.html' '//dt/a[@class="enum"]' 'Enum' pub enum Enum { - //@ has 'foo/enum.Enum.html' '//*[@id="variant.A"]/*[@class="code-header"]/*[@class="code-attribute"]' '#[doc(hidden)]' - //@ has 'foo/enum.Enum.html' '//*[@id="variant.A"]/*[@class="code-header"]' 'A' + //@ has 'foo/type.Enum.html' '//*[@id="variant.A"]/*[@class="code-header"]/*[@class="code-attribute"]' '#[doc(hidden)]' + //@ has 'foo/type.Enum.html' '//*[@id="variant.A"]/*[@class="code-header"]' 'A' #[doc(hidden)] A, } diff --git a/tests/rustdoc-html/hidden/hidden-trait-methods-with-document-hidden-items.rs b/tests/rustdoc-html/hidden/hidden-trait-methods-with-document-hidden-items.rs index dc8ff4b8d266b..011afb5601d83 100644 --- a/tests/rustdoc-html/hidden/hidden-trait-methods-with-document-hidden-items.rs +++ b/tests/rustdoc-html/hidden/hidden-trait-methods-with-document-hidden-items.rs @@ -17,7 +17,7 @@ pub trait Trait { fn g(); } -//@ has foo/struct.S.html +//@ has foo/type.S.html //@ has - '//*[@id="associatedtype.Foo"]' 'type Foo' //@ has - '//*[@id="associatedtype.Bar"]' 'type Bar' //@ has - '//*[@id="method.f"]' 'fn f()' diff --git a/tests/rustdoc-html/hide-unstable-trait.rs b/tests/rustdoc-html/hide-unstable-trait.rs index 33c514c77a7ae..0bc68c05db834 100644 --- a/tests/rustdoc-html/hide-unstable-trait.rs +++ b/tests/rustdoc-html/hide-unstable-trait.rs @@ -5,7 +5,7 @@ extern crate unstable_trait; -//@ hasraw foo/struct.Foo.html 'bar' -//@ hasraw foo/struct.Foo.html 'bar2' +//@ hasraw foo/type.Foo.html 'bar' +//@ hasraw foo/type.Foo.html 'bar2' #[doc(inline)] pub use unstable_trait::Foo; diff --git a/tests/rustdoc-html/higher-ranked-trait-bounds.rs b/tests/rustdoc-html/higher-ranked-trait-bounds.rs index cda2ddc9166e7..744fed833b6c4 100644 --- a/tests/rustdoc-html/higher-ranked-trait-bounds.rs +++ b/tests/rustdoc-html/higher-ranked-trait-bounds.rs @@ -27,7 +27,7 @@ where { } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html pub struct Foo<'a> { _x: &'a u8, pub some_trait: &'a dyn for<'b> Trait<'b>, @@ -52,7 +52,7 @@ pub trait B<'x> {} //@ has - '//h3[@class="code-header"]' "impl<'a> B<'a> for dyn for<'b> Trait<'b>" impl<'a> B<'a> for dyn for<'b> Trait<'b> {} -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//span[@id="structfield.bar"]' "bar: &'a (dyn for<'b> Trait<'b> + Unpin)" //@ has - '//span[@id="structfield.baz"]' "baz: &'a (dyn Unpin + for<'b> Trait<'b>)" pub struct Bar<'a> { diff --git a/tests/rustdoc-html/impl/blanket-impl-78673.rs b/tests/rustdoc-html/impl/blanket-impl-78673.rs index 412d4057406e4..3a3a2fffe2a41 100644 --- a/tests/rustdoc-html/impl/blanket-impl-78673.rs +++ b/tests/rustdoc-html/impl/blanket-impl-78673.rs @@ -7,7 +7,7 @@ pub trait AnAmazingTrait {} impl AnAmazingTrait for T {} -//@ has 'issue_78673/struct.MyStruct.html' +//@ has 'issue_78673/type.MyStruct.html' //@ has - '//*[@class="impl"]' 'AnAmazingTrait for MyStruct' //@ !has - '//*[@class="impl"]' 'AnAmazingTrait for T' pub struct MyStruct; @@ -16,7 +16,7 @@ impl AnAmazingTrait for MyStruct {} // generic structs may have _both_ specific and blanket impls that apply -//@ has 'issue_78673/struct.AnotherStruct.html' +//@ has 'issue_78673/type.AnotherStruct.html' //@ has - '//*[@class="impl"]' 'AnAmazingTrait for AnotherStruct<()>' //@ has - '//*[@class="impl"]' 'AnAmazingTrait for T' pub struct AnotherStruct(T); diff --git a/tests/rustdoc-html/impl/blanket-impl-trumps-auto-trait-impl.rs b/tests/rustdoc-html/impl/blanket-impl-trumps-auto-trait-impl.rs index 6444e87ad18f6..bfec6a13c21b8 100644 --- a/tests/rustdoc-html/impl/blanket-impl-trumps-auto-trait-impl.rs +++ b/tests/rustdoc-html/impl/blanket-impl-trumps-auto-trait-impl.rs @@ -13,7 +13,7 @@ pub auto trait Marker {} -//@ has 'it/struct.Subject.html' +//@ has 'it/type.Subject.html' #[derive(Clone, Copy)] pub struct Subject; diff --git a/tests/rustdoc-html/impl/cross-crate-hidden-impl-parameter.rs b/tests/rustdoc-html/impl/cross-crate-hidden-impl-parameter.rs index ebfe251134a03..457bcea099193 100644 --- a/tests/rustdoc-html/impl/cross-crate-hidden-impl-parameter.rs +++ b/tests/rustdoc-html/impl/cross-crate-hidden-impl-parameter.rs @@ -8,7 +8,7 @@ pub use ::cross_crate_hidden_impl_parameter::{HiddenType, HiddenTrait}; // OK, n pub enum MyLibType {} -//@ !has foo/enum.MyLibType.html '//*[@id="impl-From%3CHiddenType%3E"]' 'impl From for MyLibType' +//@ !has foo/type.MyLibType.html '//*[@id="impl-From%3CHiddenType%3E"]' 'impl From for MyLibType' impl From for MyLibType { fn from(it: HiddenType) -> MyLibType { match it {} @@ -17,17 +17,17 @@ impl From for MyLibType { pub struct T(T); -//@ !has foo/enum.MyLibType.html '//*[@id="impl-From%3CT%3CT%3CT%3CT%3CHiddenType%3E%3E%3E%3E%3E"]' 'impl From>>>> for MyLibType' +//@ !has foo/type.MyLibType.html '//*[@id="impl-From%3CT%3CT%3CT%3CT%3CHiddenType%3E%3E%3E%3E%3E"]' 'impl From>>>> for MyLibType' impl From>>>> for MyLibType { fn from(it: T>>>) -> MyLibType { todo!() } } -//@ !has foo/enum.MyLibType.html '//*[@id="impl-HiddenTrait"]' 'impl HiddenTrait for MyLibType' +//@ !has foo/type.MyLibType.html '//*[@id="impl-HiddenTrait"]' 'impl HiddenTrait for MyLibType' impl HiddenTrait for MyLibType {} -//@ !has foo/struct.T.html '//*[@id="impl-From%3CMyLibType%3E"]' 'impl From for T>>>' +//@ !has foo/type.T.html '//*[@id="impl-From%3CMyLibType%3E"]' 'impl From for T>>>' impl From for T>>> { fn from(it: MyLibType) -> T>>> { match it {} diff --git a/tests/rustdoc-html/impl/deduplicate-glob-import-impl-21474.rs b/tests/rustdoc-html/impl/deduplicate-glob-import-impl-21474.rs index 5812d4149973e..1d6a417943394 100644 --- a/tests/rustdoc-html/impl/deduplicate-glob-import-impl-21474.rs +++ b/tests/rustdoc-html/impl/deduplicate-glob-import-impl-21474.rs @@ -9,6 +9,6 @@ mod inner { pub trait Blah { } -//@ count issue_21474/struct.What.html \ +//@ count issue_21474/type.What.html \ // '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1 pub struct What; diff --git a/tests/rustdoc-html/impl/deprecated-impls.rs b/tests/rustdoc-html/impl/deprecated-impls.rs index a57f26ec7fd21..8f2057e977f83 100644 --- a/tests/rustdoc-html/impl/deprecated-impls.rs +++ b/tests/rustdoc-html/impl/deprecated-impls.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo0.html +//@ has foo/type.Foo0.html pub struct Foo0; impl Foo0 { @@ -47,7 +47,7 @@ pub trait Bar { fn fn_def_def_without_doc() {} } -//@ has foo/struct.Foo1.html +//@ has foo/type.Foo1.html pub struct Foo1; impl Bar for Foo1 { @@ -80,7 +80,7 @@ impl Bar for Foo1 { //@ has - '//*[@class="stab deprecated"]' 'Deprecated since 1.0.8: fn_def_def_without_doc' } -//@ has foo/struct.Foo2.html +//@ has foo/type.Foo2.html pub struct Foo2; impl Bar for Foo2 { diff --git a/tests/rustdoc-html/impl/doc_auto_cfg_nested_impl.rs b/tests/rustdoc-html/impl/doc_auto_cfg_nested_impl.rs index f24ebcd52acb6..f6d5067637478 100644 --- a/tests/rustdoc-html/impl/doc_auto_cfg_nested_impl.rs +++ b/tests/rustdoc-html/impl/doc_auto_cfg_nested_impl.rs @@ -8,7 +8,7 @@ pub struct S; pub trait MyTrait1 {} pub trait MyTrait2 {} -//@ has foo/struct.S.html +//@ has foo/type.S.html //@ has - '//*[@id="impl-MyTrait1-for-S"]//*[@class="stab portability"]' \ // 'Available on non-crate feature coolstuff only.' #[cfg(not(feature = "coolstuff"))] diff --git a/tests/rustdoc-html/impl/duplicated_impl.rs b/tests/rustdoc-html/impl/duplicated_impl.rs index e7828885cc19a..04089960bf093 100644 --- a/tests/rustdoc-html/impl/duplicated_impl.rs +++ b/tests/rustdoc-html/impl/duplicated_impl.rs @@ -6,7 +6,7 @@ // We check that there is only one "impl Something for T" listed in the // blanket implementations. -//@ has 'foo/struct.Whatever.html' +//@ has 'foo/type.Whatever.html' //@ count - '//*[@id="blanket-implementations-list"]/section[@class="impl"]' 1 pub trait Something { } diff --git a/tests/rustdoc-html/impl/empty-impl-block.rs b/tests/rustdoc-html/impl/empty-impl-block.rs index 7ca5813aae2ef..97ad0c996a99a 100644 --- a/tests/rustdoc-html/impl/empty-impl-block.rs +++ b/tests/rustdoc-html/impl/empty-impl-block.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' pub struct Foo; //@ has - '//*[@class="docblock"]' 'Hello empty impl block!' @@ -15,6 +15,6 @@ impl Foo {} pub struct Another; pub trait Bar {} -//@ has 'foo/struct.Another.html' +//@ has 'foo/type.Another.html' //@ has - '//h3[@class="code-header"]' 'impl Bar for Another' impl Bar for Another {} diff --git a/tests/rustdoc-html/impl/empty-impls.rs b/tests/rustdoc-html/impl/empty-impls.rs index 912a8d3d913f9..bdd8c232e36af 100644 --- a/tests/rustdoc-html/impl/empty-impls.rs +++ b/tests/rustdoc-html/impl/empty-impls.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//div[@id="synthetic-implementations-list"]/*[@id="impl-Send-for-Foo"]' 'impl Send for Foo' pub struct Foo; diff --git a/tests/rustdoc-html/impl/extern-impl-trait.rs b/tests/rustdoc-html/impl/extern-impl-trait.rs index 65b7a8cef4957..1e430c7527660 100644 --- a/tests/rustdoc-html/impl/extern-impl-trait.rs +++ b/tests/rustdoc-html/impl/extern-impl-trait.rs @@ -4,8 +4,8 @@ extern crate extern_impl_trait; -//@ has 'foo/struct.X.html' '//h4[@class="code-header"]' "impl Foo + 'a" +//@ has 'foo/type.X.html' '//h4[@class="code-header"]' "impl Foo + 'a" pub use extern_impl_trait::X; -//@ has 'foo/struct.Y.html' '//h4[@class="code-header"]' "impl Foo + ?Sized + 'a" +//@ has 'foo/type.Y.html' '//h4[@class="code-header"]' "impl Foo + ?Sized + 'a" pub use extern_impl_trait::Y; diff --git a/tests/rustdoc-html/impl/extern-impl.rs b/tests/rustdoc-html/impl/extern-impl.rs index 4fc3139398826..36397f4c44162 100644 --- a/tests/rustdoc-html/impl/extern-impl.rs +++ b/tests/rustdoc-html/impl/extern-impl.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html pub struct Foo; impl Foo { diff --git a/tests/rustdoc-html/impl/generic-impl.rs b/tests/rustdoc-html/impl/generic-impl.rs index 9d15d0fff7780..96c41514f302c 100644 --- a/tests/rustdoc-html/impl/generic-impl.rs +++ b/tests/rustdoc-html/impl/generic-impl.rs @@ -2,12 +2,12 @@ use std::fmt; -//@ !has foo/struct.Bar.html '//*[@id="impl-ToString-for-Bar"]' '' +//@ !has foo/type.Bar.html '//*[@id="impl-ToString-for-Bar"]' '' pub struct Bar; -//@ has foo/struct.Foo.html '//*[@id="impl-ToString-for-T"]//h3[@class="code-header"]' 'impl ToString for T' +//@ has foo/type.Foo.html '//*[@id="impl-ToString-for-T"]//h3[@class="code-header"]' 'impl ToString for T' pub struct Foo; -//@ has foo/struct.Foo.html '//*[@class="sidebar-elems"]//section//a[@href="#impl-ToString-for-T"]' 'ToString' +//@ has foo/type.Foo.html '//*[@class="sidebar-elems"]//section//a[@href="#impl-ToString-for-T"]' 'ToString' impl fmt::Display for Foo { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/tests/rustdoc-html/impl/hidden-implementors-90781.rs b/tests/rustdoc-html/impl/hidden-implementors-90781.rs index 960a85b91f001..f81e16b50a4cf 100644 --- a/tests/rustdoc-html/impl/hidden-implementors-90781.rs +++ b/tests/rustdoc-html/impl/hidden-implementors-90781.rs @@ -33,21 +33,21 @@ trait TPrivVis {} //@ has - '//*[@id="impl-TPrivHidden-for-VisPub"]' 'VisPub' trait TPrivHidden {} -//@ has foo/struct.VisPub.html +//@ has foo/type.VisPub.html //@ has - '//*[@id="trait-implementations-list"]' 'TPrivHidden' //@ has - '//*[@id="trait-implementations-list"]' 'TPrivVis' //@ has - '//*[@id="trait-implementations-list"]' 'TPubHidden' //@ has - '//*[@id="trait-implementations-list"]' 'TPubVis' pub struct VisPub; -//@ has foo/struct.VisPriv.html +//@ has foo/type.VisPriv.html //@ has - '//*[@id="trait-implementations-list"]' 'TPrivHidden' //@ has - '//*[@id="trait-implementations-list"]' 'TPrivVis' //@ has - '//*[@id="trait-implementations-list"]' 'TPubHidden' //@ has - '//*[@id="trait-implementations-list"]' 'TPubVis' struct VisPriv; -//@ has foo/struct.HidPub.html +//@ has foo/type.HidPub.html //@ has - '//*[@id="trait-implementations-list"]' 'TPrivHidden' //@ has - '//*[@id="trait-implementations-list"]' 'TPrivVis' //@ has - '//*[@id="trait-implementations-list"]' 'TPubHidden' @@ -55,7 +55,7 @@ struct VisPriv; #[doc(hidden)] pub struct HidPub; -//@ has foo/struct.HidPriv.html +//@ has foo/type.HidPriv.html //@ has - '//*[@id="trait-implementations-list"]' 'TPrivHidden' //@ has - '//*[@id="trait-implementations-list"]' 'TPrivVis' //@ has - '//*[@id="trait-implementations-list"]' 'TPubHidden' diff --git a/tests/rustdoc-html/impl/hidden-trait-struct-impls.rs b/tests/rustdoc-html/impl/hidden-trait-struct-impls.rs index 1010cb459601e..a392c8be9de66 100644 --- a/tests/rustdoc-html/impl/hidden-trait-struct-impls.rs +++ b/tests/rustdoc-html/impl/hidden-trait-struct-impls.rs @@ -11,11 +11,11 @@ pub struct Bar; struct Hidden; -//@ !has foo/struct.Bar.html '//*[@id="impl-Foo-for-Bar"]' 'impl Foo for Bar' +//@ !has foo/type.Bar.html '//*[@id="impl-Foo-for-Bar"]' 'impl Foo for Bar' impl Foo for Bar {} -//@ !has foo/struct.Bar.html '//*[@id="impl-Dark-for-Bar"]' 'impl Dark for Bar' +//@ !has foo/type.Bar.html '//*[@id="impl-Dark-for-Bar"]' 'impl Dark for Bar' impl Dark for Bar {} -//@ has foo/struct.Bar.html '//*[@id="impl-Bam-for-Bar"]' 'impl Bam for Bar' +//@ has foo/type.Bar.html '//*[@id="impl-Bam-for-Bar"]' 'impl Bam for Bar' //@ has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Bar' impl Bam for Bar {} //@ !has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden' diff --git a/tests/rustdoc-html/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs b/tests/rustdoc-html/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs index 995121a8455d3..ad6d550754971 100644 --- a/tests/rustdoc-html/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs +++ b/tests/rustdoc-html/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs @@ -9,7 +9,7 @@ impl Foo { pub fn foo(&mut self) {} } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ !has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo' pub struct Bar { foo: Foo, diff --git a/tests/rustdoc-html/impl/impl-alias-substituted.rs b/tests/rustdoc-html/impl/impl-alias-substituted.rs index 02efcd88df899..3e831ff50dc31 100644 --- a/tests/rustdoc-html/impl/impl-alias-substituted.rs +++ b/tests/rustdoc-html/impl/impl-alias-substituted.rs @@ -2,7 +2,7 @@ pub struct Matrix([[T; N]; M]); pub type Vector = Matrix; -//@ has "impl_alias_substituted/struct.Matrix.html" '//*[@class="impl"]//h3[@class="code-header"]' \ +//@ has "impl_alias_substituted/type.Matrix.html" '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Matrix" impl Vector { pub fn test() {} diff --git a/tests/rustdoc-html/impl/impl-assoc-type-21092.rs b/tests/rustdoc-html/impl/impl-assoc-type-21092.rs index c350456195dc0..c93d20ddcc7c6 100644 --- a/tests/rustdoc-html/impl/impl-assoc-type-21092.rs +++ b/tests/rustdoc-html/impl/impl-assoc-type-21092.rs @@ -6,6 +6,6 @@ extern crate issue_21092; -//@ has issue_21092/struct.Bar.html +//@ has issue_21092/type.Bar.html //@ has - '//*[@id="associatedtype.Bar"]' 'type Bar = i32' pub use issue_21092::{Foo, Bar}; diff --git a/tests/rustdoc-html/impl/impl-associated-items-order.rs b/tests/rustdoc-html/impl/impl-associated-items-order.rs index 3f1d047201636..50c40df35c9be 100644 --- a/tests/rustdoc-html/impl/impl-associated-items-order.rs +++ b/tests/rustdoc-html/impl/impl-associated-items-order.rs @@ -8,7 +8,7 @@ #![allow(incomplete_features)] #![crate_name = "foo"] -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' pub struct Bar; impl Bar { diff --git a/tests/rustdoc-html/impl/impl-associated-items-sidebar.rs b/tests/rustdoc-html/impl/impl-associated-items-sidebar.rs index d393a577e5009..c4cbe654fa32b 100644 --- a/tests/rustdoc-html/impl/impl-associated-items-sidebar.rs +++ b/tests/rustdoc-html/impl/impl-associated-items-sidebar.rs @@ -7,7 +7,7 @@ #![allow(incomplete_features)] #![crate_name = "foo"] -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' pub struct Bar; impl Bar { diff --git a/tests/rustdoc-html/impl/impl-box.rs b/tests/rustdoc-html/impl/impl-box.rs index 1fb63e21685b9..d4b0c44525428 100644 --- a/tests/rustdoc-html/impl/impl-box.rs +++ b/tests/rustdoc-html/impl/impl-box.rs @@ -4,7 +4,7 @@ pub struct MyType; -//@ has 'impl_box/struct.MyType.html' +//@ has 'impl_box/type.MyType.html' //@ has '-' '//*[@id="impl-Iterator-for-Box%3CMyType%3E"]' 'impl Iterator for Box' impl Iterator for Box { diff --git a/tests/rustdoc-html/impl/impl-fundamental-nesting.rs b/tests/rustdoc-html/impl/impl-fundamental-nesting.rs index 25aed33e53514..5dba1af39eb6c 100644 --- a/tests/rustdoc-html/impl/impl-fundamental-nesting.rs +++ b/tests/rustdoc-html/impl/impl-fundamental-nesting.rs @@ -8,7 +8,7 @@ use std::pin::Pin; pub struct Local; -//@ has 'foo/struct.Local.html' +//@ has 'foo/type.Local.html' // Nested fundamental + foreign Self. //@ has '-' '//*[@id="impl-From%3CBox%3CLocal%3E%3E-for-String"]' 'impl From> for String' @@ -54,5 +54,5 @@ impl From for Pin> { // trait's own page. pub trait Marker {} //@ has 'foo/trait.Marker.html' '//*[@id="impl-Marker-for-Vec%3CLocal%3E"]' 'impl Marker for Vec' -//@ !has 'foo/struct.Local.html' '//*[@id="impl-Marker-for-Vec%3CLocal%3E"]' 'impl Marker for Vec' +//@ !has 'foo/type.Local.html' '//*[@id="impl-Marker-for-Vec%3CLocal%3E"]' 'impl Marker for Vec' impl Marker for Vec {} diff --git a/tests/rustdoc-html/impl/impl-in-const-block.rs b/tests/rustdoc-html/impl/impl-in-const-block.rs index 3f757fa95666d..38d1bfa4c40e6 100644 --- a/tests/rustdoc-html/impl/impl-in-const-block.rs +++ b/tests/rustdoc-html/impl/impl-in-const-block.rs @@ -4,7 +4,7 @@ #![crate_name = "foo"] -//@ has 'foo/struct.A.html' +//@ has 'foo/type.A.html' //@ has - '//*[@id="method.new"]/*[@class="code-header"]' 'pub fn new() -> A' //@ has - '//*[@id="method.bar"]/*[@class="code-header"]' 'pub fn bar(&self)' //@ has - '//*[@id="method.woo"]/*[@class="code-header"]' 'pub fn woo(&self)' diff --git a/tests/rustdoc-html/impl/impl-parts.rs b/tests/rustdoc-html/impl/impl-parts.rs index 4f281bfd63c83..0193e5690b8de 100644 --- a/tests/rustdoc-html/impl/impl-parts.rs +++ b/tests/rustdoc-html/impl/impl-parts.rs @@ -5,7 +5,7 @@ pub auto trait AnAutoTrait {} pub struct Foo { field: T } -//@ has impl_parts/struct.Foo.html '//*[@class="impl"]//h3[@class="code-header"]' \ +//@ has impl_parts/type.Foo.html '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl !AnAutoTrait for Foowhere T: Sync + Clone," //@ has impl_parts/trait.AnAutoTrait.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl !AnAutoTrait for Foowhere T: Sync + Clone," diff --git a/tests/rustdoc-html/impl/impl-ref-20175.rs b/tests/rustdoc-html/impl/impl-ref-20175.rs index b1a9286fd4138..8530818a47581 100644 --- a/tests/rustdoc-html/impl/impl-ref-20175.rs +++ b/tests/rustdoc-html/impl/impl-ref-20175.rs @@ -8,7 +8,7 @@ pub trait Foo { pub struct Bar; -//@ has issue_20175/struct.Bar.html \ +//@ has issue_20175/type.Bar.html \ // '//*[@id="method.foo"]' \ // 'fn foo' impl<'a> Foo for &'a Bar {} diff --git a/tests/rustdoc-html/impl/inline-impl-through-glob-import-100204.rs b/tests/rustdoc-html/impl/inline-impl-through-glob-import-100204.rs index ba6ed4278716f..33996243131bf 100644 --- a/tests/rustdoc-html/impl/inline-impl-through-glob-import-100204.rs +++ b/tests/rustdoc-html/impl/inline-impl-through-glob-import-100204.rs @@ -9,7 +9,7 @@ extern crate first; pub mod prelude {} -//@ has first/struct.Bot.html '//h4[@class="code-header"]' 'pub fn new() -> Bot' -//@ has second/struct.Bot.html '//h4[@class="code-header"]' 'pub fn new() -> Bot' +//@ has first/type.Bot.html '//h4[@class="code-header"]' 'pub fn new() -> Bot' +//@ has second/type.Bot.html '//h4[@class="code-header"]' 'pub fn new() -> Bot' #[doc(inline)] pub use first::*; diff --git a/tests/rustdoc-html/impl/manual_impl.rs b/tests/rustdoc-html/impl/manual_impl.rs index 281262bb40ac2..015172ae814b6 100644 --- a/tests/rustdoc-html/impl/manual_impl.rs +++ b/tests/rustdoc-html/impl/manual_impl.rs @@ -20,7 +20,7 @@ pub trait T { } } -//@ has manual_impl/struct.S1.html '//*[@class="trait"]' 'T' +//@ has manual_impl/type.S1.html '//*[@class="trait"]' 'T' //@ has - '//*[@class="docblock"]' 'Docs associated with the S1 trait implementation.' //@ has - '//*[@class="docblock"]' 'Docs associated with the S1 trait a_method implementation.' //@ !has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.' @@ -38,7 +38,7 @@ impl T for S1 { } } -//@ has manual_impl/struct.S2.html '//*[@class="trait"]' 'T' +//@ has manual_impl/type.S2.html '//*[@class="trait"]' 'T' //@ has - '//*[@class="docblock"]' 'Docs associated with the S2 trait implementation.' //@ has - '//*[@class="docblock"]' 'Docs associated with the S2 trait a_method implementation.' //@ has - '//*[@class="docblock"]' 'Docs associated with the S2 trait c_method implementation.' @@ -58,7 +58,7 @@ impl T for S2 { } } -//@ has manual_impl/struct.S3.html '//*[@class="trait"]' 'T' +//@ has manual_impl/type.S3.html '//*[@class="trait"]' 'T' //@ has - '//div[@class="docblock"]' 'Docs associated with the S3 trait implementation.' //@ has - '//div[@class="docblock"]' 'Docs associated with the S3 trait b_method implementation.' //@ has - '//div[@class="impl-items"]//div[@class="docblock"]' 'Docs associated with the trait a_method definition.' diff --git a/tests/rustdoc-html/impl/method-link-foreign-trait-impl-17476.rs b/tests/rustdoc-html/impl/method-link-foreign-trait-impl-17476.rs index cda828d3967c7..97ddddff02a58 100644 --- a/tests/rustdoc-html/impl/method-link-foreign-trait-impl-17476.rs +++ b/tests/rustdoc-html/impl/method-link-foreign-trait-impl-17476.rs @@ -8,7 +8,7 @@ extern crate issue_17476; pub struct Foo; -//@ has issue_17476/struct.Foo.html \ +//@ has issue_17476/type.Foo.html \ // '//*[@href="http://example.com/issue_17476/trait.Foo.html#method.foo"]' \ // 'foo' impl issue_17476::Foo for Foo {} diff --git a/tests/rustdoc-html/impl/negative-impl-no-items.rs b/tests/rustdoc-html/impl/negative-impl-no-items.rs index c628e54203368..8ef0de755a09f 100644 --- a/tests/rustdoc-html/impl/negative-impl-no-items.rs +++ b/tests/rustdoc-html/impl/negative-impl-no-items.rs @@ -5,7 +5,7 @@ pub struct Thing; -//@ has 'foo/struct.Thing.html' +//@ has 'foo/type.Thing.html' // We check the full path to ensure there is no `
` element. //@ has - '//div[@id="trait-implementations-list"]/section[@id="impl-Iterator-for-Thing"]/h3' \ // 'impl !Iterator for Thing' @@ -14,7 +14,7 @@ impl !Iterator for Thing {} // This struct will allow us to compare both paths. pub struct Witness; -//@ has 'foo/struct.Witness.html' +//@ has 'foo/type.Witness.html' //@ has - '//div[@id="trait-implementations-list"]/details//section[@id="impl-Iterator-for-Witness"]/h3' \ // 'impl Iterator for Witness' impl Iterator for Witness { diff --git a/tests/rustdoc-html/impl/negative-impl-sidebar.rs b/tests/rustdoc-html/impl/negative-impl-sidebar.rs index 1742dce19453a..6fe092316947b 100644 --- a/tests/rustdoc-html/impl/negative-impl-sidebar.rs +++ b/tests/rustdoc-html/impl/negative-impl-sidebar.rs @@ -3,7 +3,7 @@ pub struct Foo; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#trait-implementations"]' 'Trait Implementations' //@ has - '//*[@class="sidebar-elems"]//section//a' '!Sync' impl !Sync for Foo {} diff --git a/tests/rustdoc-html/impl/negative-impl.rs b/tests/rustdoc-html/impl/negative-impl.rs index f057a749b72d4..be21493e746c8 100644 --- a/tests/rustdoc-html/impl/negative-impl.rs +++ b/tests/rustdoc-html/impl/negative-impl.rs @@ -1,14 +1,14 @@ #![feature(negative_impls)] -//@ matches negative_impl/struct.Alpha.html '//pre' "pub struct Alpha" +//@ matches negative_impl/type.Alpha.html '//pre' "pub struct Alpha" pub struct Alpha; -//@ matches negative_impl/struct.Bravo.html '//pre' "pub struct Bravo" +//@ matches negative_impl/type.Bravo.html '//pre' "pub struct Bravo" pub struct Bravo(B); -//@ matches negative_impl/struct.Alpha.html '//*[@class="impl"]//h3[@class="code-header"]' \ +//@ matches negative_impl/type.Alpha.html '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl !Send for Alpha" impl !Send for Alpha {} -//@ matches negative_impl/struct.Bravo.html '//*[@class="impl"]//h3[@class="code-header"]' "\ +//@ matches negative_impl/type.Bravo.html '//*[@class="impl"]//h3[@class="code-header"]' "\ // impl !Send for Bravo" impl !Send for Bravo {} diff --git a/tests/rustdoc-html/impl/rustc-incoherent-impls.rs b/tests/rustdoc-html/impl/rustc-incoherent-impls.rs index 81a7025906bad..4ee921713caef 100644 --- a/tests/rustdoc-html/impl/rustc-incoherent-impls.rs +++ b/tests/rustdoc-html/impl/rustc-incoherent-impls.rs @@ -20,7 +20,7 @@ impl dyn FooTrait { #[doc(inline)] pub use incoherent_impl_types::FooStruct; -//@ has foo/struct.FooStruct.html +//@ has foo/type.FooStruct.html //@ count - '//section[@id="method.do_something"]' 1 impl FooStruct { #[rustc_allow_incoherent_impl] diff --git a/tests/rustdoc-html/impl/same-crate-hidden-impl-parameter.rs b/tests/rustdoc-html/impl/same-crate-hidden-impl-parameter.rs index b0beb1bdfa080..dd6ceb3446830 100644 --- a/tests/rustdoc-html/impl/same-crate-hidden-impl-parameter.rs +++ b/tests/rustdoc-html/impl/same-crate-hidden-impl-parameter.rs @@ -9,7 +9,7 @@ pub trait HiddenTrait {} pub enum MyLibType {} -//@ !has foo/enum.MyLibType.html '//*[@id="impl-From%3CHiddenType%3E"]' 'impl From for MyLibType' +//@ !has foo/type.MyLibType.html '//*[@id="impl-From%3CHiddenType%3E"]' 'impl From for MyLibType' impl From for MyLibType { fn from(it: HiddenType) -> MyLibType { match it {} @@ -18,17 +18,17 @@ impl From for MyLibType { pub struct T(T); -//@ !has foo/enum.MyLibType.html '//*[@id="impl-From%3CT%3CT%3CT%3CT%3CHiddenType%3E%3E%3E%3E%3E"]' 'impl From>>>> for MyLibType' +//@ !has foo/type.MyLibType.html '//*[@id="impl-From%3CT%3CT%3CT%3CT%3CHiddenType%3E%3E%3E%3E%3E"]' 'impl From>>>> for MyLibType' impl From>>>> for MyLibType { fn from(it: T>>>) -> MyLibType { todo!() } } -//@ !has foo/enum.MyLibType.html '//*[@id="impl-HiddenTrait"]' 'impl HiddenTrait for MyLibType' +//@ !has foo/type.MyLibType.html '//*[@id="impl-HiddenTrait"]' 'impl HiddenTrait for MyLibType' impl HiddenTrait for MyLibType {} -//@ !has foo/struct.T.html '//*[@id="impl-From%3CMyLibType%3E"]' 'impl From for T>>>' +//@ !has foo/type.T.html '//*[@id="impl-From%3CMyLibType%3E"]' 'impl From for T>>>' impl From for T>>> { fn from(it: MyLibType) -> T>>> { match it {} diff --git a/tests/rustdoc-html/impl/sidebar-trait-impl-disambiguate-78701.rs b/tests/rustdoc-html/impl/sidebar-trait-impl-disambiguate-78701.rs index b1bf029cf847b..bcc56cd380133 100644 --- a/tests/rustdoc-html/impl/sidebar-trait-impl-disambiguate-78701.rs +++ b/tests/rustdoc-html/impl/sidebar-trait-impl-disambiguate-78701.rs @@ -5,7 +5,7 @@ // link to the blanket impl and not the other impl. Basically, we're checking if // the ID is correctly derived. -//@ has 'foo/struct.AnotherStruct.html' +//@ has 'foo/type.AnotherStruct.html' //@ count - '//*[@class="sidebar"]//a[@href="#impl-AnAmazingTrait-for-AnotherStruct%3C()%3E"]' 1 //@ count - '//*[@class="sidebar"]//a[@href="#impl-AnAmazingTrait-for-T"]' 1 diff --git a/tests/rustdoc-html/impl/struct-implementations-title.rs b/tests/rustdoc-html/impl/struct-implementations-title.rs index ca5b5c0ee2031..75ad69dd66904 100644 --- a/tests/rustdoc-html/impl/struct-implementations-title.rs +++ b/tests/rustdoc-html/impl/struct-implementations-title.rs @@ -2,7 +2,7 @@ pub struct Struc; -//@ has foo/struct.Struc.html +//@ has foo/type.Struc.html //@ has - '//*[@id="main-content"]/h2[@id="implementations"]' "Implementations" impl Struc { pub const S: u64 = 0; diff --git a/tests/rustdoc-html/impl/trait-impl.rs b/tests/rustdoc-html/impl/trait-impl.rs index c65eecc4edf9d..0f8faafb77a99 100644 --- a/tests/rustdoc-html/impl/trait-impl.rs +++ b/tests/rustdoc-html/impl/trait-impl.rs @@ -21,7 +21,7 @@ pub trait Trait { pub struct Struct; impl Trait for Struct { - //@ has trait_impl/struct.Struct.html '//*[@id="method.a"]/../../div[@class="docblock"]' 'Some long docs' + //@ has trait_impl/type.Struct.html '//*[@id="method.a"]/../../div[@class="docblock"]' 'Some long docs' //@ !has - '//*[@id="method.a"]/../../div[@class="docblock"]' 'link will be added' //@ has - '//*[@id="method.a"]/../../div[@class="docblock"]/a' 'Read more' //@ has - '//*[@id="method.a"]/../../div[@class="docblock"]/a/@href' 'trait.Trait.html#tymethod.a' diff --git a/tests/rustdoc-html/impl/trait-implementations-duplicate-self-45584.rs b/tests/rustdoc-html/impl/trait-implementations-duplicate-self-45584.rs index 8eb6d00752535..4db8c25722042 100644 --- a/tests/rustdoc-html/impl/trait-implementations-duplicate-self-45584.rs +++ b/tests/rustdoc-html/impl/trait-implementations-duplicate-self-45584.rs @@ -4,13 +4,13 @@ pub trait Bar {} -//@ has 'foo/struct.Foo1.html' +//@ has 'foo/type.Foo1.html' pub struct Foo1; //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1 //@ has - '//*[@class="impl"]' "impl Bar for Foo1" impl Bar for Foo1 {} -//@ has 'foo/struct.Foo2.html' +//@ has 'foo/type.Foo2.html' pub struct Foo2; //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1 //@ has - '//*[@class="impl"]' "impl Bar<&'static Foo2, Foo2> for u8" diff --git a/tests/rustdoc-html/impl/universal-impl-trait.rs b/tests/rustdoc-html/impl/universal-impl-trait.rs index b78d69c0690e0..1d5c44c18a079 100644 --- a/tests/rustdoc-html/impl/universal-impl-trait.rs +++ b/tests/rustdoc-html/impl/universal-impl-trait.rs @@ -21,14 +21,14 @@ pub trait Trait { pub struct S(T); impl S { - //@ has foo/struct.S.html + //@ has foo/type.S.html //@ hasraw - 'bar(' //@ matchesraw - '_bar: impl (' - //@ matchesraw - '_baz:.+struct\.S\.html.+impl .+trait\.Clone\.html' + //@ matchesraw - '_baz:.+type\.S\.html.+impl .+trait\.Clone\.html' pub fn baz(_baz: S) { } diff --git a/tests/rustdoc-html/impl/unneeded-trait-implementations-title.rs b/tests/rustdoc-html/impl/unneeded-trait-implementations-title.rs index f7a97dfaaef47..b6adf5775a931 100644 --- a/tests/rustdoc-html/impl/unneeded-trait-implementations-title.rs +++ b/tests/rustdoc-html/impl/unneeded-trait-implementations-title.rs @@ -2,4 +2,4 @@ pub struct Bar; -//@ count foo/struct.Bar.html '//*[@id="implementations"]' 0 +//@ count foo/type.Bar.html '//*[@id="implementations"]' 0 diff --git a/tests/rustdoc-html/import-remapped-paths.rs b/tests/rustdoc-html/import-remapped-paths.rs index 9e7518f7c0170..c4083719f1b95 100644 --- a/tests/rustdoc-html/import-remapped-paths.rs +++ b/tests/rustdoc-html/import-remapped-paths.rs @@ -12,7 +12,7 @@ extern crate remapped_paths; -//@ has foo/struct.MyStruct.html +//@ has foo/type.MyStruct.html //@ has - '//a[@href="../src/remapped_paths/remapped-paths.rs.html#3"]' 'Source' //@ has - '//a[@href="../src/remapped_paths/remapped-paths.rs.html#8"]' 'Source' diff --git a/tests/rustdoc-html/impossible-default.rs b/tests/rustdoc-html/impossible-default.rs index c9444004d5c75..d19c3a072aa4d 100644 --- a/tests/rustdoc-html/impossible-default.rs +++ b/tests/rustdoc-html/impossible-default.rs @@ -11,17 +11,17 @@ pub trait Foo { fn no_needs_sized(&self) {} } -//@ !has foo/struct.Bar.html '//*[@id="method.needs_sized"]//h4[@class="code-header"]' \ +//@ !has foo/type.Bar.html '//*[@id="method.needs_sized"]//h4[@class="code-header"]' \ // "fn needs_sized" -//@ has foo/struct.Bar.html '//*[@id="method.no_needs_sized"]//h4[@class="code-header"]' \ +//@ has foo/type.Bar.html '//*[@id="method.no_needs_sized"]//h4[@class="code-header"]' \ // "fn no_needs_sized" pub struct Bar([u8]); impl Foo for Bar {} -//@ has foo/struct.Generic.html '//*[@id="method.needs_sized"]//h4[@class="code-header"]' \ +//@ has foo/type.Generic.html '//*[@id="method.needs_sized"]//h4[@class="code-header"]' \ // "fn needs_sized" -//@ has foo/struct.Generic.html '//*[@id="method.no_needs_sized"]//h4[@class="code-header"]' \ +//@ has foo/type.Generic.html '//*[@id="method.no_needs_sized"]//h4[@class="code-header"]' \ // "fn no_needs_sized" pub struct Generic(T); diff --git a/tests/rustdoc-html/inherent-projections.rs b/tests/rustdoc-html/inherent-projections.rs index ced4db9a490c8..a60453b79fe36 100644 --- a/tests/rustdoc-html/inherent-projections.rs +++ b/tests/rustdoc-html/inherent-projections.rs @@ -3,7 +3,7 @@ //@ has 'inherent_projections/fn.create.html' //@ has - '//pre[@class="rust item-decl"]' "create() -> Owner::Metadata" -//@ has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'struct.Owner.html#associatedtype.Metadata' +//@ has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'type.Owner.html#associatedtype.Metadata' pub fn create() -> Owner::Metadata {} pub struct Owner; @@ -29,8 +29,8 @@ impl<'a> Carrier<'a> { //@ has 'inherent_projections/fn.test.html' //@ has - '//pre[@class="rust item-decl"]' "test(_: Parametrized::Proj)" -//@ has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'struct.Parametrized.html#associatedtype.Proj' -//@ !has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'struct.Parametrized.html#associatedtype.Proj-1' +//@ has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'type.Parametrized.html#associatedtype.Proj' +//@ !has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'type.Parametrized.html#associatedtype.Proj-1' pub fn test(_: Parametrized::Proj) {} pub struct Parametrized(T); diff --git a/tests/rustdoc-html/inline_cross/add-docs.rs b/tests/rustdoc-html/inline_cross/add-docs.rs index d4e0c53907064..cc8d708b243bc 100644 --- a/tests/rustdoc-html/inline_cross/add-docs.rs +++ b/tests/rustdoc-html/inline_cross/add-docs.rs @@ -3,7 +3,7 @@ extern crate inner; -//@ has add_docs/struct.MyStruct.html -//@ hasraw add_docs/struct.MyStruct.html "Doc comment from β€˜pub use’, Doc comment from definition" +//@ has add_docs/type.MyStruct.html +//@ hasraw add_docs/type.MyStruct.html "Doc comment from β€˜pub use’, Doc comment from definition" /// Doc comment from 'pub use', pub use inner::MyStruct; diff --git a/tests/rustdoc-html/inline_cross/assoc-const-private-fields-99630.rs b/tests/rustdoc-html/inline_cross/assoc-const-private-fields-99630.rs index b37c11d607d21..1a4637e766337 100644 --- a/tests/rustdoc-html/inline_cross/assoc-const-private-fields-99630.rs +++ b/tests/rustdoc-html/inline_cross/assoc-const-private-fields-99630.rs @@ -9,6 +9,6 @@ extern crate assoc_const_private_fields; -//@ has foo/struct.HasPrivateFields.html +//@ has foo/type.HasPrivateFields.html //@ matches - '//*[@id="associatedconstant.ASSOC"]' '^pub const ASSOC: HasPrivateFields$' pub use assoc_const_private_fields::HasPrivateFields; diff --git a/tests/rustdoc-html/inline_cross/assoc-items.rs b/tests/rustdoc-html/inline_cross/assoc-items.rs index 94bd8950e7595..72dd308b5b5f6 100644 --- a/tests/rustdoc-html/inline_cross/assoc-items.rs +++ b/tests/rustdoc-html/inline_cross/assoc-items.rs @@ -6,7 +6,7 @@ extern crate assoc_items; -//@ has foo/struct.MyStruct.html +//@ has foo/type.MyStruct.html //@ !hasraw - 'PrivateConst' //@ has - '//*[@id="associatedconstant.PublicConst"]' 'pub const PublicConst: u8' //@ has - '//*[@class="docblock"]' 'docs for PublicConst' diff --git a/tests/rustdoc-html/inline_cross/assoc_item_trait_bounds.rs b/tests/rustdoc-html/inline_cross/assoc_item_trait_bounds.rs index d301c35599427..975f11007eee4 100644 --- a/tests/rustdoc-html/inline_cross/assoc_item_trait_bounds.rs +++ b/tests/rustdoc-html/inline_cross/assoc_item_trait_bounds.rs @@ -48,7 +48,7 @@ pub use aux::Aid; // associated types inside trait *impls*. More particularly, check that we don't render // any bounds (here `Self::Alias: ...`) as item bounds unlike all the trait test cases above. -//@ has main/struct.Implementor.html +//@ has main/type.Implementor.html //@ has - '//*[@id="associatedtype.Alias"]' \ // "type Alias = T \ // where \ diff --git a/tests/rustdoc-html/inline_cross/async-fn.rs b/tests/rustdoc-html/inline_cross/async-fn.rs index fb81c61be60d1..38cf9748c0805 100644 --- a/tests/rustdoc-html/inline_cross/async-fn.rs +++ b/tests/rustdoc-html/inline_cross/async-fn.rs @@ -14,6 +14,6 @@ pub use async_fn::load; //@ has - '//*[@id="tymethod.run"]' 'async fn run(&self) -> i32' pub use async_fn::Load; -//@ has user/struct.Loader.html +//@ has user/type.Loader.html //@ has - '//*[@id="method.run"]' 'async fn run(&self) -> i32' pub use async_fn::Loader; diff --git a/tests/rustdoc-html/inline_cross/attributes.rs b/tests/rustdoc-html/inline_cross/attributes.rs index 324686a33612f..2a05618c9ca1d 100644 --- a/tests/rustdoc-html/inline_cross/attributes.rs +++ b/tests/rustdoc-html/inline_cross/attributes.rs @@ -16,5 +16,5 @@ pub use attributes::link_section; // '#[unsafe(export_name = "exonym")]' pub use attributes::export_name; -//@ has 'user/struct.NonExhaustive.html' '//pre[@class="rust item-decl"]' '#[non_exhaustive]' +//@ has 'user/type.NonExhaustive.html' '//pre[@class="rust item-decl"]' '#[non_exhaustive]' pub use attributes::NonExhaustive; diff --git a/tests/rustdoc-html/inline_cross/const-fn-27362.rs b/tests/rustdoc-html/inline_cross/const-fn-27362.rs index bc2587b7f00a7..ddab9dc46a2d9 100644 --- a/tests/rustdoc-html/inline_cross/const-fn-27362.rs +++ b/tests/rustdoc-html/inline_cross/const-fn-27362.rs @@ -10,4 +10,4 @@ pub use issue_27362_aux::*; //@ matches issue_27362/fn.foo.html '//pre' "pub const fn foo()" //@ matches issue_27362/fn.bar.html '//pre' "pub const unsafe fn bar()" -//@ matches issue_27362/struct.Foo.html '//h4[@class="code-header"]' "const unsafe fn baz()" +//@ matches issue_27362/type.Foo.html '//h4[@class="code-header"]' "const unsafe fn baz()" diff --git a/tests/rustdoc-html/inline_cross/cross-glob.rs b/tests/rustdoc-html/inline_cross/cross-glob.rs index d22e48a5d7635..5ed019f0ce89d 100644 --- a/tests/rustdoc-html/inline_cross/cross-glob.rs +++ b/tests/rustdoc-html/inline_cross/cross-glob.rs @@ -5,6 +5,7 @@ extern crate inner; //@ has cross_glob/struct.SomeStruct.html +//@ has cross_glob/type.SomeStruct.html //@ has cross_glob/fn.some_fn.html //@ !has cross_glob/enum.Shadowed.html //@ !has cross_glob/index.html '//code' 'pub use inner::*;' @@ -13,4 +14,6 @@ pub use inner::*; // This type shadows the glob-imported enum `Shadowed`. //@ has cross_glob/type.Shadowed.html +//@ !has cross_glob/enum.Shadowed.html +//@ !has cross_glob/struct.Shadowed.html pub type Shadowed = u8; diff --git a/tests/rustdoc-html/inline_cross/default-trait-method.rs b/tests/rustdoc-html/inline_cross/default-trait-method.rs index e589fc6cb8527..fa982c37963cd 100644 --- a/tests/rustdoc-html/inline_cross/default-trait-method.rs +++ b/tests/rustdoc-html/inline_cross/default-trait-method.rs @@ -11,7 +11,7 @@ extern crate foo; //@ !has - '//*[@id="method.baz"]' 'default fn baz()' pub use foo::Item; -//@ has default_trait_method/struct.Foo.html +//@ has default_trait_method/type.Foo.html //@ has - '//*[@id="method.foo"]' 'default fn foo()' //@ has - '//*[@id="method.bar"]' 'fn bar()' //@ !has - '//*[@id="method.bar"]' 'default fn bar()' diff --git a/tests/rustdoc-html/inline_cross/doc-auto-cfg.rs b/tests/rustdoc-html/inline_cross/doc-auto-cfg.rs index 6c69dfe5ac8a9..d1f29c0164af2 100644 --- a/tests/rustdoc-html/inline_cross/doc-auto-cfg.rs +++ b/tests/rustdoc-html/inline_cross/doc-auto-cfg.rs @@ -27,7 +27,7 @@ pub mod pre { // FIXME(HtmlDocCk): Ideally I would've used the following XPath here: // `*[@class="impl-items"][*[@id="method.transform"]]//*[@class="stab portability"]` // - //@ has 'it/pre/struct.Kind.html' '//*[@id="method.transform"]' '' + //@ has 'it/pre/type.Kind.html' '//*[@id="method.transform"]' '' //@ has - '//*[@class="impl-items"]//*[@class="stab portability"]' \ // 'Available on extension only.' pub use doc_auto_cfg::Type as Kind; @@ -38,7 +38,7 @@ pub mod post { // issue: //@ has 'it/post/index.html' '//*[@class="stab portability"]' 'extra' //@ has - '//*[@class="stab portability"]' 'extension and extra' - //@ has 'it/post/struct.Type.html' '//*[@class="stab portability"]' \ + //@ has 'it/post/type.Type.html' '//*[@class="stab portability"]' \ // 'Available on crate feature extra only.' //@ has 'it/post/fn.compute.html' '//*[@class="stab portability"]' \ // 'Available on extension and crate feature extra only.' @@ -46,7 +46,7 @@ pub mod post { pub use doc_auto_cfg::*; //@ has 'it/post/index.html' '//*[@class="stab portability"]' 'addon' - //@ has 'it/post/struct.Addon.html' '//*[@class="stab portability"]' \ + //@ has 'it/post/type.Addon.html' '//*[@class="stab portability"]' \ // 'Available on crate feature addon only.' #[cfg(feature = "addon")] pub use doc_auto_cfg::Type as Addon; diff --git a/tests/rustdoc-html/inline_cross/doc-hidden-broken-link-28480.rs b/tests/rustdoc-html/inline_cross/doc-hidden-broken-link-28480.rs index e1ca7403c03f6..c6c6e8a0f7159 100644 --- a/tests/rustdoc-html/inline_cross/doc-hidden-broken-link-28480.rs +++ b/tests/rustdoc-html/inline_cross/doc-hidden-broken-link-28480.rs @@ -5,12 +5,12 @@ //@ build-aux-docs //@ ignore-cross-compile -//@ has rustdoc_hidden_sig/struct.Bar.html +//@ has rustdoc_hidden_sig/type.Bar.html //@ !has - '//a/@title' 'Hidden' //@ has - '//a' 'u8' extern crate rustdoc_hidden_sig; -//@ has foobar/struct.Bar.html +//@ has foobar/type.Bar.html //@ !has - '//a/@title' 'Hidden' //@ has - '//a' 'u8' pub use rustdoc_hidden_sig::Bar; diff --git a/tests/rustdoc-html/inline_cross/doc-hidden-extern-trait-impl-29584.rs b/tests/rustdoc-html/inline_cross/doc-hidden-extern-trait-impl-29584.rs index 2459dbdaeed60..28eaf5009e7a5 100644 --- a/tests/rustdoc-html/inline_cross/doc-hidden-extern-trait-impl-29584.rs +++ b/tests/rustdoc-html/inline_cross/doc-hidden-extern-trait-impl-29584.rs @@ -6,6 +6,6 @@ extern crate issue_29584; -//@ has issue_29584/struct.Foo.html +//@ has issue_29584/type.Foo.html //@ !hasraw - 'impl Bar for' pub use issue_29584::Foo; diff --git a/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-1.rs b/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-1.rs index baab1da95470c..a2fa0f6ee8bb9 100644 --- a/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-1.rs +++ b/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-1.rs @@ -7,7 +7,7 @@ extern crate rustdoc_nonreachable_impls; -//@ has foobar/struct.Wobble.html +//@ has foobar/type.Wobble.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for' diff --git a/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-2.rs b/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-2.rs index 40e9108ec62ef..2b7f95ce49388 100644 --- a/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-2.rs +++ b/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948-2.rs @@ -7,7 +7,7 @@ extern crate rustdoc_nonreachable_impls; -//@ has foobar/struct.Wobble.html +//@ has foobar/type.Wobble.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for' diff --git a/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948.rs b/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948.rs index ab0048513c729..39d0db4838005 100644 --- a/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948.rs +++ b/tests/rustdoc-html/inline_cross/doc-reachability-impl-31948.rs @@ -7,7 +7,7 @@ extern crate rustdoc_nonreachable_impls; -//@ has foobar/struct.Foo.html +//@ has foobar/type.Foo.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for' @@ -28,5 +28,5 @@ pub use rustdoc_nonreachable_impls::Woof; //@ !has foobar/trait.Bar.html //@ !has foobar/trait.Qux.html -//@ !has foobar/struct.Wibble.html -//@ !has foobar/struct.Wobble.html +//@ !has foobar/type.Wibble.html +//@ !has foobar/type.Wobble.html diff --git a/tests/rustdoc-html/inline_cross/early-late-bound-lifetime-params.rs b/tests/rustdoc-html/inline_cross/early-late-bound-lifetime-params.rs index 36542a2d6fc9e..3dd5602426aa3 100644 --- a/tests/rustdoc-html/inline_cross/early-late-bound-lifetime-params.rs +++ b/tests/rustdoc-html/inline_cross/early-late-bound-lifetime-params.rs @@ -12,6 +12,6 @@ //@ has - '//pre[@class="rust item-decl"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>(_: impl Copy)" pub use dep::f; -//@ has usr/struct.Ty.html +//@ has usr/type.Ty.html //@ has - '//*[@id="method.f"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>(_: impl Copy)" pub use dep::Ty; diff --git a/tests/rustdoc-html/inline_cross/generic-const-items.rs b/tests/rustdoc-html/inline_cross/generic-const-items.rs index 70018b6ddb556..aa965e912c8d1 100644 --- a/tests/rustdoc-html/inline_cross/generic-const-items.rs +++ b/tests/rustdoc-html/inline_cross/generic-const-items.rs @@ -17,7 +17,7 @@ pub use generic_const_items::K; // T: 'a + Eq" pub use generic_const_items::Trait; -//@ has user/struct.Implementor.html +//@ has user/type.Implementor.html //@ has - '//h3[@class="code-header"]' 'impl Trait for Implementor' //@ has - '//*[@id="associatedconstant.C"]' \ // "const C<'a>: &'a str = \"C\" \ diff --git a/tests/rustdoc-html/inline_cross/hidden-use.rs b/tests/rustdoc-html/inline_cross/hidden-use.rs index 3f15881345c44..4122743270812 100644 --- a/tests/rustdoc-html/inline_cross/hidden-use.rs +++ b/tests/rustdoc-html/inline_cross/hidden-use.rs @@ -7,6 +7,6 @@ extern crate rustdoc_hidden; //@ has hidden_use/index.html //@ !hasraw - 'rustdoc_hidden' //@ !hasraw - 'Bar' -//@ !has hidden_use/struct.Bar.html +//@ !has hidden_use/type.Bar.html #[doc(hidden)] pub use rustdoc_hidden::Bar; diff --git a/tests/rustdoc-html/inline_cross/impl-inline-without-trait.rs b/tests/rustdoc-html/inline_cross/impl-inline-without-trait.rs index d2f19400271ec..489dfc51e047a 100644 --- a/tests/rustdoc-html/inline_cross/impl-inline-without-trait.rs +++ b/tests/rustdoc-html/inline_cross/impl-inline-without-trait.rs @@ -6,7 +6,7 @@ extern crate impl_inline_without_trait; -//@ has 'foo/struct.MyStruct.html' +//@ has 'foo/type.MyStruct.html' //@ has - '//*[@id="method.my_trait_method"]' 'fn my_trait_method()' //@ has - '//div[@class="docblock"]' 'docs for my_trait_method' pub use impl_inline_without_trait::MyStruct; diff --git a/tests/rustdoc-html/inline_cross/impl_trait.rs b/tests/rustdoc-html/inline_cross/impl_trait.rs index 468ac0830619b..1fe696a16ef67 100644 --- a/tests/rustdoc-html/inline_cross/impl_trait.rs +++ b/tests/rustdoc-html/inline_cross/impl_trait.rs @@ -33,7 +33,7 @@ pub use impl_trait_aux::func4; //@ !has - '//pre[@class="rust item-decl"]' 'where' pub use impl_trait_aux::func5; -//@ has impl_trait/struct.Foo.html +//@ has impl_trait/type.Foo.html //@ has - '//*[@id="method.method"]//h4[@class="code-header"]' "pub fn method<'a>(_x: impl Clone + Into> + 'a)" //@ !has - '//*[@id="method.method"]//h4[@class="code-header"]' 'where' pub use impl_trait_aux::Foo; diff --git a/tests/rustdoc-html/inline_cross/intra-doc-crate/self.rs b/tests/rustdoc-html/inline_cross/intra-doc-crate/self.rs index 95b21a3303ff2..faa02bda3c00e 100644 --- a/tests/rustdoc-html/inline_cross/intra-doc-crate/self.rs +++ b/tests/rustdoc-html/inline_cross/intra-doc-crate/self.rs @@ -3,7 +3,7 @@ extern crate cross_crate_self; -//@ has self/struct.S.html '//a[@href="struct.S.html#method.f"]' "Self::f" -//@ has self/struct.S.html '//a[@href="struct.S.html"]' "Self" -//@ has self/struct.S.html '//a[@href="../cross_crate_self/index.html"]' "crate" +//@ has self/type.S.html '//a[@href="type.S.html#method.f"]' "Self::f" +//@ has self/type.S.html '//a[@href="type.S.html"]' "Self" +//@ has self/type.S.html '//a[@href="../cross_crate_self/index.html"]' "crate" pub use cross_crate_self::S; diff --git a/tests/rustdoc-html/inline_cross/reexport-with-anonymous-lifetime-98697.rs b/tests/rustdoc-html/inline_cross/reexport-with-anonymous-lifetime-98697.rs index bb4ced085c31c..065d1294983c8 100644 --- a/tests/rustdoc-html/inline_cross/reexport-with-anonymous-lifetime-98697.rs +++ b/tests/rustdoc-html/inline_cross/reexport-with-anonymous-lifetime-98697.rs @@ -13,6 +13,6 @@ extern crate reexport_with_anonymous_lifetime_98697; //@ !has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'for<' pub use reexport_with_anonymous_lifetime_98697::repro; -//@ has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl MyTrait<&Extra> for Extra' -//@ !has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl<' +//@ has foo/type.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl MyTrait<&Extra> for Extra' +//@ !has foo/type.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl<' pub use reexport_with_anonymous_lifetime_98697::Extra; diff --git a/tests/rustdoc-html/inline_cross/renamed-via-module.rs b/tests/rustdoc-html/inline_cross/renamed-via-module.rs index 8bcdd9f7a39d0..7bcf8a7484c34 100644 --- a/tests/rustdoc-html/inline_cross/renamed-via-module.rs +++ b/tests/rustdoc-html/inline_cross/renamed-via-module.rs @@ -7,22 +7,22 @@ extern crate foo; //@ has foo/iter/index.html -//@ has - '//a/[@href="struct.DeprecatedStepBy.html"]' "DeprecatedStepBy" -//@ has - '//a/[@href="struct.StepBy.html"]' "StepBy" -//@ has foo/iter/struct.DeprecatedStepBy.html +//@ has - '//a/[@href="type.DeprecatedStepBy.html"]' "DeprecatedStepBy" +//@ has - '//a/[@href="type.StepBy.html"]' "StepBy" +//@ has foo/iter/type.DeprecatedStepBy.html //@ has - '//h1' "Struct DeprecatedStepBy" //@ matches - '//*[@class="rustdoc-breadcrumbs"]' 'foo::iter' -//@ has foo/iter/struct.StepBy.html +//@ has foo/iter/type.StepBy.html //@ has - '//h1' "Struct StepBy" //@ matches - '//*[@class="rustdoc-breadcrumbs"]' 'foo::iter' //@ has bar/iter/index.html -//@ has - '//a/[@href="struct.DeprecatedStepBy.html"]' "DeprecatedStepBy" -//@ has - '//a/[@href="struct.StepBy.html"]' "StepBy" -//@ has bar/iter/struct.DeprecatedStepBy.html +//@ has - '//a/[@href="type.DeprecatedStepBy.html"]' "DeprecatedStepBy" +//@ has - '//a/[@href="type.StepBy.html"]' "StepBy" +//@ has bar/iter/type.DeprecatedStepBy.html //@ has - '//h1' "Struct DeprecatedStepBy" //@ matches - '//*[@class="rustdoc-breadcrumbs"]' 'bar::iter' -//@ has bar/iter/struct.StepBy.html +//@ has bar/iter/type.StepBy.html //@ has - '//h1' "Struct StepBy" //@ matches - '//*[@class="rustdoc-breadcrumbs"]' 'bar::iter' pub use foo::iter; diff --git a/tests/rustdoc-html/inline_cross/ret-pos-impl-trait-in-trait.rs b/tests/rustdoc-html/inline_cross/ret-pos-impl-trait-in-trait.rs index fba39ca835807..f83779cebd114 100644 --- a/tests/rustdoc-html/inline_cross/ret-pos-impl-trait-in-trait.rs +++ b/tests/rustdoc-html/inline_cross/ret-pos-impl-trait-in-trait.rs @@ -13,17 +13,17 @@ //@ count - '//*[@id="main-content"]//section[@class="method"]' 1 pub use rpitit::Trait; -//@ has user/struct.Basic.html +//@ has user/type.Basic.html //@ has - '//*[@id="method.create"]' 'fn create() -> impl Iterator' //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl-items"]' 1 pub use rpitit::Basic; -//@ has user/struct.Intermediate.html +//@ has user/type.Intermediate.html //@ has - '//*[@id="method.create"]' 'fn create() -> Range' //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl-items"]' 1 pub use rpitit::Intermediate; -//@ has user/struct.Advanced.html +//@ has user/type.Advanced.html //@ has - '//*[@id="method.create"]' 'fn create() -> impl Iterator' //@ count - '//*[@id="trait-implementations-list"]//*[@class="impl-items"]' 1 pub use rpitit::Advanced; diff --git a/tests/rustdoc-html/inline_cross/rustc-private-76736-1.rs b/tests/rustdoc-html/inline_cross/rustc-private-76736-1.rs index 3ffa5e6cc06e9..6584b822e4def 100644 --- a/tests/rustdoc-html/inline_cross/rustc-private-76736-1.rs +++ b/tests/rustdoc-html/inline_cross/rustc-private-76736-1.rs @@ -8,10 +8,10 @@ extern crate issue_76736_1; extern crate issue_76736_2; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub struct Foo; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub use issue_76736_2::Bar; diff --git a/tests/rustdoc-html/inline_cross/rustc-private-76736-2.rs b/tests/rustdoc-html/inline_cross/rustc-private-76736-2.rs index 843b2941602cb..0e1e9f5a8d1a6 100644 --- a/tests/rustdoc-html/inline_cross/rustc-private-76736-2.rs +++ b/tests/rustdoc-html/inline_cross/rustc-private-76736-2.rs @@ -11,10 +11,10 @@ extern crate issue_76736_1; extern crate issue_76736_2; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub struct Foo; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub use issue_76736_2::Bar; diff --git a/tests/rustdoc-html/inline_cross/rustc-private-76736-3.rs b/tests/rustdoc-html/inline_cross/rustc-private-76736-3.rs index f9b46caa02ff6..4a1a4b1fa81e2 100644 --- a/tests/rustdoc-html/inline_cross/rustc-private-76736-3.rs +++ b/tests/rustdoc-html/inline_cross/rustc-private-76736-3.rs @@ -9,10 +9,10 @@ extern crate issue_76736_1; extern crate issue_76736_2; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub struct Foo; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub use issue_76736_2::Bar; diff --git a/tests/rustdoc-html/inline_cross/rustc-private-76736-4.rs b/tests/rustdoc-html/inline_cross/rustc-private-76736-4.rs index 511464f2c498f..c51be6f22c456 100644 --- a/tests/rustdoc-html/inline_cross/rustc-private-76736-4.rs +++ b/tests/rustdoc-html/inline_cross/rustc-private-76736-4.rs @@ -12,10 +12,10 @@ extern crate issue_76736_1; extern crate issue_76736_2; -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub struct Foo; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'MaybeResult' pub use issue_76736_2::Bar; diff --git a/tests/rustdoc-html/inline_cross/sugar-closure-crate-21801.rs b/tests/rustdoc-html/inline_cross/sugar-closure-crate-21801.rs index 0cd400c03eccf..3ec5244546149 100644 --- a/tests/rustdoc-html/inline_cross/sugar-closure-crate-21801.rs +++ b/tests/rustdoc-html/inline_cross/sugar-closure-crate-21801.rs @@ -6,7 +6,7 @@ extern crate issue_21801; -//@ has issue_21801/struct.Foo.html +//@ has issue_21801/type.Foo.html //@ has - '//*[@id="method.new"]' \ // 'fn new(f: F) -> Foowhere F: FnMut() -> i32' pub use issue_21801::Foo; diff --git a/tests/rustdoc-html/inline_cross/trait-vis.rs b/tests/rustdoc-html/inline_cross/trait-vis.rs index 1fae6305b04cf..0bd3d3cea2774 100644 --- a/tests/rustdoc-html/inline_cross/trait-vis.rs +++ b/tests/rustdoc-html/inline_cross/trait-vis.rs @@ -2,6 +2,6 @@ extern crate inner; -//@ has trait_vis/struct.SomeStruct.html +//@ has trait_vis/type.SomeStruct.html //@ has - '//h3[@class="code-header"]' 'impl Clone for SomeStruct' pub use inner::SomeStruct; diff --git a/tests/rustdoc-html/inline_local/blanket-impl-reexported-trait-94183.rs b/tests/rustdoc-html/inline_local/blanket-impl-reexported-trait-94183.rs index 66d313a45061c..0bb3bb4fae8da 100644 --- a/tests/rustdoc-html/inline_local/blanket-impl-reexported-trait-94183.rs +++ b/tests/rustdoc-html/inline_local/blanket-impl-reexported-trait-94183.rs @@ -5,7 +5,7 @@ // https://github.com/rust-lang/rust/issues/94183 #![crate_name = "foo"] -//@ has 'foo/struct.S.html' +//@ has 'foo/type.S.html' mod actual_sub { pub trait Actual {} diff --git a/tests/rustdoc-html/inline_local/doc-no-inline-32343.rs b/tests/rustdoc-html/inline_local/doc-no-inline-32343.rs index ed11614a50038..687ee2fd96db8 100644 --- a/tests/rustdoc-html/inline_local/doc-no-inline-32343.rs +++ b/tests/rustdoc-html/inline_local/doc-no-inline-32343.rs @@ -1,14 +1,14 @@ // https://github.com/rust-lang/rust/issues/32343 #![crate_name="foobar"] -//@ !has foobar/struct.Foo.html +//@ !has foobar/type.Foo.html //@ has foobar/index.html //@ has - '//code' 'pub use foo::Foo' //@ !has - '//code/a' 'Foo' #[doc(no_inline)] pub use foo::Foo; -//@ !has foobar/struct.Bar.html +//@ !has foobar/type.Bar.html //@ has foobar/index.html //@ has - '//code' 'pub use foo::Bar' //@ has - '//code/a' 'Bar' @@ -21,6 +21,6 @@ mod foo { } pub mod bar { - //@ has foobar/bar/struct.Bar.html + //@ has foobar/bar/type.Bar.html pub use ::foo::Bar; } diff --git a/tests/rustdoc-html/inline_local/fully-stable-path-is-better.rs b/tests/rustdoc-html/inline_local/fully-stable-path-is-better.rs index 343e66cfc9666..38e0eb47ad70e 100644 --- a/tests/rustdoc-html/inline_local/fully-stable-path-is-better.rs +++ b/tests/rustdoc-html/inline_local/fully-stable-path-is-better.rs @@ -33,8 +33,8 @@ pub mod stb2 { #[stable(since = "1.0", feature = "nested")] pub mod nested { //! [Inside1] [Inside2] - //@ has foo/nested/index.html '//a[@href="../stb1/struct.Inside1.html"]' 'Inside1' - //@ has foo/nested/index.html '//a[@href="../stb2/struct.Inside2.html"]' 'Inside2' + //@ has foo/nested/index.html '//a[@href="../stb1/type.Inside1.html"]' 'Inside1' + //@ has foo/nested/index.html '//a[@href="../stb2/type.Inside2.html"]' 'Inside2' use crate::stb1::Inside1; use crate::stb2::Inside2; } diff --git a/tests/rustdoc-html/inline_local/glob-private-document-private-items.rs b/tests/rustdoc-html/inline_local/glob-private-document-private-items.rs index 4ad36da843f80..b134bfe72be63 100644 --- a/tests/rustdoc-html/inline_local/glob-private-document-private-items.rs +++ b/tests/rustdoc-html/inline_local/glob-private-document-private-items.rs @@ -21,10 +21,10 @@ pub use mod1::*; //@ !hasraw - "mod2" //@ hasraw - "Mod2Public" //@ !hasraw - "Mod2Private" -//@ has foo/struct.Mod1Public.html -//@ !has foo/struct.Mod1Private.html -//@ has foo/struct.Mod2Public.html -//@ !has foo/struct.Mod2Private.html +//@ has foo/type.Mod1Public.html +//@ !has foo/type.Mod1Private.html +//@ has foo/type.Mod2Public.html +//@ !has foo/type.Mod2Private.html //@ has foo/mod1/index.html //@ hasraw - "mod2" @@ -32,17 +32,17 @@ pub use mod1::*; //@ hasraw - "Mod1Private" //@ !hasraw - "Mod2Public" //@ !hasraw - "Mod2Private" -//@ has foo/mod1/struct.Mod1Public.html -//@ has foo/mod1/struct.Mod1Private.html -//@ !has foo/mod1/struct.Mod2Public.html -//@ !has foo/mod1/struct.Mod2Private.html +//@ has foo/mod1/type.Mod1Public.html +//@ has foo/mod1/type.Mod1Private.html +//@ !has foo/mod1/type.Mod2Public.html +//@ !has foo/mod1/type.Mod2Private.html //@ has foo/mod1/mod2/index.html //@ hasraw - "Mod2Public" //@ hasraw - "Mod2Private" -//@ has foo/mod1/mod2/struct.Mod2Public.html -//@ has foo/mod1/mod2/struct.Mod2Private.html +//@ has foo/mod1/mod2/type.Mod2Public.html +//@ has foo/mod1/mod2/type.Mod2Private.html //@ !has foo/mod2/index.html -//@ !has foo/mod2/struct.Mod2Public.html -//@ !has foo/mod2/struct.Mod2Private.html +//@ !has foo/mod2/type.Mod2Public.html +//@ !has foo/mod2/type.Mod2Private.html diff --git a/tests/rustdoc-html/inline_local/glob-private.rs b/tests/rustdoc-html/inline_local/glob-private.rs index d6499d27a2535..11265ad1c1bee 100644 --- a/tests/rustdoc-html/inline_local/glob-private.rs +++ b/tests/rustdoc-html/inline_local/glob-private.rs @@ -19,24 +19,24 @@ pub use mod1::*; //@ !hasraw - "mod2" //@ hasraw - "Mod2Public" //@ !hasraw - "Mod2Private" -//@ has foo/struct.Mod1Public.html -//@ !has foo/struct.Mod1Private.html -//@ has foo/struct.Mod2Public.html -//@ !has foo/struct.Mod2Private.html +//@ has foo/type.Mod1Public.html +//@ !has foo/type.Mod1Private.html +//@ has foo/type.Mod2Public.html +//@ !has foo/type.Mod2Private.html //@ has-dir foo/mod1 //@ !has foo/mod1/index.html -//@ has foo/mod1/struct.Mod1Public.html -//@ !has foo/mod1/struct.Mod1Private.html -//@ !has foo/mod1/struct.Mod2Public.html -//@ !has foo/mod1/struct.Mod2Private.html +//@ has foo/mod1/type.Mod1Public.html +//@ !has foo/mod1/type.Mod1Private.html +//@ !has foo/mod1/type.Mod2Public.html +//@ !has foo/mod1/type.Mod2Private.html //@ has-dir foo/mod1/mod2 //@ !has foo/mod1/mod2/index.html -//@ has foo/mod1/mod2/struct.Mod2Public.html -//@ !has foo/mod1/mod2/struct.Mod2Private.html +//@ has foo/mod1/mod2/type.Mod2Public.html +//@ !has foo/mod1/mod2/type.Mod2Private.html //@ !has-dir foo/mod2 //@ !has foo/mod2/index.html -//@ !has foo/mod2/struct.Mod2Public.html -//@ !has foo/mod2/struct.Mod2Private.html +//@ !has foo/mod2/type.Mod2Public.html +//@ !has foo/mod2/type.Mod2Private.html diff --git a/tests/rustdoc-html/inline_local/hidden-use.rs b/tests/rustdoc-html/inline_local/hidden-use.rs index 35bce2932f909..a0ad0893c61e6 100644 --- a/tests/rustdoc-html/inline_local/hidden-use.rs +++ b/tests/rustdoc-html/inline_local/hidden-use.rs @@ -5,6 +5,6 @@ mod private { //@ has hidden_use/index.html //@ !hasraw - 'private' //@ !hasraw - 'Foo' -//@ !has hidden_use/struct.Foo.html +//@ !has hidden_use/type.Foo.html #[doc(hidden)] pub use private::Foo; diff --git a/tests/rustdoc-html/inline_local/parent-path-is-better.rs b/tests/rustdoc-html/inline_local/parent-path-is-better.rs index 086540d54441b..4051b91b5f90e 100644 --- a/tests/rustdoc-html/inline_local/parent-path-is-better.rs +++ b/tests/rustdoc-html/inline_local/parent-path-is-better.rs @@ -25,11 +25,11 @@ pub mod inside2 { pub mod nested { //! [Inside1] [Inside2] - //@ has foo/nested/index.html '//a[@href="../struct.Inside1.html"]' 'Inside1' - //@ has foo/nested/index.html '//a[@href="../struct.Inside2.html"]' 'Inside2' + //@ has foo/nested/index.html '//a[@href="../type.Inside1.html"]' 'Inside1' + //@ has foo/nested/index.html '//a[@href="../type.Inside2.html"]' 'Inside2' //! [Inside1::stuff] [Inside2::stuff] - //@ has foo/nested/index.html '//a[@href="../struct.Inside1.html#method.stuff"]' 'Inside1::stuff' - //@ has foo/nested/index.html '//a[@href="../struct.Inside2.html#method.stuff"]' 'Inside2::stuff' + //@ has foo/nested/index.html '//a[@href="../type.Inside1.html#method.stuff"]' 'Inside1::stuff' + //@ has foo/nested/index.html '//a[@href="../type.Inside2.html#method.stuff"]' 'Inside2::stuff' use crate::inside1::Inside1; use crate::inside2::Inside2; } diff --git a/tests/rustdoc-html/inline_local/please_inline.rs b/tests/rustdoc-html/inline_local/please_inline.rs index ad7a30012a8b1..e5bed3f85cbff 100644 --- a/tests/rustdoc-html/inline_local/please_inline.rs +++ b/tests/rustdoc-html/inline_local/please_inline.rs @@ -5,7 +5,7 @@ pub mod foo { //@ has please_inline/a/index.html pub mod a { //@ !hasraw - 'pub use foo::' - //@ has please_inline/a/struct.Foo.html + //@ has please_inline/a/type.Foo.html #[doc(inline)] pub use foo::Foo; } @@ -13,7 +13,7 @@ pub mod a { //@ has please_inline/b/index.html pub mod b { //@ hasraw - 'pub use foo::' - //@ !has please_inline/b/struct.Foo.html + //@ !has please_inline/b/type.Foo.html #[feature(inline)] pub use foo::Foo; } diff --git a/tests/rustdoc-html/inline_local/pub-re-export-28537.rs b/tests/rustdoc-html/inline_local/pub-re-export-28537.rs index 0e9836c7ceeab..1ae1588e482a8 100644 --- a/tests/rustdoc-html/inline_local/pub-re-export-28537.rs +++ b/tests/rustdoc-html/inline_local/pub-re-export-28537.rs @@ -13,8 +13,8 @@ mod bar { } } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html pub use foo::Foo; -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html pub use self::bar::Bar; diff --git a/tests/rustdoc-html/inline_local/staged-inline.rs b/tests/rustdoc-html/inline_local/staged-inline.rs index d0dc3f9eea7f1..4b0d0f0d2c559 100644 --- a/tests/rustdoc-html/inline_local/staged-inline.rs +++ b/tests/rustdoc-html/inline_local/staged-inline.rs @@ -6,14 +6,14 @@ #[stable(feature = "v1", since="1.0.0")] pub mod ffi { #[stable(feature = "core_ffi", since="1.99.0")] - //@ has "foo/ffi/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.99.0" + //@ has "foo/ffi/type.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.99.0" //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.0.0" pub struct CStr; } #[stable(feature = "v1", since = "1.0.0")] #[doc(inline)] -//@ has "foo/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.0.0" +//@ has "foo/type.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.0.0" //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.99.0" pub use ffi::CStr; diff --git a/tests/rustdoc-html/inline_local/trait-vis.rs b/tests/rustdoc-html/inline_local/trait-vis.rs index 1e5929a9ccfd5..a9dccdcbd7991 100644 --- a/tests/rustdoc-html/inline_local/trait-vis.rs +++ b/tests/rustdoc-html/inline_local/trait-vis.rs @@ -12,7 +12,7 @@ mod asdf { impl PrivateTrait for SomeStruct {} } -//@ has trait_vis/struct.SomeStruct.html +//@ has trait_vis/type.SomeStruct.html //@ has - '//h3[@class="code-header"]' 'impl ThisTrait for SomeStruct' //@ !has - '//h3[@class="code-header"]' 'impl PrivateTrait for SomeStruct' pub use asdf::SomeStruct; diff --git a/tests/rustdoc-html/internal.rs b/tests/rustdoc-html/internal.rs index 244e9138f2ba0..a731ed8707dce 100644 --- a/tests/rustdoc-html/internal.rs +++ b/tests/rustdoc-html/internal.rs @@ -10,8 +10,8 @@ // '' //@ matches - '//dd' 'Docs' -//@ !has internal/struct.S.html '//*[@class="stab unstable"]' '' -//@ !has internal/struct.S.html '//*[@class="stab internal"]' '' +//@ !has internal/type.S.html '//*[@class="stab unstable"]' '' +//@ !has internal/type.S.html '//*[@class="stab internal"]' '' /// Docs pub struct S; diff --git a/tests/rustdoc-html/intra-doc/adt-through-alias.rs b/tests/rustdoc-html/intra-doc/adt-through-alias.rs index 6d5454bbaf200..eda955fc68524 100644 --- a/tests/rustdoc-html/intra-doc/adt-through-alias.rs +++ b/tests/rustdoc-html/intra-doc/adt-through-alias.rs @@ -20,18 +20,18 @@ //@ has foo/index.html '//a[@href="type.TheEnumAlias.html#variant.TheVariant.field.the_field"]' 'TheEnumAlias::TheVariant::the_field' //@ has foo/index.html '//a[@href="type.TheUnionAlias.html#structfield.f1"]' 'TheUnionAlias::f1' -//@ has foo/index.html '//a[@href="struct.TheStruct.html#method.trait_"]' 'TheStruct::trait_' -//@ has foo/index.html '//a[@href="struct.TheStruct.html#method.trait_"]' 'TheStructAlias::trait_' -//@ has foo/index.html '//a[@href="enum.TheEnum.html#method.trait_"]' 'TheEnum::trait_' +//@ has foo/index.html '//a[@href="type.TheStruct.html#method.trait_"]' 'TheStruct::trait_' +//@ has foo/index.html '//a[@href="type.TheStruct.html#method.trait_"]' 'TheStructAlias::trait_' +//@ has foo/index.html '//a[@href="type.TheEnum.html#method.trait_"]' 'TheEnum::trait_' // FIXME: this one should resolve to alias since it's impl Trait for TheEnumAlias -//@ has foo/index.html '//a[@href="enum.TheEnum.html#method.trait_"]' 'TheEnumAlias::trait_' +//@ has foo/index.html '//a[@href="type.TheEnum.html#method.trait_"]' 'TheEnumAlias::trait_' -//@ has foo/index.html '//a[@href="struct.TheStruct.html#method.inherent"]' 'TheStruct::inherent' +//@ has foo/index.html '//a[@href="type.TheStruct.html#method.inherent"]' 'TheStruct::inherent' // FIXME: this one should resolve to alias -//@ has foo/index.html '//a[@href="struct.TheStruct.html#method.inherent"]' 'TheStructAlias::inherent' -//@ has foo/index.html '//a[@href="enum.TheEnum.html#method.inherent"]' 'TheEnum::inherent' +//@ has foo/index.html '//a[@href="type.TheStruct.html#method.inherent"]' 'TheStructAlias::inherent' +//@ has foo/index.html '//a[@href="type.TheEnum.html#method.inherent"]' 'TheEnum::inherent' // FIXME: this one should resolve to alias -//@ has foo/index.html '//a[@href="enum.TheEnum.html#method.inherent"]' 'TheEnumAlias::inherent' +//@ has foo/index.html '//a[@href="type.TheEnum.html#method.inherent"]' 'TheEnumAlias::inherent' pub struct TheStruct { pub the_field: i32, diff --git a/tests/rustdoc-html/intra-doc/anchors.rs b/tests/rustdoc-html/intra-doc/anchors.rs index 68f8c4fefd9de..a758ab38fd8d0 100644 --- a/tests/rustdoc-html/intra-doc/anchors.rs +++ b/tests/rustdoc-html/intra-doc/anchors.rs @@ -3,8 +3,8 @@ /// # Anchor! pub struct Something; -//@ has anchors/struct.SomeOtherType.html -//@ has - '//a/@href' 'struct.Something.html#Anchor!' +//@ has anchors/type.SomeOtherType.html +//@ has - '//a/@href' 'type.Something.html#Anchor!' /// I want... /// diff --git a/tests/rustdoc-html/intra-doc/assoc-reexport-super.rs b/tests/rustdoc-html/intra-doc/assoc-reexport-super.rs index 2a55586925fd8..858eac3363605 100644 --- a/tests/rustdoc-html/intra-doc/assoc-reexport-super.rs +++ b/tests/rustdoc-html/intra-doc/assoc-reexport-super.rs @@ -14,7 +14,7 @@ pub use generated::MyNewType; mod prelude { impl super::MyNewType { /// An alias for [`Self::FOO`]. - //@ has 'foo/struct.MyNewType.html' '//a[@href="struct.MyNewType.html#associatedconstant.FOO"]' 'Self::FOO' + //@ has 'foo/type.MyNewType.html' '//a[@href="type.MyNewType.html#associatedconstant.FOO"]' 'Self::FOO' pub const FOO2: Self = Self::FOO; } } diff --git a/tests/rustdoc-html/intra-doc/associated-defaults.rs b/tests/rustdoc-html/intra-doc/associated-defaults.rs index b5ba55dd30ff1..d2c97fcc151c7 100644 --- a/tests/rustdoc-html/intra-doc/associated-defaults.rs +++ b/tests/rustdoc-html/intra-doc/associated-defaults.rs @@ -9,14 +9,14 @@ pub trait TraitWithDefault { } /// Link to [UsesDefaults::T] and [UsesDefaults::f] -//@ has 'associated_defaults/struct.UsesDefaults.html' '//a[@href="struct.UsesDefaults.html#associatedtype.T"]' 'UsesDefaults::T' -//@ has 'associated_defaults/struct.UsesDefaults.html' '//a[@href="struct.UsesDefaults.html#method.f"]' 'UsesDefaults::f' +//@ has 'associated_defaults/type.UsesDefaults.html' '//a[@href="type.UsesDefaults.html#associatedtype.T"]' 'UsesDefaults::T' +//@ has 'associated_defaults/type.UsesDefaults.html' '//a[@href="type.UsesDefaults.html#method.f"]' 'UsesDefaults::f' pub struct UsesDefaults; impl TraitWithDefault for UsesDefaults {} /// Link to [OverridesDefaults::T] and [OverridesDefaults::f] -//@ has 'associated_defaults/struct.OverridesDefaults.html' '//a[@href="struct.OverridesDefaults.html#associatedtype.T"]' 'OverridesDefaults::T' -//@ has 'associated_defaults/struct.OverridesDefaults.html' '//a[@href="struct.OverridesDefaults.html#method.f"]' 'OverridesDefaults::f' +//@ has 'associated_defaults/type.OverridesDefaults.html' '//a[@href="type.OverridesDefaults.html#associatedtype.T"]' 'OverridesDefaults::T' +//@ has 'associated_defaults/type.OverridesDefaults.html' '//a[@href="type.OverridesDefaults.html#method.f"]' 'OverridesDefaults::f' pub struct OverridesDefaults; impl TraitWithDefault for OverridesDefaults { type T = bool; diff --git a/tests/rustdoc-html/intra-doc/associated-items.rs b/tests/rustdoc-html/intra-doc/associated-items.rs index b3bed196aded0..e60b6b9869326 100644 --- a/tests/rustdoc-html/intra-doc/associated-items.rs +++ b/tests/rustdoc-html/intra-doc/associated-items.rs @@ -3,16 +3,16 @@ /// [`std::collections::BTreeMap::into_iter`] /// [`String::from`] is ambiguous as to which `From` impl /// [Vec::into_iter()] uses a disambiguator -//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/collections/btree/map/struct.BTreeMap.html#method.into_iter"]' 'std::collections::BTreeMap::into_iter' -//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/string/struct.String.html#method.from"]' 'String::from' -//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/vec/struct.Vec.html#method.into_iter"]' 'Vec::into_iter' +//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/collections/btree/map/type.BTreeMap.html#method.into_iter"]' 'std::collections::BTreeMap::into_iter' +//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/string/type.String.html#method.from"]' 'String::from' +//@ has 'associated_items/fn.foo.html' '//a[@href="{{channel}}/alloc/vec/type.Vec.html#method.into_iter"]' 'Vec::into_iter' pub fn foo() {} /// Link to [MyStruct], [link from struct][MyStruct::method], [MyStruct::clone], [MyStruct::Input] -//@ has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html"]' 'MyStruct' -//@ has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#method.method"]' 'link from struct' -//@ has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#method.clone"]' 'MyStruct::clone' -//@ has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#associatedtype.Input"]' 'MyStruct::Input' +//@ has 'associated_items/type.MyStruct.html' '//a[@href="type.MyStruct.html"]' 'MyStruct' +//@ has 'associated_items/type.MyStruct.html' '//a[@href="type.MyStruct.html#method.method"]' 'link from struct' +//@ has 'associated_items/type.MyStruct.html' '//a[@href="type.MyStruct.html#method.clone"]' 'MyStruct::clone' +//@ has 'associated_items/type.MyStruct.html' '//a[@href="type.MyStruct.html#associatedtype.Input"]' 'MyStruct::Input' pub struct MyStruct { foo: (), } @@ -32,7 +32,7 @@ impl T for MyStruct { type Input = usize; /// [link from method][MyStruct::method] on method - //@ has 'associated_items/struct.MyStruct.html' '//a[@href="struct.MyStruct.html#method.method"]' 'link from method' + //@ has 'associated_items/type.MyStruct.html' '//a[@href="type.MyStruct.html#method.method"]' 'link from method' fn method(i: usize) {} } @@ -58,7 +58,7 @@ impl T2 for S { fn ambiguous_method() {} } -//@ has associated_items/enum.MyEnum.html '//a/@href' 'type.MyEnumAlias.html#variant.MyVariant' +//@ has associated_items/type.MyEnum.html '//a/@href' 'type.MyEnumAlias.html#variant.MyVariant' /// Link to [MyEnumAlias::MyVariant] pub enum MyEnum { MyVariant, diff --git a/tests/rustdoc-html/intra-doc/basic.rs b/tests/rustdoc-html/intra-doc/basic.rs index 9d0d1d51647df..d691367227e8b 100644 --- a/tests/rustdoc-html/intra-doc/basic.rs +++ b/tests/rustdoc-html/intra-doc/basic.rs @@ -1,15 +1,15 @@ #![allow(rustdoc::redundant_explicit_links)] //@ has basic/index.html -//@ has - '//a/@href' 'struct.ThisType.html' +//@ has - '//a/@href' 'type.ThisType.html' //@ has - '//a/@title' 'struct basic::ThisType' -//@ has - '//a/@href' 'struct.ThisType.html#method.this_method' +//@ has - '//a/@href' 'type.ThisType.html#method.this_method' //@ has - '//a/@title' 'method basic::ThisType::this_method' -//@ has - '//a/@href' 'struct.ThisType.html#method.this_assoc_fn' +//@ has - '//a/@href' 'type.ThisType.html#method.this_assoc_fn' //@ has - '//a/@title' 'associated function basic::ThisType::this_assoc_fn' -//@ has - '//a/@href' 'enum.ThisEnum.html' +//@ has - '//a/@href' 'type.ThisEnum.html' //@ has - '//a/@title' 'enum basic::ThisEnum' -//@ has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant' +//@ has - '//a/@href' 'type.ThisEnum.html#variant.ThisVariant' //@ has - '//a/@title' 'variant basic::ThisEnum::ThisVariant' //@ has - '//a/@href' 'trait.ThisTrait.html' //@ has - '//a/@title' 'trait basic::ThisTrait' @@ -25,7 +25,7 @@ //@ has - '//a/@title' 'trait basic::ThisTrait' //@ has - '//a/@href' 'type.ThisAlias.html' //@ has - '//a/@title' 'type basic::ThisAlias' -//@ has - '//a/@href' 'union.ThisUnion.html' +//@ has - '//a/@href' 'type.ThisUnion.html' //@ has - '//a/@title' 'union basic::ThisUnion' //@ has - '//a/@href' 'fn.this_function.html' //@ has - '//a/@title' 'fn basic::this_function' @@ -71,7 +71,7 @@ macro_rules! this_macro { () => {}; } -//@ has basic/struct.ThisType.html '//a/@href' 'macro.this_macro.html' +//@ has basic/type.ThisType.html '//a/@href' 'macro.this_macro.html' /// another link to [`this_macro!()`] pub struct ThisType; @@ -99,10 +99,10 @@ pub trait SoAmbiguous {} pub fn SoAmbiguous() {} -//@ has basic/struct.SomeOtherType.html '//a/@href' 'struct.ThisType.html' -//@ has - '//a/@href' 'struct.ThisType.html#method.this_method' -//@ has - '//a/@href' 'enum.ThisEnum.html' -//@ has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant' +//@ has basic/type.SomeOtherType.html '//a/@href' 'type.ThisType.html' +//@ has - '//a/@href' 'type.ThisType.html#method.this_method' +//@ has - '//a/@href' 'type.ThisEnum.html' +//@ has - '//a/@href' 'type.ThisEnum.html#variant.ThisVariant' /// Shortcut links for: /// * [`ThisType`] /// * [`ThisType::this_method`] diff --git a/tests/rustdoc-html/intra-doc/crate-relative-assoc.rs b/tests/rustdoc-html/intra-doc/crate-relative-assoc.rs index 1625b98dea602..b005ea3067774 100644 --- a/tests/rustdoc-html/intra-doc/crate-relative-assoc.rs +++ b/tests/rustdoc-html/intra-doc/crate-relative-assoc.rs @@ -5,7 +5,7 @@ pub mod io { } pub mod bufreader { - //@ has crate_relative_assoc/bufreader/index.html '//a/@href' 'struct.TcpStream.html#method.read' + //@ has crate_relative_assoc/bufreader/index.html '//a/@href' 'type.TcpStream.html#method.read' //! [`crate::TcpStream::read`] use crate::io::Read; } diff --git a/tests/rustdoc-html/intra-doc/crate-relative.rs b/tests/rustdoc-html/intra-doc/crate-relative.rs index b4cae5e5585fe..7b203b345b373 100644 --- a/tests/rustdoc-html/intra-doc/crate-relative.rs +++ b/tests/rustdoc-html/intra-doc/crate-relative.rs @@ -7,7 +7,7 @@ impl<'a> Test<'a> { } //@ has crate_relative/demo/index.html -//@ has - '//a/@href' '../struct.Test.html#method.do_test' +//@ has - '//a/@href' '../type.Test.html#method.do_test' pub mod demo { //! [`crate::Test::do_test`] } diff --git a/tests/rustdoc-html/intra-doc/cross-crate/basic.rs b/tests/rustdoc-html/intra-doc/cross-crate/basic.rs index 45f7a8a2b6bd4..c9c5e650f2c37 100644 --- a/tests/rustdoc-html/intra-doc/cross-crate/basic.rs +++ b/tests/rustdoc-html/intra-doc/cross-crate/basic.rs @@ -5,5 +5,5 @@ // from https://github.com/rust-lang/rust/issues/65983 extern crate a; -//@ has 'basic/struct.Bar.html' '//a[@href="../a/struct.Foo.html"]' 'Foo' +//@ has 'basic/type.Bar.html' '//a[@href="../a/type.Foo.html"]' 'Foo' pub use a::Bar; diff --git a/tests/rustdoc-html/intra-doc/cross-crate/hidden.rs b/tests/rustdoc-html/intra-doc/cross-crate/hidden.rs index 490f1d23ca06e..4b04721432742 100644 --- a/tests/rustdoc-html/intra-doc/cross-crate/hidden.rs +++ b/tests/rustdoc-html/intra-doc/cross-crate/hidden.rs @@ -6,5 +6,5 @@ extern crate hidden_dep; -//@ has 'hidden/struct.Ready.html' '//a/@href' 'fn.ready.html' +//@ has 'hidden/type.Ready.html' '//a/@href' 'fn.ready.html' pub use hidden_dep::future::{ready, Ready}; diff --git a/tests/rustdoc-html/intra-doc/cross-crate/macro.rs b/tests/rustdoc-html/intra-doc/cross-crate/macro.rs index 19ca5f6f243c1..69b5519992e4c 100644 --- a/tests/rustdoc-html/intra-doc/cross-crate/macro.rs +++ b/tests/rustdoc-html/intra-doc/cross-crate/macro.rs @@ -5,7 +5,7 @@ extern crate macro_inner; extern crate proc_macro_inner; -//@ has 'macro/macro.my_macro.html' '//a[@href="../macro_inner/struct.Foo.html"]' 'Foo' +//@ has 'macro/macro.my_macro.html' '//a[@href="../macro_inner/type.Foo.html"]' 'Foo' pub use macro_inner::my_macro; //@ has 'macro/derive.DeriveA.html' '//a[@href="../proc_macro_inner/derive.OtherDerive.html"]' 'OtherDerive' pub use proc_macro_inner::DeriveA; diff --git a/tests/rustdoc-html/intra-doc/cross-crate/module.rs b/tests/rustdoc-html/intra-doc/cross-crate/module.rs index 0f9fa4e2276d3..4b0d20dbcbde0 100644 --- a/tests/rustdoc-html/intra-doc/cross-crate/module.rs +++ b/tests/rustdoc-html/intra-doc/cross-crate/module.rs @@ -4,5 +4,5 @@ #![deny(rustdoc::broken_intra_doc_links)] extern crate module_inner; //@ has 'module/bar/index.html' '//a[@href="../../module_inner/trait.SomeTrait.html"]' 'SomeTrait' -//@ has 'module/bar/index.html' '//a[@href="../../module_inner/struct.SomeType.html"]' 'SomeType' +//@ has 'module/bar/index.html' '//a[@href="../../module_inner/type.SomeType.html"]' 'SomeType' pub use module_inner::bar; diff --git a/tests/rustdoc-html/intra-doc/cross-crate/submodule-inner.rs b/tests/rustdoc-html/intra-doc/cross-crate/submodule-inner.rs index cc139e3daaf99..fdcb56e7ca2ca 100644 --- a/tests/rustdoc-html/intra-doc/cross-crate/submodule-inner.rs +++ b/tests/rustdoc-html/intra-doc/cross-crate/submodule-inner.rs @@ -4,5 +4,5 @@ extern crate a; -//@ has 'submodule_inner/struct.Foo.html' '//a[@href="../a/bar/struct.Bar.html"]' 'Bar' +//@ has 'submodule_inner/type.Foo.html' '//a[@href="../a/bar/type.Bar.html"]' 'Bar' pub use a::foo::Foo; diff --git a/tests/rustdoc-html/intra-doc/cross-crate/traits.rs b/tests/rustdoc-html/intra-doc/cross-crate/traits.rs index 70382062a615a..7f29a66d68d85 100644 --- a/tests/rustdoc-html/intra-doc/cross-crate/traits.rs +++ b/tests/rustdoc-html/intra-doc/cross-crate/traits.rs @@ -7,8 +7,8 @@ use inner::SomeTrait; pub struct SomeStruct; - //@ has 'traits/struct.SomeStruct.html' '//a[@href="../inner/trait.SomeTrait.html"]' 'SomeTrait' + //@ has 'traits/type.SomeStruct.html' '//a[@href="../inner/trait.SomeTrait.html"]' 'SomeTrait' impl SomeTrait for SomeStruct { - //@ has 'traits/struct.SomeStruct.html' '//a[@href="../inner/trait.SomeTrait.html"]' 'a trait' + //@ has 'traits/type.SomeStruct.html' '//a[@href="../inner/trait.SomeTrait.html"]' 'a trait' fn foo() {} } diff --git a/tests/rustdoc-html/intra-doc/deprecated.rs b/tests/rustdoc-html/intra-doc/deprecated.rs index 1705fe8fc7abe..bd3fa1fb08cef 100644 --- a/tests/rustdoc-html/intra-doc/deprecated.rs +++ b/tests/rustdoc-html/intra-doc/deprecated.rs @@ -1,6 +1,6 @@ -//@ has deprecated/struct.A.html '//a[@href="{{channel}}/core/ops/range/struct.Range.html#structfield.start"]' 'start' -//@ has deprecated/struct.B1.html '//a[@href="{{channel}}/core/io/error/enum.ErrorKind.html#variant.NotFound"]' 'not_found' -//@ has deprecated/struct.B2.html '//a[@href="{{channel}}/core/io/error/enum.ErrorKind.html#variant.NotFound"]' 'not_found' +//@ has deprecated/type.A.html '//a[@href="{{channel}}/core/ops/range/type.Range.html#structfield.start"]' 'start' +//@ has deprecated/type.B1.html '//a[@href="{{channel}}/core/io/error/type.ErrorKind.html#variant.NotFound"]' 'not_found' +//@ has deprecated/type.B2.html '//a[@href="{{channel}}/core/io/error/type.ErrorKind.html#variant.NotFound"]' 'not_found' #[deprecated = "[start][std::ops::Range::start]"] pub struct A; diff --git a/tests/rustdoc-html/intra-doc/disambiguators-removed.rs b/tests/rustdoc-html/intra-doc/disambiguators-removed.rs index 613156222ed0e..b1177df69bf90 100644 --- a/tests/rustdoc-html/intra-doc/disambiguators-removed.rs +++ b/tests/rustdoc-html/intra-doc/disambiguators-removed.rs @@ -1,14 +1,14 @@ #![deny(rustdoc::broken_intra_doc_links)] // first try backticks /// Trait: [`trait@Name`], fn: [`fn@Name`], [`Name`][`macro@Name`] -//@ has disambiguators_removed/struct.AtDisambiguator.html +//@ has disambiguators_removed/type.AtDisambiguator.html //@ has - '//a[@href="trait.Name.html"][code]' "Name" //@ has - '//a[@href="fn.Name.html"][code]' "Name" //@ has - '//a[@href="macro.Name.html"][code]' "Name" pub struct AtDisambiguator; /// fn: [`Name()`], macro: [`Name!`] -//@ has disambiguators_removed/struct.SymbolDisambiguator.html +//@ has disambiguators_removed/type.SymbolDisambiguator.html //@ has - '//a[@href="fn.Name.html"][code]' "Name()" //@ has - '//a[@href="macro.Name.html"][code]' "Name!" pub struct SymbolDisambiguator; diff --git a/tests/rustdoc-html/intra-doc/enum-self-82209.rs b/tests/rustdoc-html/intra-doc/enum-self-82209.rs index 615115a5f8b2c..ea5dab04ba577 100644 --- a/tests/rustdoc-html/intra-doc/enum-self-82209.rs +++ b/tests/rustdoc-html/intra-doc/enum-self-82209.rs @@ -10,4 +10,4 @@ pub enum Foo { }, } -//@ has foo/enum.Foo.html '//a/@href' 'enum.Foo.html#variant.Bar.field.abc' +//@ has foo/type.Foo.html '//a/@href' 'type.Foo.html#variant.Bar.field.abc' diff --git a/tests/rustdoc-html/intra-doc/enum-struct-field.rs b/tests/rustdoc-html/intra-doc/enum-struct-field.rs index 71ba53b877fe9..aa0169e64924e 100644 --- a/tests/rustdoc-html/intra-doc/enum-struct-field.rs +++ b/tests/rustdoc-html/intra-doc/enum-struct-field.rs @@ -11,4 +11,4 @@ pub enum Foo { /// I want [Foo::X::y]. pub fn foo() {} -//@ has foo/fn.foo.html '//a/@href' 'enum.Foo.html#variant.X.field.y' +//@ has foo/fn.foo.html '//a/@href' 'type.Foo.html#variant.X.field.y' diff --git a/tests/rustdoc-html/intra-doc/enum-variant-field-title.rs b/tests/rustdoc-html/intra-doc/enum-variant-field-title.rs index 8fdfef11e4ff0..150af0a63e79b 100644 --- a/tests/rustdoc-html/intra-doc/enum-variant-field-title.rs +++ b/tests/rustdoc-html/intra-doc/enum-variant-field-title.rs @@ -4,7 +4,7 @@ #![crate_name = "foo"] -//@ has 'foo/enum.Enum.html' +//@ has 'foo/type.Enum.html' //@ has - '//*[@class="docblock"]//a[@title="field foo::Enum::Variant::field"]' 'Enum::Variant::field' /// [Enum::Variant::field] diff --git a/tests/rustdoc-html/intra-doc/extern-crate-only-used-in-link.rs b/tests/rustdoc-html/intra-doc/extern-crate-only-used-in-link.rs index 30834bd72104b..5b10d91903a79 100644 --- a/tests/rustdoc-html/intra-doc/extern-crate-only-used-in-link.rs +++ b/tests/rustdoc-html/intra-doc/extern-crate-only-used-in-link.rs @@ -10,7 +10,7 @@ //@ edition: 2018 //@ has extern_crate_only_used_in_link/index.html -//@ has - '//a[@href="../issue_66159_1/struct.Something.html"]' 'issue_66159_1::Something' +//@ has - '//a[@href="../issue_66159_1/type.Something.html"]' 'issue_66159_1::Something' //! [issue_66159_1::Something] //@ has - '//a[@href="../empty/index.html"]' 'empty' diff --git a/tests/rustdoc-html/intra-doc/field.rs b/tests/rustdoc-html/intra-doc/field.rs index 610eb1ec1bf65..e83443ccfb045 100644 --- a/tests/rustdoc-html/intra-doc/field.rs +++ b/tests/rustdoc-html/intra-doc/field.rs @@ -1,7 +1,7 @@ -//@ has field/index.html '//a[@href="{{channel}}/core/ops/range/struct.Range.html#structfield.start"]' 'start' -//@ has field/index.html '//a[@href="{{channel}}/core/io/error/enum.ErrorKind.html#variant.NotFound"]' 'not_found' -//@ has field/index.html '//a[@href="struct.FieldAndMethod.html#structfield.x"]' 'x' -//@ has field/index.html '//a[@href="enum.VariantAndMethod.html#variant.X"]' 'X' +//@ has field/index.html '//a[@href="{{channel}}/core/ops/range/type.Range.html#structfield.start"]' 'start' +//@ has field/index.html '//a[@href="{{channel}}/core/io/error/type.ErrorKind.html#variant.NotFound"]' 'not_found' +//@ has field/index.html '//a[@href="type.FieldAndMethod.html#structfield.x"]' 'x' +//@ has field/index.html '//a[@href="type.VariantAndMethod.html#variant.X"]' 'X' //! [start][std::ops::Range::start] //! [not_found][core::io::ErrorKind::NotFound] //! [x][field@crate::FieldAndMethod::x] diff --git a/tests/rustdoc-html/intra-doc/filter-out-private.rs b/tests/rustdoc-html/intra-doc/filter-out-private.rs index 70591b120d823..1f34bd21cb6a3 100644 --- a/tests/rustdoc-html/intra-doc/filter-out-private.rs +++ b/tests/rustdoc-html/intra-doc/filter-out-private.rs @@ -16,11 +16,11 @@ pub struct Bar {} fn Bar() {} //@ has 'foo/fn.repro.html' -//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'struct.Thing.html' +//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'type.Thing.html' /// Do stuff with [`Thing`]. pub fn repro(_: Thing) {} //@ has 'foo/fn.repro2.html' -//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'struct.Bar.html' +//@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]//a/@href' 'type.Bar.html' /// Do stuff with [`Bar`]. pub fn repro2(_: Bar) {} diff --git a/tests/rustdoc-html/intra-doc/generic-params.rs b/tests/rustdoc-html/intra-doc/generic-params.rs index a33ffb3e3d0d5..0cd8c12e1f154 100644 --- a/tests/rustdoc-html/intra-doc/generic-params.rs +++ b/tests/rustdoc-html/intra-doc/generic-params.rs @@ -6,40 +6,40 @@ //! Here's a link to [`Vec`] and one to [`Box>>`]. //! Here's a link to [`Iterator>::Item`]. //! -//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/struct.Vec.html"]' 'Vec' -//@ has foo/index.html '//a[@href="{{channel}}/alloc/boxed/struct.Box.html"]' 'Box>>' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/type.Vec.html"]' 'Vec' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/boxed/type.Box.html"]' 'Box>>' //@ has foo/index.html '//a[@href="{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item"]' 'Iterator>::Item' //! And what about a link to [just `Option`](Option) and, [with the generic, `Option`](Option)? //! -//@ has foo/index.html '//a[@href="{{channel}}/core/option/enum.Option.html"]' 'just Option' -//@ has foo/index.html '//a[@href="{{channel}}/core/option/enum.Option.html"]' 'with the generic, Option' +//@ has foo/index.html '//a[@href="{{channel}}/core/option/type.Option.html"]' 'just Option' +//@ has foo/index.html '//a[@href="{{channel}}/core/option/type.Option.html"]' 'with the generic, Option' //! We should also try linking to [`Result`]; it has *two* generics! //! And [`Result`] and [`Result`]. //! -//@ has foo/index.html '//a[@href="{{channel}}/core/result/enum.Result.html"]' 'Result' -//@ has foo/index.html '//a[@href="{{channel}}/core/result/enum.Result.html"]' 'Result' -//@ has foo/index.html '//a[@href="{{channel}}/core/result/enum.Result.html"]' 'Result' +//@ has foo/index.html '//a[@href="{{channel}}/core/result/type.Result.html"]' 'Result' +//@ has foo/index.html '//a[@href="{{channel}}/core/result/type.Result.html"]' 'Result' +//@ has foo/index.html '//a[@href="{{channel}}/core/result/type.Result.html"]' 'Result' //! Now let's test a trickier case: [`Vec::::new`], or you could write it //! [with parentheses as `Vec::::new()`][Vec::::new()]. //! And what about something even harder? That would be [`Vec::>::new()`]. //! -//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/struct.Vec.html#method.new"]' 'Vec::::new' -//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/struct.Vec.html#method.new"]' 'with parentheses as Vec::::new()' -//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/struct.Vec.html#method.new"]' 'Vec::>::new()' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/type.Vec.html#method.new"]' 'Vec::::new' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/type.Vec.html#method.new"]' 'with parentheses as Vec::::new()' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/type.Vec.html#method.new"]' 'Vec::>::new()' //! This is also pretty tricky: [`TypeId::of::()`]. //! And this too: [`Vec::::len`]. //! -//@ has foo/index.html '//a[@href="{{channel}}/core/any/struct.TypeId.html#method.of"]' 'TypeId::of::()' -//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/struct.Vec.html#method.len"]' 'Vec::::len' +//@ has foo/index.html '//a[@href="{{channel}}/core/any/type.TypeId.html#method.of"]' 'TypeId::of::()' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/vec/type.Vec.html#method.len"]' 'Vec::::len' //! We unofficially and implicitly support things that aren't valid in the actual Rust syntax, like //! [`Box::new()`]. We may not support them in the future! //! -//@ has foo/index.html '//a[@href="{{channel}}/alloc/boxed/struct.Box.html#method.new"]' 'Box::new()' +//@ has foo/index.html '//a[@href="{{channel}}/alloc/boxed/type.Box.html#method.new"]' 'Box::new()' //! These will be resolved as regular links: //! - [`this is first`](https://www.rust-lang.org) diff --git a/tests/rustdoc-html/intra-doc/generic-trait-impl.rs b/tests/rustdoc-html/intra-doc/generic-trait-impl.rs index 314b6321cbbf8..ed6a144837521 100644 --- a/tests/rustdoc-html/intra-doc/generic-trait-impl.rs +++ b/tests/rustdoc-html/intra-doc/generic-trait-impl.rs @@ -15,6 +15,6 @@ impl Bar for Foo { fn bar(&self) {} } -//@ has generic_trait_impl/fn.main.html '//a[@href="struct.Foo.html#method.bar"]' 'Foo::bar' +//@ has generic_trait_impl/fn.main.html '//a[@href="type.Foo.html#method.bar"]' 'Foo::bar' /// link to [`Foo::bar`] pub fn main() {} diff --git a/tests/rustdoc-html/intra-doc/ice-intra-doc-links-107995.rs b/tests/rustdoc-html/intra-doc/ice-intra-doc-links-107995.rs index 57669909aa1b0..40931a36de460 100644 --- a/tests/rustdoc-html/intra-doc/ice-intra-doc-links-107995.rs +++ b/tests/rustdoc-html/intra-doc/ice-intra-doc-links-107995.rs @@ -9,19 +9,19 @@ pub fn foo() {} //@ has 'foo/fn.bar.html' //@ has - '//*[@class="docblock"]' 'line Path line' -//@ has - '//*[@class="docblock"]//a[@href="struct.Path.html"]' 'Path' +//@ has - '//*[@class="docblock"]//a[@href="type.Path.html"]' 'Path' #[doc = "line ["] #[doc = "Path"] #[doc = "] line"] pub fn bar() {} //@ has 'foo/fn.another.html' -//@ has - '//*[@class="docblock"]//a[@href="struct.Path.html"]' 'Path' +//@ has - '//*[@class="docblock"]//a[@href="type.Path.html"]' 'Path' /// [ `Path`] pub fn another() {} //@ has 'foo/fn.last.html' -//@ has - '//*[@class="docblock"]//a[@href="struct.Path.html"]' 'Path' +//@ has - '//*[@class="docblock"]//a[@href="type.Path.html"]' 'Path' /// [ Path`] pub fn last() {} diff --git a/tests/rustdoc-html/intra-doc/inherent-associated-types.rs b/tests/rustdoc-html/intra-doc/inherent-associated-types.rs index b7eedee2c17f5..2d3e633bdb7e6 100644 --- a/tests/rustdoc-html/intra-doc/inherent-associated-types.rs +++ b/tests/rustdoc-html/intra-doc/inherent-associated-types.rs @@ -5,7 +5,7 @@ //@ has inherent_associated_types/index.html -//@ has - '//a/@href' 'enum.Simple.html#associatedtype.Type' +//@ has - '//a/@href' 'type.Simple.html#associatedtype.Type' //! [`Simple::Type`] pub enum Simple {} @@ -17,7 +17,7 @@ impl Simple { //////////////////////////////////////// //@ has 'inherent_associated_types/type.Test0.html' '//a/@href' \ -// 'struct.Parametrized.html#associatedtype.Proj' +// 'type.Parametrized.html#associatedtype.Proj' /// [`Parametrized::Proj`] pub type Test0 = (); @@ -29,8 +29,8 @@ pub type Test0 = (); // It currently links to `Parametrized::Proj`. //@ has 'inherent_associated_types/type.Test1.html' -//@ has - '//a/@href' 'struct.Parametrized.html#associatedtype.Proj' -//@ !has - '//a/@href' 'struct.Parametrized.html#associatedtype.Proj-1' +//@ has - '//a/@href' 'type.Parametrized.html#associatedtype.Proj' +//@ !has - '//a/@href' 'type.Parametrized.html#associatedtype.Proj-1' /// [`Parametrized::Proj`] pub type Test1 = (); diff --git a/tests/rustdoc-html/intra-doc/inline-same-item-with-different-names.rs b/tests/rustdoc-html/intra-doc/inline-same-item-with-different-names.rs index c7801da5c98c2..eaaab4b4dd83c 100644 --- a/tests/rustdoc-html/intra-doc/inline-same-item-with-different-names.rs +++ b/tests/rustdoc-html/intra-doc/inline-same-item-with-different-names.rs @@ -8,9 +8,9 @@ //@ has 'foo/macro.d1.html' //@ has 'foo/macro.d2.html' //@ has 'foo/macro.d3.html' -//@ has 'foo/struct.a1.html' -//@ has 'foo/struct.a2.html' -//@ has 'foo/struct.a3.html' +//@ has 'foo/type.a1.html' +//@ has 'foo/type.a2.html' +//@ has 'foo/type.a3.html' //@ has 'foo/index.html' @@ -28,11 +28,11 @@ pub use std::debug_assert as d2; /// Link to [`d2`]. pub use std::debug_assert as d3; -//@ has - '//dd/a[@href="struct.a1.html"]' 'a1' +//@ has - '//dd/a[@href="type.a1.html"]' 'a1' //@ has - '//dd/a[@title="struct foo::a1"]' 'a1' -//@ has - '//dd/a[@href="struct.a2.html"]' 'a2' +//@ has - '//dd/a[@href="type.a2.html"]' 'a2' //@ has - '//dd/a[@title="struct foo::a2"]' 'a2' -//@ has - '//dd/a[@href="struct.a3.html"]' 'a3' +//@ has - '//dd/a[@href="type.a3.html"]' 'a3' //@ has - '//dd/a[@title="struct foo::a3"]' 'a3' /// Link to [`a3`]. diff --git a/tests/rustdoc-html/intra-doc/intra-doc-link-method-trait-impl-72340.rs b/tests/rustdoc-html/intra-doc/intra-doc-link-method-trait-impl-72340.rs index 0cf46bb3f952d..ca19113a8c0e3 100644 --- a/tests/rustdoc-html/intra-doc/intra-doc-link-method-trait-impl-72340.rs +++ b/tests/rustdoc-html/intra-doc/intra-doc-link-method-trait-impl-72340.rs @@ -12,7 +12,7 @@ impl Body { } impl Default for Body { - //@ has foo/struct.Body.html '//a/@href' 'struct.Body.html#method.empty' + //@ has foo/type.Body.html '//a/@href' 'type.Body.html#method.empty' /// Returns [`Body::empty()`](Body::empty). fn default() -> Body { diff --git a/tests/rustdoc-html/intra-doc/link-in-footnotes-132208.rs b/tests/rustdoc-html/intra-doc/link-in-footnotes-132208.rs index c9b97eafd2f81..13264e5d9e0ac 100644 --- a/tests/rustdoc-html/intra-doc/link-in-footnotes-132208.rs +++ b/tests/rustdoc-html/intra-doc/link-in-footnotes-132208.rs @@ -8,8 +8,8 @@ #![crate_name = "foo"] //@ has 'foo/index.html' -//@ has - '//*[@class="docblock"]//a[@href="struct.Bar.html"]' 'a' -//@ has - '//*[@class="docblock"]//*[@class="footnotes"]//a[@href="struct.Foo.html"]' 'b' +//@ has - '//*[@class="docblock"]//a[@href="type.Bar.html"]' 'a' +//@ has - '//*[@class="docblock"]//*[@class="footnotes"]//a[@href="type.Foo.html"]' 'b' //! [a]: crate::Bar //! [b]: crate::Foo diff --git a/tests/rustdoc-html/intra-doc/link-same-name-different-disambiguator-108459.rs b/tests/rustdoc-html/intra-doc/link-same-name-different-disambiguator-108459.rs index 0b339eaf6b27c..90e0a436a7382 100644 --- a/tests/rustdoc-html/intra-doc/link-same-name-different-disambiguator-108459.rs +++ b/tests/rustdoc-html/intra-doc/link-same-name-different-disambiguator-108459.rs @@ -16,13 +16,13 @@ pub struct MyStruct1; // the same target but different text /// See also [crate::char] and [mod@char] and [prim@char] -//@ has foobar/struct.MyStruct2.html '//*[@href="char/index.html"]' 'crate::char' +//@ has foobar/type.MyStruct2.html '//*[@href="char/index.html"]' 'crate::char' //@ has - '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct2; /// See also [mod@char] and [prim@char] and [crate::char] -//@ has foobar/struct.MyStruct3.html '//*[@href="char/index.html"]' 'crate::char' +//@ has foobar/type.MyStruct3.html '//*[@href="char/index.html"]' 'crate::char' //@ has - '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct3; @@ -31,11 +31,11 @@ pub struct MyStruct3; // different targets /// See also [char][mod@char] and [char][prim@char] -//@ has foobar/struct.MyStruct4.html '//*[@href="char/index.html"]' 'char' +//@ has foobar/type.MyStruct4.html '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct4; /// See also [char][prim@char] and [char][crate::char] -//@ has foobar/struct.MyStruct5.html '//*[@href="char/index.html"]' 'char' +//@ has foobar/type.MyStruct5.html '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct5; diff --git a/tests/rustdoc-html/intra-doc/mixed-inner-outer.rs b/tests/rustdoc-html/intra-doc/mixed-inner-outer.rs index 5a0f92522662d..055d5650e63f5 100644 --- a/tests/rustdoc-html/intra-doc/mixed-inner-outer.rs +++ b/tests/rustdoc-html/intra-doc/mixed-inner-outer.rs @@ -8,8 +8,8 @@ #![deny(rustdoc::broken_intra_doc_links)] //@ has foo/demo/index.html -//@ has - '//a[@href="../struct.Foo.html"]' 'Foo' -//@ has - '//a[@href="struct.DemoStruct.html"]' 'DemoStruct' +//@ has - '//a[@href="../type.Foo.html"]' 'Foo' +//@ has - '//a[@href="type.DemoStruct.html"]' 'DemoStruct' /// Outer doc-comment [`Foo`]. pub mod demo { diff --git a/tests/rustdoc-html/intra-doc/mod-ambiguity.rs b/tests/rustdoc-html/intra-doc/mod-ambiguity.rs index 5e2b1ffe6f213..b53453c7e64bf 100644 --- a/tests/rustdoc-html/intra-doc/mod-ambiguity.rs +++ b/tests/rustdoc-html/intra-doc/mod-ambiguity.rs @@ -6,11 +6,11 @@ pub fn foo() { } pub mod foo {} -//@ has mod_ambiguity/struct.A.html '//a/@href' 'foo/index.html' +//@ has mod_ambiguity/type.A.html '//a/@href' 'foo/index.html' /// Module is [`module@foo`] pub struct A; -//@ has mod_ambiguity/struct.B.html '//a/@href' 'fn.foo.html' +//@ has mod_ambiguity/type.B.html '//a/@href' 'fn.foo.html' /// Function is [`fn@foo`] pub struct B; diff --git a/tests/rustdoc-html/intra-doc/mod-relative.rs b/tests/rustdoc-html/intra-doc/mod-relative.rs index d3239973d1cbf..7ebcdccdf6be0 100644 --- a/tests/rustdoc-html/intra-doc/mod-relative.rs +++ b/tests/rustdoc-html/intra-doc/mod-relative.rs @@ -9,7 +9,7 @@ pub mod wrapper { } //@ has mod_relative/wrapper/demo/index.html - //@ has - '//a/@href' '../struct.Test.html#method.do_test' + //@ has - '//a/@href' '../type.Test.html#method.do_test' /// [`Test::do_test`] pub mod demo { } diff --git a/tests/rustdoc-html/intra-doc/nested-use.rs b/tests/rustdoc-html/intra-doc/nested-use.rs index 2aaaed196fd12..35643e9bb8250 100644 --- a/tests/rustdoc-html/intra-doc/nested-use.rs +++ b/tests/rustdoc-html/intra-doc/nested-use.rs @@ -2,9 +2,9 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html -//@ has - '//a[@href="struct.Foo.html"]' 'Foo' -//@ has - '//a[@href="struct.Bar.html"]' 'Bar' +//@ has foo/type.Foo.html +//@ has - '//a[@href="type.Foo.html"]' 'Foo' +//@ has - '//a[@href="type.Bar.html"]' 'Bar' /// [`Foo`] pub use m::{Foo, Bar}; diff --git a/tests/rustdoc-html/intra-doc/prim-associated-traits.rs b/tests/rustdoc-html/intra-doc/prim-associated-traits.rs index 12fe8b9d41bfd..393d46bcc8a1b 100644 --- a/tests/rustdoc-html/intra-doc/prim-associated-traits.rs +++ b/tests/rustdoc-html/intra-doc/prim-associated-traits.rs @@ -1,23 +1,23 @@ use std::str::FromStr; -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.f64.html#method.from_str"]' 'f64::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.f32.html#method.from_str"]' 'f32::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.isize.html#method.from_str"]' 'isize::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.i8.html#method.from_str"]' 'i8::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.i16.html#method.from_str"]' 'i16::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.i32.html#method.from_str"]' 'i32::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.i64.html#method.from_str"]' 'i64::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.i128.html#method.from_str"]' 'i128::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.usize.html#method.from_str"]' 'usize::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.u8.html#method.from_str"]' 'u8::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.u16.html#method.from_str"]' 'u16::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.u32.html#method.from_str"]' 'u32::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.u64.html#method.from_str"]' 'u64::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.u128.html#method.from_str"]' 'u128::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.char.html#method.from_str"]' 'char::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.bool.html#method.from_str"]' 'bool::from_str()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.str.html#method.eq"]' 'str::eq()' -//@ has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.never.html#method.eq"]' 'never::eq()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.f64.html#method.from_str"]' 'f64::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.f32.html#method.from_str"]' 'f32::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.isize.html#method.from_str"]' 'isize::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.i8.html#method.from_str"]' 'i8::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.i16.html#method.from_str"]' 'i16::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.i32.html#method.from_str"]' 'i32::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.i64.html#method.from_str"]' 'i64::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.i128.html#method.from_str"]' 'i128::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.usize.html#method.from_str"]' 'usize::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.u8.html#method.from_str"]' 'u8::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.u16.html#method.from_str"]' 'u16::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.u32.html#method.from_str"]' 'u32::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.u64.html#method.from_str"]' 'u64::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.u128.html#method.from_str"]' 'u128::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.char.html#method.from_str"]' 'char::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.bool.html#method.from_str"]' 'bool::from_str()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.str.html#method.eq"]' 'str::eq()' +//@ has 'prim_associated_traits/type.Number.html' '//a[@href="{{channel}}/std/primitive.never.html#method.eq"]' 'never::eq()' /// [`f64::from_str()`] [`f32::from_str()`] [`isize::from_str()`] [`i8::from_str()`] /// [`i16::from_str()`] [`i32::from_str()`] [`i64::from_str()`] [`i128::from_str()`] /// [`u16::from_str()`] [`u32::from_str()`] [`u64::from_str()`] [`u128::from_str()`] diff --git a/tests/rustdoc-html/intra-doc/prim-precedence.rs b/tests/rustdoc-html/intra-doc/prim-precedence.rs index 56d556e8f1deb..5b8457c733782 100644 --- a/tests/rustdoc-html/intra-doc/prim-precedence.rs +++ b/tests/rustdoc-html/intra-doc/prim-precedence.rs @@ -2,15 +2,15 @@ pub mod char { /// [char] - //@ has prim_precedence/char/struct.Inner.html '//a/@href' '{{channel}}/std/primitive.char.html' + //@ has prim_precedence/char/type.Inner.html '//a/@href' '{{channel}}/std/primitive.char.html' pub struct Inner; } /// See [prim@char] -//@ has prim_precedence/struct.MyString.html '//a/@href' '{{channel}}/std/primitive.char.html' +//@ has prim_precedence/type.MyString.html '//a/@href' '{{channel}}/std/primitive.char.html' pub struct MyString; /// See also [crate::char] and [mod@char] -//@ has prim_precedence/struct.MyString2.html '//*[@href="char/index.html"]' 'crate::char' +//@ has prim_precedence/type.MyString2.html '//*[@href="char/index.html"]' 'crate::char' //@ has - '//*[@href="char/index.html"]' 'char' pub struct MyString2; diff --git a/tests/rustdoc-html/intra-doc/private.rs b/tests/rustdoc-html/intra-doc/private.rs index 48d86a30768a0..149abef75f8ca 100644 --- a/tests/rustdoc-html/intra-doc/private.rs +++ b/tests/rustdoc-html/intra-doc/private.rs @@ -7,9 +7,9 @@ #![crate_name = "private"] /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x] -//@ has private/struct.DocMe.html '//*a[@href="struct.DontDocMe.html"]' 'DontDocMe' -//@ has private/struct.DocMe.html '//*a[@href="struct.DontDocMe.html#method.f"]' 'DontDocMe::f' -//@ has private/struct.DocMe.html '//*a[@href="struct.DontDocMe.html#structfield.x"]' 'DontDocMe::x' +//@ has private/type.DocMe.html '//*a[@href="type.DontDocMe.html"]' 'DontDocMe' +//@ has private/type.DocMe.html '//*a[@href="type.DontDocMe.html#method.f"]' 'DontDocMe::f' +//@ has private/type.DocMe.html '//*a[@href="type.DontDocMe.html#structfield.x"]' 'DontDocMe::x' pub struct DocMe; struct DontDocMe { x: usize, diff --git a/tests/rustdoc-html/intra-doc/proc-macro.rs b/tests/rustdoc-html/intra-doc/proc-macro.rs index ed18b9dbcfa3c..7a713e12dafda 100644 --- a/tests/rustdoc-html/intra-doc/proc-macro.rs +++ b/tests/rustdoc-html/intra-doc/proc-macro.rs @@ -8,7 +8,7 @@ extern crate proc_macro_macro; pub use proc_macro_macro::{DeriveA, attr_a}; use proc_macro_macro::{DeriveB, attr_b}; -//@ has proc_macro/struct.Foo.html +//@ has proc_macro/type.Foo.html //@ has - '//a/@href' 'derive.DeriveA.html' //@ has - '//a/@href' 'attr.attr_a.html' //@ has - '//a/@href' 'trait.DeriveTrait.html' @@ -17,7 +17,7 @@ use proc_macro_macro::{DeriveB, attr_b}; /// Link to [DeriveA], [attr_a], [DeriveB], [attr_b], [DeriveTrait] pub struct Foo; -//@ has proc_macro/struct.Bar.html +//@ has proc_macro/type.Bar.html //@ has - '//a/@href' 'derive.DeriveA.html' //@ has - '//a/@href' 'attr.attr_a.html' /// Link to [deriveA](derive@DeriveA) [attr](macro@attr_a) diff --git a/tests/rustdoc-html/intra-doc/raw-ident-self.rs b/tests/rustdoc-html/intra-doc/raw-ident-self.rs index 5aecfadb36280..b0332a26f2a07 100644 --- a/tests/rustdoc-html/intra-doc/raw-ident-self.rs +++ b/tests/rustdoc-html/intra-doc/raw-ident-self.rs @@ -4,8 +4,8 @@ pub mod r#impl { impl S { /// See [Self::b]. - //@ has raw_ident_self/impl/struct.S.html - //@ has - '//a[@href="struct.S.html#method.b"]' 'Self::b' + //@ has raw_ident_self/impl/type.S.html + //@ has - '//a[@href="type.S.html#method.b"]' 'Self::b' pub fn a() {} pub fn b() {} diff --git a/tests/rustdoc-html/intra-doc/reexport-additional-docs.rs b/tests/rustdoc-html/intra-doc/reexport-additional-docs.rs index 1caa109d1fdfb..12b72ebf077b9 100644 --- a/tests/rustdoc-html/intra-doc/reexport-additional-docs.rs +++ b/tests/rustdoc-html/intra-doc/reexport-additional-docs.rs @@ -3,7 +3,7 @@ #![crate_name = "foo"] extern crate inner; -//@ has foo/struct.Inner.html '//a[@href="fn.with_code.html"]' 'crate::with_code' +//@ has foo/type.Inner.html '//a[@href="fn.with_code.html"]' 'crate::with_code' /// [crate::with_code] //@ has - '//a[@href="fn.with_code.html"]' 'different text' /// [different text][with_code] diff --git a/tests/rustdoc-html/intra-doc/self-cache.rs b/tests/rustdoc-html/intra-doc/self-cache.rs index 26cbeb56ad56a..2df7a41f9d30a 100644 --- a/tests/rustdoc-html/intra-doc/self-cache.rs +++ b/tests/rustdoc-html/intra-doc/self-cache.rs @@ -1,12 +1,12 @@ #![crate_name = "foo"] -//@ has foo/enum.E1.html '//a/@href' 'enum.E1.html#variant.A' +//@ has foo/type.E1.html '//a/@href' 'type.E1.html#variant.A' /// [Self::A::b] pub enum E1 { A { b: usize } } -//@ has foo/enum.E2.html '//a/@href' 'enum.E2.html#variant.A' +//@ has foo/type.E2.html '//a/@href' 'type.E2.html#variant.A' /// [Self::A::b] pub enum E2 { diff --git a/tests/rustdoc-html/intra-doc/self-impl-in-submodule-84827.rs b/tests/rustdoc-html/intra-doc/self-impl-in-submodule-84827.rs index fba5a787cb720..ecc4c6d2d78fe 100644 --- a/tests/rustdoc-html/intra-doc/self-impl-in-submodule-84827.rs +++ b/tests/rustdoc-html/intra-doc/self-impl-in-submodule-84827.rs @@ -18,7 +18,7 @@ pub struct Foo { // Case 1: `Foo` is not in scope inside `bar`, but `Self::foo` still resolves // to the field on `crate::Foo`. pub mod bar { - //@ has foo/struct.Foo.html '//a[@href="struct.Foo.html#structfield.foo"]' 'Self::foo' + //@ has foo/type.Foo.html '//a[@href="type.Foo.html#structfield.foo"]' 'Self::foo' impl crate::Foo { /// Baz the [`Self::foo`]. pub fn baz(&self) {} @@ -31,7 +31,7 @@ pub mod bar { pub mod baz { use crate::other::Foo; - //@ has foo/struct.Foo.html '//a[@href="struct.Foo.html#structfield.foo"]' 'Self::foo' + //@ has foo/type.Foo.html '//a[@href="type.Foo.html#structfield.foo"]' 'Self::foo' impl crate::Foo { /// Quux the [`Self::foo`]. pub fn quux(&self) {} diff --git a/tests/rustdoc-html/intra-doc/self.rs b/tests/rustdoc-html/intra-doc/self.rs index 2c33be781e2ab..8e965312ef137 100644 --- a/tests/rustdoc-html/intra-doc/self.rs +++ b/tests/rustdoc-html/intra-doc/self.rs @@ -1,8 +1,8 @@ #![crate_name = "foo"] -//@ has foo/index.html '//a/@href' 'struct.Foo.html#method.new' -//@ has foo/struct.Foo.html '//a/@href' 'struct.Foo.html#method.new' +//@ has foo/index.html '//a/@href' 'type.Foo.html#method.new' +//@ has foo/type.Foo.html '//a/@href' 'type.Foo.html#method.new' /// Use [`new`] to create a new instance. /// @@ -15,8 +15,8 @@ impl Foo { } } -//@ has foo/index.html '//a/@href' 'struct.Bar.html#method.new2' -//@ has foo/struct.Bar.html '//a/@href' 'struct.Bar.html#method.new2' +//@ has foo/index.html '//a/@href' 'type.Bar.html#method.new2' +//@ has foo/type.Bar.html '//a/@href' 'type.Bar.html#method.new2' /// Use [`new2`] to create a new instance. /// @@ -30,7 +30,7 @@ impl Bar { } pub struct MyStruct { - //@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#structfield.struct_field' + //@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#structfield.struct_field' /// [`struct_field`] /// @@ -39,7 +39,7 @@ pub struct MyStruct { } pub enum MyEnum { - //@ has foo/enum.MyEnum.html '//a/@href' 'enum.MyEnum.html#variant.EnumVariant' + //@ has foo/type.MyEnum.html '//a/@href' 'type.MyEnum.html#variant.EnumVariant' /// [`EnumVariant`] /// @@ -48,7 +48,7 @@ pub enum MyEnum { } pub union MyUnion { - //@ has foo/union.MyUnion.html '//a/@href' 'union.MyUnion.html#structfield.union_field' + //@ has foo/type.MyUnion.html '//a/@href' 'type.MyUnion.html#structfield.union_field' /// [`union_field`] /// @@ -80,7 +80,7 @@ pub trait MyTrait { } impl MyStruct { - //@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#method.for_impl' + //@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#method.for_impl' /// [`for_impl`] /// @@ -91,21 +91,21 @@ impl MyStruct { } impl MyTrait for MyStruct { - //@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#associatedtype.AssoType' + //@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#associatedtype.AssoType' /// [`AssoType`] /// /// [`AssoType`]: Self::AssoType type AssoType = u32; - //@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#associatedconstant.ASSO_CONST' + //@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#associatedconstant.ASSO_CONST' /// [`ASSO_CONST`] /// /// [`ASSO_CONST`]: Self::ASSO_CONST const ASSO_CONST: i32 = 10; - //@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#method.asso_fn' + //@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#method.asso_fn' /// [`asso_fn`] /// diff --git a/tests/rustdoc-html/intra-doc/trait-impl.rs b/tests/rustdoc-html/intra-doc/trait-impl.rs index 925a63187f433..45d02cd9d6b8d 100644 --- a/tests/rustdoc-html/intra-doc/trait-impl.rs +++ b/tests/rustdoc-html/intra-doc/trait-impl.rs @@ -5,21 +5,21 @@ pub struct MyStruct; impl MyTrait for MyStruct { -//@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#associatedtype.AssoType' +//@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#associatedtype.AssoType' /// [`AssoType`] /// /// [`AssoType`]: MyStruct::AssoType type AssoType = u32; -//@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#associatedconstant.ASSO_CONST' +//@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#associatedconstant.ASSO_CONST' /// [`ASSO_CONST`] /// /// [`ASSO_CONST`]: MyStruct::ASSO_CONST const ASSO_CONST: i32 = 10; -//@ has foo/struct.MyStruct.html '//a/@href' 'struct.MyStruct.html#method.trait_fn' +//@ has foo/type.MyStruct.html '//a/@href' 'type.MyStruct.html#method.trait_fn' /// [`trait_fn`] /// diff --git a/tests/rustdoc-html/intra-doc/trait-item.rs b/tests/rustdoc-html/intra-doc/trait-item.rs index 2563a768cc310..48e353705ad31 100644 --- a/tests/rustdoc-html/intra-doc/trait-item.rs +++ b/tests/rustdoc-html/intra-doc/trait-item.rs @@ -2,7 +2,7 @@ /// Link to [S::assoc_fn()] /// Link to [Default::default()] -//@ has trait_item/struct.S.html '//*[@href="struct.S.html#method.assoc_fn"]' 'S::assoc_fn()' +//@ has trait_item/type.S.html '//*[@href="type.S.html#method.assoc_fn"]' 'S::assoc_fn()' //@ has - '//*[@href="{{channel}}/core/default/trait.Default.html#tymethod.default"]' 'Default::default()' pub struct S; diff --git a/tests/rustdoc-html/intra-doc/type-alias.rs b/tests/rustdoc-html/intra-doc/type-alias.rs index 43e27483445f3..c757db83ce7f1 100644 --- a/tests/rustdoc-html/intra-doc/type-alias.rs +++ b/tests/rustdoc-html/intra-doc/type-alias.rs @@ -15,5 +15,5 @@ impl Bar { /// The minimum is [`Self::MIN`]. pub type Int = i32; -//@ has foo/type.Bar.html '//a[@href="struct.Foo.html#method.bar"]' 'Self::bar' +//@ has foo/type.Bar.html '//a[@href="type.Foo.html#method.bar"]' 'Self::bar' //@ has foo/type.Int.html '//a[@href="{{channel}}/std/primitive.i32.html#associatedconstant.MIN"]' 'Self::MIN' diff --git a/tests/rustdoc-html/jump-to-def/derive-macro.rs b/tests/rustdoc-html/jump-to-def/derive-macro.rs index 24deac047883c..e68eb3931745d 100644 --- a/tests/rustdoc-html/jump-to-def/derive-macro.rs +++ b/tests/rustdoc-html/jump-to-def/derive-macro.rs @@ -6,7 +6,7 @@ #![crate_name = "foo"] // First we check intra-doc links. -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' //@ has - '//a[@href="{{channel}}/core/fmt/macros/derive.Debug.html"]' 'Debug' //@ has - '//a[@href="{{channel}}/core/cmp/derive.PartialEq.html"]' 'PartialEq' diff --git a/tests/rustdoc-html/jump-to-def/doc-links-calls.rs b/tests/rustdoc-html/jump-to-def/doc-links-calls.rs index 05a5051a762ef..11b4496d7c903 100644 --- a/tests/rustdoc-html/jump-to-def/doc-links-calls.rs +++ b/tests/rustdoc-html/jump-to-def/doc-links-calls.rs @@ -4,7 +4,7 @@ //@ has 'src/foo/doc-links-calls.rs.html' -//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar' +//@ has - '//a[@href="../../foo/type.Bar.html"]' 'Bar' pub struct Bar; impl std::default::Default for Bar { diff --git a/tests/rustdoc-html/jump-to-def/doc-links.rs b/tests/rustdoc-html/jump-to-def/doc-links.rs index f1c5c50663822..3fb4fc57bf256 100644 --- a/tests/rustdoc-html/jump-to-def/doc-links.rs +++ b/tests/rustdoc-html/jump-to-def/doc-links.rs @@ -4,17 +4,17 @@ //@ has 'src/foo/doc-links.rs.html' -//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar' -//@ has - '//a[@href="../../foo/struct.Foo.html"]' 'Foo' +//@ has - '//a[@href="../../foo/type.Bar.html"]' 'Bar' +//@ has - '//a[@href="../../foo/type.Foo.html"]' 'Foo' pub struct Bar; pub struct Foo; -//@ has - '//a[@href="../../foo/enum.Enum.html"]' 'Enum' +//@ has - '//a[@href="../../foo/type.Enum.html"]' 'Enum' pub enum Enum { Variant1(String), Variant2(u8), } -//@ has - '//a[@href="../../foo/struct.Struct.html"]' 'Struct' +//@ has - '//a[@href="../../foo/type.Struct.html"]' 'Struct' pub struct Struct { pub a: u8, b: Foo, @@ -36,7 +36,7 @@ impl Trait for Struct { fn foo() {} } -//@ has - '//a[@href="../../foo/union.Union.html"]' 'Union' +//@ has - '//a[@href="../../foo/type.Union.html"]' 'Union' pub union Union { pub a: u16, pub f: u32, diff --git a/tests/rustdoc-html/jump-to-def/hidden-links.rs b/tests/rustdoc-html/jump-to-def/hidden-links.rs index 848265f38f514..8af97fdeba616 100644 --- a/tests/rustdoc-html/jump-to-def/hidden-links.rs +++ b/tests/rustdoc-html/jump-to-def/hidden-links.rs @@ -27,7 +27,7 @@ fn foo() { // This one should not generate any link. let x = hidden_links::error::Foo; - //@ has - '//pre/code/a[@href="../../hidden_links/struct.Bar.html"]' 'Bar' + //@ has - '//pre/code/a[@href="../../hidden_links/type.Bar.html"]' 'Bar' let y = hidden_links::Bar; // `x` and `y` generate a link every time... diff --git a/tests/rustdoc-html/jump-to-def/incoherent_impl.rs b/tests/rustdoc-html/jump-to-def/incoherent_impl.rs index d1aeea39e7aa9..67001d7d5ef6c 100644 --- a/tests/rustdoc-html/jump-to-def/incoherent_impl.rs +++ b/tests/rustdoc-html/jump-to-def/incoherent_impl.rs @@ -11,13 +11,13 @@ extern crate incoherent_impl1 as bar; //@ has 'src/foo/incoherent_impl.rs.html' -//@ has - '//pre//a[@href="../../incoherent_impl1/error/struct.Error.html#method.new"]' 'new' -//@ has - '//pre//a[@href="../../incoherent_impl2/struct.Error.html"]' 'Error' +//@ has - '//pre//a[@href="../../incoherent_impl1/error/type.Error.html#method.new"]' 'new' +//@ has - '//pre//a[@href="../../incoherent_impl2/type.Error.html"]' 'Error' // Now we check that the target files exist and contain the information we want. -//@ has 'incoherent_impl1/error/struct.Error.html' +//@ has 'incoherent_impl1/error/type.Error.html' //@ has - '//*[@id="method.new"]' 'pub fn new() -> Self' -//@ has 'incoherent_impl2/struct.Error.html' +//@ has 'incoherent_impl2/type.Error.html' fn foo() { let x = bar::error::Error::new(); diff --git a/tests/rustdoc-html/jump-to-def/item-with-derive.rs b/tests/rustdoc-html/jump-to-def/item-with-derive.rs index a3e034f973632..0b5bda85b4a3e 100644 --- a/tests/rustdoc-html/jump-to-def/item-with-derive.rs +++ b/tests/rustdoc-html/jump-to-def/item-with-derive.rs @@ -7,14 +7,14 @@ #![crate_name = "foo"] //@ has 'src/foo/item-with-derive.rs.html' -//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar' +//@ has - '//a[@href="../../foo/type.Bar.html"]' 'Bar' #[derive(Debug)] pub struct Bar { x: u8, } // Same test with an enum just in case... -//@ has - '//a[@href="../../foo/enum.Blob.html"]' 'Blob' +//@ has - '//a[@href="../../foo/type.Blob.html"]' 'Blob' #[derive(Debug)] pub enum Blob { X, diff --git a/tests/rustdoc-html/jump-to-def/non-local-method.rs b/tests/rustdoc-html/jump-to-def/non-local-method.rs index db85d31bf656c..2be54b86285e6 100644 --- a/tests/rustdoc-html/jump-to-def/non-local-method.rs +++ b/tests/rustdoc-html/jump-to-def/non-local-method.rs @@ -4,7 +4,7 @@ //@ has 'src/foo/non-local-method.rs.html' -//@ has - '//a[@href="{{channel}}/alloc/boxed/struct.Box.html"]' 'std::boxed::Box' +//@ has - '//a[@href="{{channel}}/alloc/boxed/type.Box.html"]' 'std::boxed::Box' use std::boxed::Box; //@ has - '//a[@href="{{channel}}/alloc/io/read/trait.Read.html"]' 'std::io::Read' use std::io::Read; @@ -21,8 +21,8 @@ pub fn bar2(readable: T) { } pub fn bar() { - //@ has - '//a[@href="{{channel}}/alloc/boxed/struct.Box.html"]' 'Box' - //@ has - '//a[@href="{{channel}}/alloc/boxed/struct.Box.html#method.new"]' 'new' + //@ has - '//a[@href="{{channel}}/alloc/boxed/type.Box.html"]' 'Box' + //@ has - '//a[@href="{{channel}}/alloc/boxed/type.Box.html#method.new"]' 'new' let _ = Box::new(0); //@ has - '//a[@href="#49"]' 'local_private' local_private(); @@ -40,9 +40,9 @@ pub fn macro_call() -> Result<(), ()> { } pub fn variant() { - //@ has - '//a[@href="{{channel}}/core/cmp/enum.Ordering.html#variant.Less"]' 'Less' + //@ has - '//a[@href="{{channel}}/core/cmp/type.Ordering.html#variant.Less"]' 'Less' let _ = Ordering::Less; - //@ has - '//a[@href="{{channel}}/core/marker/struct.PhantomData.html"]' 'PhantomData' + //@ has - '//a[@href="{{channel}}/core/marker/type.PhantomData.html"]' 'PhantomData' let _: PhantomData:: = PhantomData; } diff --git a/tests/rustdoc-html/jump-to-def/patterns.rs b/tests/rustdoc-html/jump-to-def/patterns.rs index e6b354eacd126..9e2f714d66758 100644 --- a/tests/rustdoc-html/jump-to-def/patterns.rs +++ b/tests/rustdoc-html/jump-to-def/patterns.rs @@ -22,8 +22,8 @@ pub enum X { pub fn foo() -> Result<(), ()> { // FIXME: would be nice to be able to check both the class and the href at the same time so // we could check the text as well... - //@ has - '//a[@class="prelude-val"]/@href' '{{channel}}/core/result/enum.Result.html#variant.Ok' - //@ has - '//a[@href="{{channel}}/core/result/enum.Result.html#variant.Ok"]' 'Ok' + //@ has - '//a[@class="prelude-val"]/@href' '{{channel}}/core/result/type.Result.html#variant.Ok' + //@ has - '//a[@href="{{channel}}/core/result/type.Result.html#variant.Ok"]' 'Ok' Ok(()) } diff --git a/tests/rustdoc-html/jump-to-def/prelude-types.rs b/tests/rustdoc-html/jump-to-def/prelude-types.rs index 2476d18e0b629..bf2b27c4fd4f2 100644 --- a/tests/rustdoc-html/jump-to-def/prelude-types.rs +++ b/tests/rustdoc-html/jump-to-def/prelude-types.rs @@ -7,8 +7,8 @@ //@ has 'src/foo/prelude-types.rs.html' // FIXME: would be nice to be able to check both the class and the href at the same time so // we could check the text as well... -//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/result/enum.Result.html' -//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/option/enum.Option.html' +//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/result/type.Result.html' +//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/option/type.Option.html' pub fn foo() -> Result, ()> { Err(()) } // This part is to ensure that they are not linking to the actual prelude ty. diff --git a/tests/rustdoc-html/jump-to-def/turbofish.rs b/tests/rustdoc-html/jump-to-def/turbofish.rs index a2e8caa38bc9e..e5c402749b38f 100644 --- a/tests/rustdoc-html/jump-to-def/turbofish.rs +++ b/tests/rustdoc-html/jump-to-def/turbofish.rs @@ -10,6 +10,6 @@ use std::marker::PhantomData as TheOne; pub fn foo() { - //@ has - '//a[@href="{{channel}}/core/marker/struct.PhantomData.html"]' 'TheOne' + //@ has - '//a[@href="{{channel}}/core/marker/type.PhantomData.html"]' 'TheOne' let _: TheOne::; } diff --git a/tests/rustdoc-html/macro/const-rendering-macros-33302.rs b/tests/rustdoc-html/macro/const-rendering-macros-33302.rs index 26b7d3d008481..38cbe54962c31 100644 --- a/tests/rustdoc-html/macro/const-rendering-macros-33302.rs +++ b/tests/rustdoc-html/macro/const-rendering-macros-33302.rs @@ -24,7 +24,7 @@ macro_rules! make { const D: i32 = ($n * $n); } - //@ has issue_33302/struct.S.html \ + //@ has issue_33302/type.S.html \ // '//*[@class="impl"]' 'impl T<(i32, i32)> for S' //@ has - '//*[@id="associatedconstant.C"]' 'const C: (i32, i32)' //@ has - '//*[@id="associatedconstant.D"]' 'const D: i32' @@ -33,7 +33,7 @@ macro_rules! make { const D: i32 = ($n / $n); } - //@ has issue_33302/struct.S.html \ + //@ has issue_33302/type.S.html \ // '//*[@class="impl"]' 'impl T<[i32; 16]> for S' //@ has - '//*[@id="associatedconstant.C-1"]' 'const C: (i32,)' //@ has - '//*[@id="associatedconstant.D-1"]' 'const D: i32' @@ -41,7 +41,7 @@ macro_rules! make { const C: (i32,) = ($n,); } - //@ has issue_33302/struct.S.html \ + //@ has issue_33302/type.S.html \ // '//*[@class="impl"]' 'impl T<[i32; 16]> for S' //@ has - '//*[@id="associatedconstant.C-2"]' 'const C: [i32; 16]' //@ has - '//*[@id="associatedconstant.D-2"]' 'const D: i32' diff --git a/tests/rustdoc-html/macro/external-macro-src.rs b/tests/rustdoc-html/macro/external-macro-src.rs index 998687d93bdc2..081357b777f3c 100644 --- a/tests/rustdoc-html/macro/external-macro-src.rs +++ b/tests/rustdoc-html/macro/external-macro-src.rs @@ -7,6 +7,6 @@ extern crate external_macro_src; //@ has foo/index.html '//a[@href="../src/foo/external-macro-src.rs.html#3-12"]' 'Source' -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//a[@href="../src/foo/external-macro-src.rs.html#12"]' 'Source' make_foo!(); diff --git a/tests/rustdoc-html/macro/macro-const-display-115295.rs b/tests/rustdoc-html/macro/macro-const-display-115295.rs index 445b47e0b2467..570776da1de26 100644 --- a/tests/rustdoc-html/macro/macro-const-display-115295.rs +++ b/tests/rustdoc-html/macro/macro-const-display-115295.rs @@ -4,7 +4,7 @@ //@ has foo/trait.Trait.html pub trait Trait {} -//@ has foo/struct.WithConst.html +//@ has foo/type.WithConst.html pub struct WithConst; macro_rules! spans_from_macro { @@ -36,6 +36,6 @@ impl Trait> for WithConst<41> {} //@ has - '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Trait> for WithConst<44>" -//@ has foo/struct.Other.html +//@ has foo/type.Other.html //@ has - //pre "pub field: WithConst<42>" spans_from_macro!(); diff --git a/tests/rustdoc-html/macro/macro-higher-kinded-function.rs b/tests/rustdoc-html/macro/macro-higher-kinded-function.rs index 738ea8fb3f153..ca5ce4a1e80de 100644 --- a/tests/rustdoc-html/macro/macro-higher-kinded-function.rs +++ b/tests/rustdoc-html/macro/macro-higher-kinded-function.rs @@ -10,7 +10,7 @@ macro_rules! gen { } } -//@ has 'foo/struct.Providers.html' +//@ has 'foo/type.Providers.html' //@ has - '//*[@class="rust item-decl"]//code' "pub a: for<'tcx> fn(TyCtxt<'tcx>, u8) -> i8," //@ has - '//*[@class="rust item-decl"]//code' "pub b: for<'tcx> fn(TyCtxt<'tcx>, u16) -> i16," //@ has - '//*[@id="structfield.a"]/code' "a: for<'tcx> fn(TyCtxt<'tcx>, u8) -> i8" diff --git a/tests/rustdoc-html/markdown-table-escape-pipe-27862.rs b/tests/rustdoc-html/markdown-table-escape-pipe-27862.rs index bf4c75a97a8ab..08ca6b3ec6e5c 100644 --- a/tests/rustdoc-html/markdown-table-escape-pipe-27862.rs +++ b/tests/rustdoc-html/markdown-table-escape-pipe-27862.rs @@ -4,4 +4,4 @@ /// Tests | Table /// ------|------------- /// t = b | id = \|x\| x -pub struct Foo; //@ has issue_27862/struct.Foo.html //td 'id = |x| x' +pub struct Foo; //@ has issue_27862/type.Foo.html //td 'id = |x| x' diff --git a/tests/rustdoc-html/masked.rs b/tests/rustdoc-html/masked.rs index bc0a5f57cef0d..e8e55e0cf2aa3 100644 --- a/tests/rustdoc-html/masked.rs +++ b/tests/rustdoc-html/masked.rs @@ -9,16 +9,16 @@ extern crate masked; //@ !hasraw 'search.index/name/*.js' 'masked_method' -//@ !hasraw 'foo/struct.String.html' 'MaskedTrait' -//@ !hasraw 'foo/struct.String.html' 'MaskedBlanketTrait' -//@ !hasraw 'foo/struct.String.html' 'masked_method' +//@ !hasraw 'foo/type.String.html' 'MaskedTrait' +//@ !hasraw 'foo/type.String.html' 'MaskedBlanketTrait' +//@ !hasraw 'foo/type.String.html' 'masked_method' pub use std::string::String; //@ !hasraw 'foo/trait.Clone.html' 'MaskedStruct' pub use std::clone::Clone; -//@ !hasraw 'foo/struct.MyStruct.html' 'MaskedTrait' -//@ !hasraw 'foo/struct.MyStruct.html' 'masked_method' +//@ !hasraw 'foo/type.MyStruct.html' 'MaskedTrait' +//@ !hasraw 'foo/type.MyStruct.html' 'masked_method' pub struct MyStruct; impl masked::MaskedTrait for MyStruct { diff --git a/tests/rustdoc-html/method-list.rs b/tests/rustdoc-html/method-list.rs index b7a0bc3c260f4..c5f058c8cac41 100644 --- a/tests/rustdoc-html/method-list.rs +++ b/tests/rustdoc-html/method-list.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//*[@class="sidebar-elems"]//section//a' 'super_long_name' //@ has - '//*[@class="sidebar-elems"]//section//a' 'Disp' pub struct Foo(usize); diff --git a/tests/rustdoc-html/mixing-doc-comments-and-attrs.rs b/tests/rustdoc-html/mixing-doc-comments-and-attrs.rs index 076a59c426bf2..70c4bab4d19f2 100644 --- a/tests/rustdoc-html/mixing-doc-comments-and-attrs.rs +++ b/tests/rustdoc-html/mixing-doc-comments-and-attrs.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has 'foo/struct.S1.html' +//@ has 'foo/type.S1.html' //@ snapshot S1_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]' #[doc = "Hello world!\n\n"] @@ -8,7 +8,7 @@ #[doc = " Hello again!\n"] pub struct S1; -//@ has 'foo/struct.S2.html' +//@ has 'foo/type.S2.html' //@ snapshot S2_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]' /// Hello world! @@ -17,7 +17,7 @@ pub struct S1; /// Hello again! pub struct S2; -//@ has 'foo/struct.S3.html' +//@ has 'foo/type.S3.html' //@ snapshot S3_top-doc - '//details[@class="toggle top-doc"]/div[@class="docblock"]' /** Par 1 */ /// diff --git a/tests/rustdoc-html/multiple-import-levels.rs b/tests/rustdoc-html/multiple-import-levels.rs index ac00f1fbdfc24..bf12f21d17988 100644 --- a/tests/rustdoc-html/multiple-import-levels.rs +++ b/tests/rustdoc-html/multiple-import-levels.rs @@ -20,15 +20,15 @@ mod c { pub use crate::b::Type as Woof; } -//@ has 'foo/struct.Type.html' +//@ has 'foo/type.Type.html' //@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'foo 2 1' /// foo pub use b::Type; -//@ has 'foo/struct.Whatever.html' +//@ has 'foo/type.Whatever.html' //@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'whatever 3 2 1' /// whatever pub use c::Type as Whatever; -//@ has 'foo/struct.Woof.html' +//@ has 'foo/type.Woof.html' //@ has - '//*[@class="toggle top-doc"]/*[@class="docblock"]' 'a dog 4 2 1' /// a dog pub use c::Woof; diff --git a/tests/rustdoc-html/mut-params.rs b/tests/rustdoc-html/mut-params.rs index b3d4fe8c0599c..6d52ca8cd6b35 100644 --- a/tests/rustdoc-html/mut-params.rs +++ b/tests/rustdoc-html/mut-params.rs @@ -5,7 +5,7 @@ pub struct Foo; -//@ count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 2 +//@ count foo/type.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 2 //@ !has - '//*[@class="impl-items"]//*[@class="method"]' 'mut' impl Foo { pub fn foo(mut self) {} diff --git a/tests/rustdoc-html/nested-items-issue-111415.rs b/tests/rustdoc-html/nested-items-issue-111415.rs index 79dc2b0378ff7..6ed7d59e26fb8 100644 --- a/tests/rustdoc-html/nested-items-issue-111415.rs +++ b/tests/rustdoc-html/nested-items-issue-111415.rs @@ -11,12 +11,12 @@ //@ has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits' // Checking that there are only three items. //@ count - '//*[@id="main-content"]//dt' 3 -//@ has - '//*[@id="main-content"]//a[@href="struct.Bar.html"]' 'Bar' +//@ has - '//*[@id="main-content"]//a[@href="type.Bar.html"]' 'Bar' //@ has - '//*[@id="main-content"]//a[@href="fn.foo.html"]' 'foo' //@ has - '//*[@id="main-content"]//a[@href="trait.Foo.html"]' 'Foo' // Now checking that the `foo` method is visible in `Bar` page. -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' //@ has - '//*[@id="method.foo"]/*[@class="code-header"]' 'pub fn foo()' //@ has - '//*[@id="method.bar"]/*[@class="code-header"]' 'fn bar()' pub struct Bar; diff --git a/tests/rustdoc-html/notable-trait/doc-notable_trait-negative.positive.html b/tests/rustdoc-html/notable-trait/doc-notable_trait-negative.positive.html index a3d0fedaaf47e..f055cc30180f0 100644 --- a/tests/rustdoc-html/notable-trait/doc-notable_trait-negative.positive.html +++ b/tests/rustdoc-html/notable-trait/doc-notable_trait-negative.positive.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/rustdoc-html/notable-trait/doc-notable_trait-slice.bare_fn_matches.html b/tests/rustdoc-html/notable-trait/doc-notable_trait-slice.bare_fn_matches.html index 7d2a2589133be..5094f9c49b586 100644 --- a/tests/rustdoc-html/notable-trait/doc-notable_trait-slice.bare_fn_matches.html +++ b/tests/rustdoc-html/notable-trait/doc-notable_trait-slice.bare_fn_matches.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/rustdoc-html/notable-trait/doc-notable_trait.bare-fn.html b/tests/rustdoc-html/notable-trait/doc-notable_trait.bare-fn.html index 9f71677cf4ffc..ca5d3dc8660b7 100644 --- a/tests/rustdoc-html/notable-trait/doc-notable_trait.bare-fn.html +++ b/tests/rustdoc-html/notable-trait/doc-notable_trait.bare-fn.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/rustdoc-html/notable-trait/doc-notable_trait.rs b/tests/rustdoc-html/notable-trait/doc-notable_trait.rs index 83fe6172e9471..fff4ce901df6f 100644 --- a/tests/rustdoc-html/notable-trait/doc-notable_trait.rs +++ b/tests/rustdoc-html/notable-trait/doc-notable_trait.rs @@ -22,7 +22,7 @@ pub struct SomeStruct; impl SomeTrait for SomeStruct {} impl SomeStruct { - //@ has doc_notable_trait/struct.SomeStruct.html + //@ has doc_notable_trait/type.SomeStruct.html //@ has - '//a[@class="tooltip"]/@data-notable-ty' 'SomeStruct' //@ snapshot some-struct-new - '//script[@id="notable-traits-data"]' pub fn new() -> SomeStruct { diff --git a/tests/rustdoc-html/notable-trait/doc-notable_trait.some-struct-new.html b/tests/rustdoc-html/notable-trait/doc-notable_trait.some-struct-new.html index 38689c79f1ace..14ae825aacffa 100644 --- a/tests/rustdoc-html/notable-trait/doc-notable_trait.some-struct-new.html +++ b/tests/rustdoc-html/notable-trait/doc-notable_trait.some-struct-new.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/rustdoc-html/notable-trait/doc-notable_trait.wrap-me.html b/tests/rustdoc-html/notable-trait/doc-notable_trait.wrap-me.html index c137be9e3a5d8..3ed544ce1d5fd 100644 --- a/tests/rustdoc-html/notable-trait/doc-notable_trait.wrap-me.html +++ b/tests/rustdoc-html/notable-trait/doc-notable_trait.wrap-me.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/rustdoc-html/notable-trait/notable-trait-badge-generic.rs b/tests/rustdoc-html/notable-trait/notable-trait-badge-generic.rs index 723f3fed6c5a5..deebb4f69864c 100644 --- a/tests/rustdoc-html/notable-trait/notable-trait-badge-generic.rs +++ b/tests/rustdoc-html/notable-trait/notable-trait-badge-generic.rs @@ -8,6 +8,6 @@ pub trait Bound {} // A conditional impl: the badge is rendered unconditionally even though the // impl only holds for `T: Bound`. -//@ has 'foo/struct.Wrapper.html' '//div[@class="notable-trait-badge-container"]/a[@href="trait.Labeled.html"]' 'Labeled' +//@ has 'foo/type.Wrapper.html' '//div[@class="notable-trait-badge-container"]/a[@href="trait.Labeled.html"]' 'Labeled' pub struct Wrapper(pub T); impl Labeled for Wrapper {} diff --git a/tests/rustdoc-html/notable-trait/notable-trait-badge-negative.rs b/tests/rustdoc-html/notable-trait/notable-trait-badge-negative.rs index 225572513c40f..6fdfa0a658bc5 100644 --- a/tests/rustdoc-html/notable-trait/notable-trait-badge-negative.rs +++ b/tests/rustdoc-html/notable-trait/notable-trait-badge-negative.rs @@ -7,7 +7,7 @@ pub trait Neg {} pub trait Pos {} // A negative impl must not produce a badge. -//@ has 'foo/struct.T.html' +//@ has 'foo/type.T.html' //@ count - '//div[@class="notable-trait-badge-container"]/a' 1 //@ has - '//div[@class="notable-trait-badge-container"]/a[@href="trait.Pos.html"]' 'Pos' pub struct T; diff --git a/tests/rustdoc-html/notable-trait/notable-trait-badge-supertrait.rs b/tests/rustdoc-html/notable-trait/notable-trait-badge-supertrait.rs index 9bb3226099a51..e6bd61a12dc3a 100644 --- a/tests/rustdoc-html/notable-trait/notable-trait-badge-supertrait.rs +++ b/tests/rustdoc-html/notable-trait/notable-trait-badge-supertrait.rs @@ -6,7 +6,7 @@ pub trait Base {} pub trait Derived: Base {} -//@ has 'foo/struct.S.html' +//@ has 'foo/type.S.html' // Implementing `Derived` requires implementing the notable supertrait `Base`, // so its badge shows up. //@ count - '//div[@class="notable-trait-badge-container"]/a' 1 diff --git a/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable-cross-crate.rs b/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable-cross-crate.rs index de7008cf5ab0c..db5fc7082a6e8 100644 --- a/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable-cross-crate.rs +++ b/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable-cross-crate.rs @@ -8,7 +8,7 @@ extern crate notable_dep; // unlinkable: the badge is still emitted but rendered as plain text. use notable_dep::Spaceship; -//@ has 'foo/struct.Rocket.html' +//@ has 'foo/type.Rocket.html' // The badge is present... //@ has - '//div[@class="notable-trait-badge-container"]/a' 'Spaceship' // ...but unlinked: no badge carries an `href`. diff --git a/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable.rs b/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable.rs index 97526242f3fd1..ae3ccf44b0149 100644 --- a/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable.rs +++ b/tests/rustdoc-html/notable-trait/notable-trait-badge-unlinkable.rs @@ -12,7 +12,7 @@ trait Private {} #[doc(notable_trait)] pub trait Public {} -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ count - '//div[@class="notable-trait-badge-container"]' 1 //@ has - '//div[@class="notable-trait-badge-container"]/a[@href="trait.Public.html"]' 'Public' pub struct Foo; diff --git a/tests/rustdoc-html/notable-trait/notable-trait-badge.rs b/tests/rustdoc-html/notable-trait/notable-trait-badge.rs index b53d989d0f819..0ef354c8aa456 100644 --- a/tests/rustdoc-html/notable-trait/notable-trait-badge.rs +++ b/tests/rustdoc-html/notable-trait/notable-trait-badge.rs @@ -9,7 +9,7 @@ pub trait AlsoLabeled {} pub trait Plain {} -//@ has 'foo/struct.Tagged.html' +//@ has 'foo/type.Tagged.html' //@ has - '//div[@class="notable-trait-badge-container"]/a[@href="trait.Labeled.html"][@title="foo::Labeled"]' 'Labeled' // Badges are sorted by trait name, so `AlsoLabeled` precedes `Labeled`. //@ has - '//div[@class="notable-trait-badge-container"]/a[1]' 'AlsoLabeled' @@ -19,7 +19,7 @@ impl Labeled for Tagged {} impl AlsoLabeled for Tagged {} impl Plain for Tagged {} -//@ has 'foo/struct.Untagged.html' +//@ has 'foo/type.Untagged.html' //@ count - '//div[@class="notable-trait-badge-container"]' 0 pub struct Untagged; impl Plain for Untagged {} diff --git a/tests/rustdoc-html/notable-trait/spotlight-from-dependency.odd.html b/tests/rustdoc-html/notable-trait/spotlight-from-dependency.odd.html index 910698a5854e9..dd6c8a31cef62 100644 --- a/tests/rustdoc-html/notable-trait/spotlight-from-dependency.odd.html +++ b/tests/rustdoc-html/notable-trait/spotlight-from-dependency.odd.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tests/rustdoc-html/notable-trait/spotlight-from-dependency.rs b/tests/rustdoc-html/notable-trait/spotlight-from-dependency.rs index 992102f87c7c6..384442c7a4a08 100644 --- a/tests/rustdoc-html/notable-trait/spotlight-from-dependency.rs +++ b/tests/rustdoc-html/notable-trait/spotlight-from-dependency.rs @@ -2,7 +2,7 @@ use std::iter::Iterator; -//@ has foo/struct.Odd.html +//@ has foo/type.Odd.html //@ has - '//*[@id="method.new"]//a[@class="tooltip"]/@data-notable-ty' 'Odd' //@ snapshot odd - '//script[@id="notable-traits-data"]' pub struct Odd { diff --git a/tests/rustdoc-html/primitive/primitive-link.rs b/tests/rustdoc-html/primitive/primitive-link.rs index f824195fac5e5..af20da7038f3d 100644 --- a/tests/rustdoc-html/primitive/primitive-link.rs +++ b/tests/rustdoc-html/primitive/primitive-link.rs @@ -1,11 +1,11 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.u32.html"]' 'u32' -//@ has foo/struct.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.i64.html"]' 'i64' -//@ has foo/struct.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.i32.html"]' 'std::primitive::i32' -//@ has foo/struct.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.str.html"]' 'std::primitive::str' +//@ has foo/type.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.u32.html"]' 'u32' +//@ has foo/type.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.i64.html"]' 'i64' +//@ has foo/type.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.i32.html"]' 'std::primitive::i32' +//@ has foo/type.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.str.html"]' 'std::primitive::str' -//@ has foo/struct.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.i32.html#associatedconstant.MAX"]' 'std::primitive::i32::MAX' +//@ has foo/type.Foo.html '//*[@class="docblock"]/p/a[@href="{{channel}}/std/primitive.i32.html#associatedconstant.MAX"]' 'std::primitive::i32::MAX' /// It contains [`u32`] and [i64]. /// It also links to [std::primitive::i32], [std::primitive::str], diff --git a/tests/rustdoc-html/private/doc-hidden-private-67851-both.rs b/tests/rustdoc-html/private/doc-hidden-private-67851-both.rs index 2e2190d875544..d81a384731734 100644 --- a/tests/rustdoc-html/private/doc-hidden-private-67851-both.rs +++ b/tests/rustdoc-html/private/doc-hidden-private-67851-both.rs @@ -2,9 +2,9 @@ // https://github.com/rust-lang/rust/issues/67851 #![crate_name="foo"] -//@ has foo/struct.Hidden.html +//@ has foo/type.Hidden.html #[doc(hidden)] pub struct Hidden; -//@ has foo/struct.Private.html +//@ has foo/type.Private.html struct Private; diff --git a/tests/rustdoc-html/private/doc-hidden-private-67851-hidden.rs b/tests/rustdoc-html/private/doc-hidden-private-67851-hidden.rs index a811a04a668d3..57f27f550b60a 100644 --- a/tests/rustdoc-html/private/doc-hidden-private-67851-hidden.rs +++ b/tests/rustdoc-html/private/doc-hidden-private-67851-hidden.rs @@ -2,9 +2,9 @@ // https://github.com/rust-lang/rust/issues/67851 #![crate_name="foo"] -//@ has foo/struct.Hidden.html +//@ has foo/type.Hidden.html #[doc(hidden)] pub struct Hidden; -//@ !has foo/struct.Private.html +//@ !has foo/type.Private.html struct Private; diff --git a/tests/rustdoc-html/private/doc-hidden-private-67851-neither.rs b/tests/rustdoc-html/private/doc-hidden-private-67851-neither.rs index 1f70ceefe44d6..20c63c3345cb0 100644 --- a/tests/rustdoc-html/private/doc-hidden-private-67851-neither.rs +++ b/tests/rustdoc-html/private/doc-hidden-private-67851-neither.rs @@ -1,9 +1,9 @@ // https://github.com/rust-lang/rust/issues/67851 #![crate_name="foo"] -//@ !has foo/struct.Hidden.html +//@ !has foo/type.Hidden.html #[doc(hidden)] pub struct Hidden; -//@ !has foo/struct.Private.html +//@ !has foo/type.Private.html struct Private; diff --git a/tests/rustdoc-html/private/doc-hidden-private-67851-private.rs b/tests/rustdoc-html/private/doc-hidden-private-67851-private.rs index f6f546ad5ea7c..45ffd8c00de8b 100644 --- a/tests/rustdoc-html/private/doc-hidden-private-67851-private.rs +++ b/tests/rustdoc-html/private/doc-hidden-private-67851-private.rs @@ -2,9 +2,9 @@ // https://github.com/rust-lang/rust/issues/67851 #![crate_name="foo"] -//@ !has foo/struct.Hidden.html +//@ !has foo/type.Hidden.html #[doc(hidden)] pub struct Hidden; -//@ has foo/struct.Private.html +//@ has foo/type.Private.html struct Private; diff --git a/tests/rustdoc-html/private/empty-impl-block-private-with-doc.rs b/tests/rustdoc-html/private/empty-impl-block-private-with-doc.rs index 5dc7e1aed7ab8..9ca3143b51f06 100644 --- a/tests/rustdoc-html/private/empty-impl-block-private-with-doc.rs +++ b/tests/rustdoc-html/private/empty-impl-block-private-with-doc.rs @@ -4,7 +4,7 @@ #![allow(incomplete_features)] #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' pub struct Foo; // There are 3 impl blocks with public item and one that should not be displayed diff --git a/tests/rustdoc-html/private/empty-impl-block-private.rs b/tests/rustdoc-html/private/empty-impl-block-private.rs index 2ee65d1a9698e..91d2b69a7b45e 100644 --- a/tests/rustdoc-html/private/empty-impl-block-private.rs +++ b/tests/rustdoc-html/private/empty-impl-block-private.rs @@ -2,7 +2,7 @@ #![allow(incomplete_features)] #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' pub struct Foo; // There are 3 impl blocks with public item and one that should not be displayed diff --git a/tests/rustdoc-html/private/files-creation-private.rs b/tests/rustdoc-html/private/files-creation-private.rs index 54579380f0bfc..288592c156f5f 100644 --- a/tests/rustdoc-html/private/files-creation-private.rs +++ b/tests/rustdoc-html/private/files-creation-private.rs @@ -1,16 +1,19 @@ #![crate_name="foo"] //@ files "foo" \ -// '["index.html", "all.html", "sidebar-items.js", "foo", "bar", "private", "struct.Bar.html"]' +// '["index.html", "all.html", "sidebar-items.js", "foo", "bar", "private", "struct.Bar.html", \ +// "type.Bar.html"]' //@ files "foo/bar" '["index.html", "sidebar-items.js"]' //@ !has "foo/priv/index.html" -//@ !has "foo/priv/struct.Foo.html" +//@ !has "foo/priv/type.Foo.html" mod private { pub struct Foo; } -//@ has "foo/struct.Bar.html" +//@ has 'foo/struct.Bar.html' +//@ matchesraw - '' +//@ has "foo/type.Bar.html" pub use crate::private::Foo as Bar; //@ !has "foo/foo/index.html" diff --git a/tests/rustdoc-html/private/hidden-private.rs b/tests/rustdoc-html/private/hidden-private.rs index 658e093cc238c..56f959152f7a0 100644 --- a/tests/rustdoc-html/private/hidden-private.rs +++ b/tests/rustdoc-html/private/hidden-private.rs @@ -18,7 +18,7 @@ const _: () = { struct ShouldBeHidden; - //@ has 'foo/struct.Foo.html' + //@ has 'foo/type.Foo.html' //@ !has - '//*[@class="code-header"]' 'impl Bar for Foo' #[doc(hidden)] impl Bar for Foo { @@ -27,7 +27,7 @@ const _: () = { } } - //@ has 'foo/struct.Private.html' + //@ has 'foo/type.Private.html' //@ has - '//*[@id="impl-Bar-for-Private"]/*[@class="code-header"]' 'impl Bar for Private' //@ has - '//*[@id="method.bar"]/*[@class="code-header"]' 'fn bar(&self)' impl Bar for Private { diff --git a/tests/rustdoc-html/private/inline-private-with-intermediate-doc-hidden.rs b/tests/rustdoc-html/private/inline-private-with-intermediate-doc-hidden.rs index d27ecbad1690e..9a43dc1a0c509 100644 --- a/tests/rustdoc-html/private/inline-private-with-intermediate-doc-hidden.rs +++ b/tests/rustdoc-html/private/inline-private-with-intermediate-doc-hidden.rs @@ -8,7 +8,7 @@ // There should only be one struct displayed. //@ count - '//*[@id="main-content"]/*[@class="section-header"]' 1 //@ has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs' -//@ has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport' +//@ has - '//*[@id="main-content"]//a[@href="type.Reexport.html"]' 'Reexport' //@ has - '//*[@id="main-content"]//dd' 'Visible. Original.' mod private { diff --git a/tests/rustdoc-html/private/inner-private-110422.rs b/tests/rustdoc-html/private/inner-private-110422.rs index 31e286768792d..40e179c684154 100644 --- a/tests/rustdoc-html/private/inner-private-110422.rs +++ b/tests/rustdoc-html/private/inner-private-110422.rs @@ -33,7 +33,7 @@ fn foo() { } //@ has 'foo/index.html' -//@ has - '//a[@href="struct.Bar.html"]' 'Bar' +//@ has - '//a[@href="type.Bar.html"]' 'Bar' struct Bar; const BAR: i32 = { @@ -48,7 +48,7 @@ const BAR: i32 = { } impl Foo for Bar {} - //@ has 'foo/struct.Bar.html' + //@ has 'foo/type.Bar.html' //@ has - '//*[@id="method.foo"]/*[@class="code-header"]' 'pub(crate) fn foo()' //@ count - '//*[@id="main-content"]/*[@class="section-header"]' 3 // We now check that the `Foo` trait is not documented nor visible on `Bar` page. diff --git a/tests/rustdoc-html/private/missing-private-inlining-109258.rs b/tests/rustdoc-html/private/missing-private-inlining-109258.rs index 7f010f160c439..6dba8cfc7e8c2 100644 --- a/tests/rustdoc-html/private/missing-private-inlining-109258.rs +++ b/tests/rustdoc-html/private/missing-private-inlining-109258.rs @@ -9,16 +9,16 @@ //@ has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Modules' //@ has - '//*[@id="reexport.Foo"]' 'pub use crate::issue_109258::Foo;' -//@ has - '//*[@id="reexport.Foo"]//a[@href="issue_109258/struct.Foo.html"]' 'Foo' -//@ !has 'foo/struct.Foo.html' +//@ has - '//*[@id="reexport.Foo"]//a[@href="issue_109258/type.Foo.html"]' 'Foo' +//@ !has 'foo/type.Foo.html' pub use crate::issue_109258::Foo; //@ has 'foo/issue_109258/index.html' // We should only have a "Structs" header. //@ count - '//*[@id="main-content"]/h2[@class="section-header"]' 1 //@ has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Structs' -//@ has - '//*[@id="main-content"]//a[@href="struct.Foo.html"]' 'Foo' -//@ has 'foo/issue_109258/struct.Foo.html' +//@ has - '//*[@id="main-content"]//a[@href="type.Foo.html"]' 'Foo' +//@ has 'foo/issue_109258/type.Foo.html' pub mod issue_109258 { mod priv_mod { pub struct Foo; diff --git a/tests/rustdoc-html/private/private-fields-tuple-struct.rs b/tests/rustdoc-html/private/private-fields-tuple-struct.rs index 51141923cd8ad..d0099bdab1d78 100644 --- a/tests/rustdoc-html/private/private-fields-tuple-struct.rs +++ b/tests/rustdoc-html/private/private-fields-tuple-struct.rs @@ -1,15 +1,15 @@ // This test checks the diplay of "/* private fields */" sentence in tuple structs. #![crate_name = "foo"] -//@ has 'foo/struct.A.html' '//*[@class="rust item-decl"]/code' 'pub struct A(pub u8, _);' +//@ has 'foo/type.A.html' '//*[@class="rust item-decl"]/code' 'pub struct A(pub u8, _);' pub struct A(pub u8, u8); -//@ has 'foo/struct.B.html' '//*[@class="rust item-decl"]/code' 'pub struct B(_, pub u8);' +//@ has 'foo/type.B.html' '//*[@class="rust item-decl"]/code' 'pub struct B(_, pub u8);' pub struct B(u8, pub u8); -//@ has 'foo/struct.C.html' '//*[@class="rust item-decl"]/code' 'pub struct C(_, pub u8, _);' +//@ has 'foo/type.C.html' '//*[@class="rust item-decl"]/code' 'pub struct C(_, pub u8, _);' pub struct C(u8, pub u8, u8); -//@ has 'foo/struct.D.html' '//*[@class="rust item-decl"]/code' 'pub struct D(pub u8, _, pub u8);' +//@ has 'foo/type.D.html' '//*[@class="rust item-decl"]/code' 'pub struct D(pub u8, _, pub u8);' pub struct D(pub u8, u8, pub u8); -//@ has 'foo/struct.E.html' '//*[@class="rust item-decl"]/code' 'pub struct E(/* private fields */);' +//@ has 'foo/type.E.html' '//*[@class="rust item-decl"]/code' 'pub struct E(/* private fields */);' pub struct E(u8); -//@ has 'foo/struct.F.html' '//*[@class="rust item-decl"]/code' 'pub struct F(/* private fields */);' +//@ has 'foo/type.F.html' '//*[@class="rust item-decl"]/code' 'pub struct F(/* private fields */);' pub struct F(u8, u8); diff --git a/tests/rustdoc-html/private/public-impl-mention-private-generic-46380-2.rs b/tests/rustdoc-html/private/public-impl-mention-private-generic-46380-2.rs index 0445ae75e8526..e8f4e103ec798 100644 --- a/tests/rustdoc-html/private/public-impl-mention-private-generic-46380-2.rs +++ b/tests/rustdoc-html/private/public-impl-mention-private-generic-46380-2.rs @@ -3,7 +3,7 @@ pub trait PublicTrait {} -//@ has foo/struct.PublicStruct.html +//@ has foo/type.PublicStruct.html pub struct PublicStruct; //@ !has - '//*[@class="impl"]' 'impl PublicTrait for PublicStruct' diff --git a/tests/rustdoc-html/private/traits-in-bodies-private.rs b/tests/rustdoc-html/private/traits-in-bodies-private.rs index a3455b3255b32..d84d2d191b093 100644 --- a/tests/rustdoc-html/private/traits-in-bodies-private.rs +++ b/tests/rustdoc-html/private/traits-in-bodies-private.rs @@ -3,7 +3,7 @@ //@ compile-flags:--document-private-items -//@ has traits_in_bodies_private/struct.SomeStruct.html +//@ has traits_in_bodies_private/type.SomeStruct.html //@ !has - '//code' 'impl HiddenTrait for SomeStruct' pub struct SomeStruct; diff --git a/tests/rustdoc-html/pub-method.rs b/tests/rustdoc-html/pub-method.rs index a759967fae510..edf27575a5cca 100644 --- a/tests/rustdoc-html/pub-method.rs +++ b/tests/rustdoc-html/pub-method.rs @@ -9,7 +9,7 @@ pub fn bar() -> usize { 2 } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//*[@class="method"]' 'pub fn new()' //@ has - '//*[@class="method"]' 'fn not_pub()' pub struct Foo(usize); diff --git a/tests/rustdoc-html/raw-ident-eliminate-r-hashtag.rs b/tests/rustdoc-html/raw-ident-eliminate-r-hashtag.rs index d9b88627ae50f..12f77fb00b798 100644 --- a/tests/rustdoc-html/raw-ident-eliminate-r-hashtag.rs +++ b/tests/rustdoc-html/raw-ident-eliminate-r-hashtag.rs @@ -1,7 +1,7 @@ #![crate_type="lib"] pub mod internal { - //@ has 'raw_ident_eliminate_r_hashtag/internal/struct.mod.html' + //@ has 'raw_ident_eliminate_r_hashtag/internal/type.mod.html' #[allow(non_camel_case_types)] pub struct r#mod; @@ -9,13 +9,13 @@ pub mod internal { /// /// [name]: mod /// [other name]: crate::internal::mod - //@ has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//*a[@href="struct.mod.html"]' 'name' - //@ has 'raw_ident_eliminate_r_hashtag/internal/struct.B.html' '//*a[@href="struct.mod.html"]' 'other name' + //@ has 'raw_ident_eliminate_r_hashtag/internal/type.B.html' '//*a[@href="type.mod.html"]' 'name' + //@ has 'raw_ident_eliminate_r_hashtag/internal/type.B.html' '//*a[@href="type.mod.html"]' 'other name' pub struct B; } /// See [name]. /// /// [name]: internal::mod -//@ has 'raw_ident_eliminate_r_hashtag/struct.A.html' '//*a[@href="internal/struct.mod.html"]' 'name' +//@ has 'raw_ident_eliminate_r_hashtag/type.A.html' '//*a[@href="internal/type.mod.html"]' 'name' pub struct A; diff --git a/tests/rustdoc-html/read-more-unneeded.rs b/tests/rustdoc-html/read-more-unneeded.rs index 783ebe7820004..53037f89fb0b9 100644 --- a/tests/rustdoc-html/read-more-unneeded.rs +++ b/tests/rustdoc-html/read-more-unneeded.rs @@ -23,7 +23,7 @@ pub trait MyFrom { pub struct NonZero; -//@ has 'foo/struct.NonZero.html' +//@ has 'foo/type.NonZero.html' impl MyFrom for NonZero { //@ matches - '//*[@class="docblock"]' '^Hello Read more$' fn try_from1() {} diff --git a/tests/rustdoc-html/redirect-map-empty.rs b/tests/rustdoc-html/redirect-map-empty.rs index 7d215fc230ee8..159926664e02a 100644 --- a/tests/rustdoc-html/redirect-map-empty.rs +++ b/tests/rustdoc-html/redirect-map-empty.rs @@ -3,4 +3,4 @@ #![crate_name = "foo"] //@ !has foo/redirect-map.json -pub struct Foo; +pub fn foo() {} diff --git a/tests/rustdoc-html/redirect-map.rs b/tests/rustdoc-html/redirect-map.rs index 0207ba98fdb4e..601116976e26d 100644 --- a/tests/rustdoc-html/redirect-map.rs +++ b/tests/rustdoc-html/redirect-map.rs @@ -2,8 +2,8 @@ #![crate_name = "foo"] -//@ !has foo/private/struct.Quz.html -//@ !has foo/hidden/struct.Bar.html +//@ !has foo/private/type.Quz.html +//@ !has foo/hidden/type.Bar.html //@ has foo/redirect-map.json pub use private::Quz; pub use hidden::Bar; diff --git a/tests/rustdoc-html/redirect-rename.rs b/tests/rustdoc-html/redirect-rename.rs index 724dd4978cae4..7397827bef051 100644 --- a/tests/rustdoc-html/redirect-rename.rs +++ b/tests/rustdoc-html/redirect-rename.rs @@ -1,8 +1,8 @@ #![crate_name = "foo"] mod hidden { - //@ has foo/hidden/struct.Foo.html - //@ has - '//p/a' '../../foo/struct.FooBar.html' + //@ has foo/hidden/type.Foo.html + //@ has - '//p/a' '../../foo/type.FooBar.html' pub struct Foo {} pub union U { a: usize } pub enum Empty {} @@ -12,17 +12,17 @@ mod hidden { //@ has foo/hidden/bar/index.html //@ has - '//p/a' '../../foo/baz/index.html' pub mod bar { - //@ has foo/hidden/bar/struct.Thing.html - //@ has - '//p/a' '../../foo/baz/struct.Thing.html' + //@ has foo/hidden/bar/type.Thing.html + //@ has - '//p/a' '../../foo/baz/type.Thing.html' pub struct Thing {} } } -//@ has foo/struct.FooBar.html +//@ has foo/type.FooBar.html pub use hidden::Foo as FooBar; -//@ has foo/union.FooU.html +//@ has foo/type.FooU.html pub use hidden::U as FooU; -//@ has foo/enum.FooEmpty.html +//@ has foo/type.FooEmpty.html pub use hidden::Empty as FooEmpty; //@ has foo/constant.FooC.html pub use hidden::C as FooC; @@ -30,5 +30,5 @@ pub use hidden::C as FooC; pub use hidden::S as FooS; //@ has foo/baz/index.html -//@ has foo/baz/struct.Thing.html +//@ has foo/baz/type.Thing.html pub use hidden::bar as baz; diff --git a/tests/rustdoc-html/redirect.rs b/tests/rustdoc-html/redirect.rs index e52d3e5e83e61..01711b0a8a4c9 100644 --- a/tests/rustdoc-html/redirect.rs +++ b/tests/rustdoc-html/redirect.rs @@ -9,12 +9,12 @@ pub trait Foo {} //@ has redirect/index.html //@ has - '//code' 'pub use reexp_stripped::Bar' //@ has - '//code/a' 'Bar' -//@ has - '//a[@href="../reexp_stripped/hidden/struct.Bar.html"]' 'Bar' +//@ has - '//a[@href="../reexp_stripped/hidden/type.Bar.html"]' 'Bar' // FIXME: Should be `@!has`: https://github.com/rust-lang/rust/issues/111249 -//@ has reexp_stripped/hidden/struct.Bar.html -//@ matchesraw - '' -//@ has 'reexp_stripped/struct.Bar.html' -//@ has - '//a[@href="struct.Bar.html"]' 'Bar' +//@ has reexp_stripped/hidden/type.Bar.html +//@ matchesraw - '' +//@ has 'reexp_stripped/type.Bar.html' +//@ has - '//a[@href="type.Bar.html"]' 'Bar' #[doc(no_inline)] pub use reexp_stripped::Bar; impl Foo for Bar {} @@ -22,9 +22,9 @@ impl Foo for Bar {} //@ has redirect/index.html //@ has - '//code' 'pub use reexp_stripped::Quz' //@ has - '//code/a' 'Quz' -//@ has reexp_stripped/private/struct.Quz.html -//@ has - '//p/a' '../../reexp_stripped/struct.Quz.html' -//@ has 'reexp_stripped/struct.Quz.html' +//@ has reexp_stripped/private/type.Quz.html +//@ has - '//p/a' '../../reexp_stripped/type.Quz.html' +//@ has 'reexp_stripped/type.Quz.html' #[doc(no_inline)] pub use reexp_stripped::Quz; impl Foo for Quz {} @@ -37,6 +37,6 @@ mod private_no_inline { //@ has redirect/index.html //@ has - '//code' 'pub use private_no_inline::Qux' //@ !has - '//a' 'Qux' -//@ !has redirect/struct.Qux.html +//@ !has redirect/type.Qux.html #[doc(no_inline)] pub use private_no_inline::Qux; diff --git a/tests/rustdoc-html/reexport/anonymous-reexport.rs b/tests/rustdoc-html/reexport/anonymous-reexport.rs index bf5fa93f953a6..210bc6c77e829 100644 --- a/tests/rustdoc-html/reexport/anonymous-reexport.rs +++ b/tests/rustdoc-html/reexport/anonymous-reexport.rs @@ -10,7 +10,7 @@ //@ has - '//*[@id="main-content"]/h2' 'Re-exports' // The 3 re-exports. //@ count - '//*[@id="main-content"]//*[@class="item-table reexports"]/dt//code' 3 -// The public struct. +// The public type. //@ count - '//*[@id="main-content"]//a[@class="struct"]' 1 mod ext { diff --git a/tests/rustdoc-html/reexport/blanket-reexport-item.rs b/tests/rustdoc-html/reexport/blanket-reexport-item.rs index 199a47019a2e4..a9aea1a673324 100644 --- a/tests/rustdoc-html/reexport/blanket-reexport-item.rs +++ b/tests/rustdoc-html/reexport/blanket-reexport-item.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.S.html '//*[@id="impl-Into%3CU%3E-for-T"]//h3[@class="code-header"]' 'impl Into for T' +//@ has foo/type.S.html '//*[@id="impl-Into%3CU%3E-for-T"]//h3[@class="code-header"]' 'impl Into for T' pub struct S2 {} mod m { pub struct S {} diff --git a/tests/rustdoc-html/reexport/cfg_doc_reexport.rs b/tests/rustdoc-html/reexport/cfg_doc_reexport.rs index 2c3b3110fb724..2ed4d6cc3313d 100644 --- a/tests/rustdoc-html/reexport/cfg_doc_reexport.rs +++ b/tests/rustdoc-html/reexport/cfg_doc_reexport.rs @@ -19,7 +19,7 @@ pub trait Sized: MetaSized {} #[doc(cfg(feature = "foobar"))] mod imp_priv { - //@ has 'foo/struct.BarPriv.html' + //@ has 'foo/type.BarPriv.html' //@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on crate feature foobar only.' pub struct BarPriv {} @@ -31,7 +31,7 @@ mod imp_priv { pub use crate::imp_priv::*; pub mod bar { - //@ has 'foo/bar/struct.Bar.html' + //@ has 'foo/bar/type.Bar.html' //@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on crate feature bar only.' #[doc(cfg(feature = "bar"))] diff --git a/tests/rustdoc-html/reexport/doc-hidden-reexports-109449.rs b/tests/rustdoc-html/reexport/doc-hidden-reexports-109449.rs index 78b9214300a95..47a11c312631e 100644 --- a/tests/rustdoc-html/reexport/doc-hidden-reexports-109449.rs +++ b/tests/rustdoc-html/reexport/doc-hidden-reexports-109449.rs @@ -30,7 +30,7 @@ pub mod single_reexport { // Then we check that we have the correct link for each re-export. - //@ !has - '//*[@href="struct.Foo.html"]' 'Foo' + //@ !has - '//*[@href="type.Foo.html"]' 'Foo' //@ !has - '//*[@id="reexport.Foo"]/code' 'pub use crate::private_module::Public as Foo;' pub use crate::private_module::Public as Foo; //@ !has - '//*[@href="type.Foo2.html"]' 'Foo2' @@ -39,27 +39,27 @@ pub mod single_reexport { //@ !has - '//*[@href="type.Yo.html"]' 'Yo' //@ !has - '//*[@id="reexport.Yo"]/code' 'pub use crate::Bar3 as Yo;' pub use crate::Bar3 as Yo; - //@ !has - '//*[@href="struct.Yo2.html"]' 'Yo2' + //@ !has - '//*[@href="type.Yo2.html"]' 'Yo2' //@ !has - '//*[@id="reexport.Yo2"]/code' 'pub use crate::FooFoo as Yo2;' pub use crate::FooFoo as Yo2; // Checking that each file is also created as expected. - //@ !has 'foo/single_reexport/struct.Foo.html' + //@ !has 'foo/single_reexport/type.Foo.html' //@ !has 'foo/single_reexport/type.Foo2.html' //@ !has 'foo/single_reexport/type.Yo.html' - //@ !has 'foo/single_reexport/struct.Yo2.html' + //@ !has 'foo/single_reexport/type.Yo2.html' } // However, re-exporting an item inheriting `#[doc(hidden)]` will inline it. pub mod single_reexport_inherit_hidden { //@ has 'foo/single_reexport_inherit_hidden/index.html' - //@ has - '//*[@href="struct.Foo3.html"]' 'Foo3' + //@ has - '//*[@href="type.Foo3.html"]' 'Foo3' pub use crate::module::Public2 as Foo3; //@ has - '//*[@href="type.Foo4.html"]' 'Foo4' pub use crate::module::Bar2 as Foo4; - //@ has 'foo/single_reexport_inherit_hidden/struct.Foo3.html' + //@ has 'foo/single_reexport_inherit_hidden/type.Foo3.html' //@ has 'foo/single_reexport_inherit_hidden/type.Foo4.html' } @@ -114,10 +114,10 @@ pub mod glob_reexport { pub use crate::*; // This one should be inlined. //@ !has - '//*[@id="main-content"]//*' 'pub use crate::module::*;' - //@ has - '//*[@id="main-content"]//a[@href="struct.Public2.html"]' 'Public2' + //@ has - '//*[@id="main-content"]//a[@href="type.Public2.html"]' 'Public2' //@ has - '//*[@id="main-content"]//a[@href="type.Bar2.html"]' 'Bar2' // And we check that the two files were created too. - //@ has 'foo/glob_reexport/struct.Public2.html' + //@ has 'foo/glob_reexport/type.Public2.html' //@ has 'foo/glob_reexport/type.Bar2.html' pub use crate::module::*; } @@ -130,7 +130,7 @@ mod private { // Checking that `#[doc(hidden)]` re-exports documentation isn't generated. pub mod doc_hidden_reexport { //@ has 'foo/doc_hidden_reexport/index.html' - // Ensure there is only one item in this page and that it's a struct. + // Ensure there is only one item in this page and that it's a type. //@ count - '//dt' 1 //@ has - '//a[@class="struct"]' 'Reexport' // Check that the `#[doc(hidden)]` re-export's attributes are not taken into account. diff --git a/tests/rustdoc-html/reexport/enum-variant-reexport-35488.rs b/tests/rustdoc-html/reexport/enum-variant-reexport-35488.rs index b8e42ef7a8909..de3cc56adc34d 100644 --- a/tests/rustdoc-html/reexport/enum-variant-reexport-35488.rs +++ b/tests/rustdoc-html/reexport/enum-variant-reexport-35488.rs @@ -9,7 +9,7 @@ mod foo { } //@ has 'foo/index.html' '//code' 'pub use self::Foo::*;' -//@ has 'foo/enum.Foo.html' +//@ has 'foo/type.Foo.html' pub use self::foo::*; //@ has 'foo/index.html' '//code' 'pub use std::option::Option::None;' diff --git a/tests/rustdoc-html/reexport/enum-variant.rs b/tests/rustdoc-html/reexport/enum-variant.rs index 7436f8853e02e..82cf51960fb0c 100644 --- a/tests/rustdoc-html/reexport/enum-variant.rs +++ b/tests/rustdoc-html/reexport/enum-variant.rs @@ -10,5 +10,5 @@ pub enum Foo { //@ has 'foo/index.html' -//@ has - '//*[@class="item-table reexports"]/*[@id="reexport.S"]//a[@href="enum.Foo.html#variant.S"]' 'S' +//@ has - '//*[@class="item-table reexports"]/*[@id="reexport.S"]//a[@href="type.Foo.html#variant.S"]' 'S' pub use self::Foo::S; diff --git a/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-120487.rs b/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-120487.rs index 5b918e0ffd9f2..10e053c32c2de 100644 --- a/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-120487.rs +++ b/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-120487.rs @@ -23,10 +23,10 @@ mod b { pub struct Test2; } -//@ has 'foo/struct.Test1.html' +//@ has 'foo/type.Test1.html' //@ count - '//*[@id="main-content"]/*[@class="item-info"]' 1 //@ has - '//*[@id="main-content"]/*[@class="item-info"]' 'Available on non-crate feature a only.' pub use a::*; -//@ has 'foo/struct.Test2.html' +//@ has 'foo/type.Test2.html' //@ count - '//*[@id="main-content"]/*[@class="item-info"]' 0 pub use b::Test2; diff --git a/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs b/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs index b0f7df6f3e2d4..a317dd9effd70 100644 --- a/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs +++ b/tests/rustdoc-html/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs @@ -20,10 +20,10 @@ mod b { pub struct Test2; } -//@ has 'foo/struct.Test1.html' +//@ has 'foo/type.Test1.html' //@ count - '//*[@id="main-content"]/*[@class="item-info"]' 1 //@ has - '//*[@id="main-content"]/*[@class="item-info"]' 'Available on non-crate feature a only.' pub use a::*; -//@ has 'foo/struct.Test2.html' +//@ has 'foo/type.Test2.html' //@ count - '//*[@id="main-content"]/*[@class="item-info"]' 0 pub use b::Test2; diff --git a/tests/rustdoc-html/reexport/glob-reexport-feature-combination.rs b/tests/rustdoc-html/reexport/glob-reexport-feature-combination.rs index 33b2fe94c138a..a865b4d18b109 100644 --- a/tests/rustdoc-html/reexport/glob-reexport-feature-combination.rs +++ b/tests/rustdoc-html/reexport/glob-reexport-feature-combination.rs @@ -10,7 +10,7 @@ //@ has 'foo/index.html' //@ has - '//dt/a[@title="struct foo::A"]/../*[@class="stab portability"]' 'Non-bar and non-foo' -//@ has 'foo/struct.A.html' +//@ has 'foo/type.A.html' //@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on non-crate feature bar and non-crate feature foo only.' @@ -27,7 +27,7 @@ pub use a::*; //@ has 'foo/index.html' //@ has - '//dt/a[@title="struct foo::B"]/../*[@class="stab portability"]' 'Non-bar and non-baz and non-foo' -//@ has 'foo/struct.B.html' +//@ has 'foo/type.B.html' //@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on non-crate feature bar and non-crate feature baz and non-crate feature foo only.' @@ -48,7 +48,7 @@ pub use b::*; //@ has 'foo/index.html' //@ has - '//dt/a[@title="struct foo::C"]/../*[@class="stab portability"]' 'Non-bar and non-baz and non-foo' -//@ has 'foo/struct.C.html' +//@ has 'foo/type.C.html' //@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ // 'Available on non-crate feature bar and non-crate feature baz and non-crate feature foo only.' diff --git a/tests/rustdoc-html/reexport/infinite-redirection.rs b/tests/rustdoc-html/reexport/infinite-redirection.rs index 9ac559fbecfba..6e2d864fc2a9e 100644 --- a/tests/rustdoc-html/reexport/infinite-redirection.rs +++ b/tests/rustdoc-html/reexport/infinite-redirection.rs @@ -4,12 +4,12 @@ // file which redirects to itself). // We check it's not a redirection file. -//@ has 'foo/builders/struct.ActionRowBuilder.html' +//@ has 'foo/builders/type.ActionRowBuilder.html' //@ has - '//*[@id="synthetic-implementations"]' 'Auto Trait Implementations' // And that the link in the module is targeting it. //@ has 'foo/builders/index.html' -//@ has - '//a[@href="struct.ActionRowBuilder.html"]' 'ActionRowBuilder' +//@ has - '//a[@href="type.ActionRowBuilder.html"]' 'ActionRowBuilder' mod auto { mod action_row { diff --git a/tests/rustdoc-html/reexport/inline-rename-34473.rs b/tests/rustdoc-html/reexport/inline-rename-34473.rs index 7a065adb0db95..1e3e1cb162d46 100644 --- a/tests/rustdoc-html/reexport/inline-rename-34473.rs +++ b/tests/rustdoc-html/reexport/inline-rename-34473.rs @@ -8,6 +8,6 @@ mod second { //@ has foo/index.html //@ !hasraw - SomeTypeWithLongName -//@ has foo/struct.SomeType.html -//@ !has foo/struct.SomeTypeWithLongName.html +//@ has foo/type.SomeType.html +//@ !has foo/type.SomeTypeWithLongName.html pub use second::{SomeTypeWithLongName as SomeType}; diff --git a/tests/rustdoc-html/reexport/macro-reexport-inline.rs b/tests/rustdoc-html/reexport/macro-reexport-inline.rs index 4707d958f8c97..4c37f550a7c68 100644 --- a/tests/rustdoc-html/reexport/macro-reexport-inline.rs +++ b/tests/rustdoc-html/reexport/macro-reexport-inline.rs @@ -118,12 +118,12 @@ pub mod bar { //@ !has 'foo/bar/macro.actually_hidden_wild_macro.html' pub use self::actually_hidden_wild::*; - //@ !has 'foo/bar/struct.HiddenStruct.html' + //@ !has 'foo/bar/type.HiddenStruct.html' pub use self::actually_hidden_struct::HiddenStruct; //@ !has 'foo/bar/macro.actually_hidden_indirect_macro.html' pub use self::actually_hidden_indirect::actually_hidden_indirect_macro; - //@ !has 'foo/bar/struct.IndirectlyHiddenStruct.html' + //@ !has 'foo/bar/type.IndirectlyHiddenStruct.html' pub use self::actually_hidden_indirect_struct::IndirectlyHiddenStruct; } diff --git a/tests/rustdoc-html/reexport/merge-glob-and-non-glob.rs b/tests/rustdoc-html/reexport/merge-glob-and-non-glob.rs index ff67859cb39af..700e26841a8f3 100644 --- a/tests/rustdoc-html/reexport/merge-glob-and-non-glob.rs +++ b/tests/rustdoc-html/reexport/merge-glob-and-non-glob.rs @@ -16,10 +16,10 @@ //@ has - '//dl[@class="item-table"]/dd' 'Foobar Blob' //@ has - '//dl[@class="item-table"]/dd' 'Tarte Tatin' -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has - '//*[@class="docblock"]' 'Foobar Blob' -//@ has 'foo/struct.Another.html' +//@ has 'foo/type.Another.html' //@ has - '//*[@class="docblock"]' 'Tarte Tatin' mod raw { diff --git a/tests/rustdoc-html/reexport/pub-use-loop-107350.rs b/tests/rustdoc-html/reexport/pub-use-loop-107350.rs index 4ec9133e2d2e3..f397e8186dbae 100644 --- a/tests/rustdoc-html/reexport/pub-use-loop-107350.rs +++ b/tests/rustdoc-html/reexport/pub-use-loop-107350.rs @@ -3,7 +3,7 @@ #![crate_name = "foo"] -//@ has 'foo/oops/enum.OhNo.html' +//@ has 'foo/oops/type.OhNo.html' pub mod oops { pub use crate::oops::OhNo; diff --git a/tests/rustdoc-html/reexport/reexport-doc.rs b/tests/rustdoc-html/reexport/reexport-doc.rs index 0c20de41231d1..aee503bde9954 100644 --- a/tests/rustdoc-html/reexport/reexport-doc.rs +++ b/tests/rustdoc-html/reexport/reexport-doc.rs @@ -2,7 +2,7 @@ extern crate reexport_doc_aux as dep; -//@ has 'reexport_doc/struct.Foo.html' +//@ has 'reexport_doc/type.Foo.html' //@ count - '//p' 'These are the docs for Foo.' 1 /// These are the docs for Foo. pub use dep::Foo; diff --git a/tests/rustdoc-html/reexport/reexport-of-reexport-108679.rs b/tests/rustdoc-html/reexport/reexport-of-reexport-108679.rs index 0d2faf71d3267..55aadd076f420 100644 --- a/tests/rustdoc-html/reexport/reexport-of-reexport-108679.rs +++ b/tests/rustdoc-html/reexport/reexport-of-reexport-108679.rs @@ -1,4 +1,4 @@ -// This test ensures that the `struct.B.html` only exists in `a`: +// This test ensures that the `type.B.html` only exists in `a`: // since `a::B` is public (and inlined too), `self::a::B` doesn't // need to be inlined as well. @@ -9,8 +9,8 @@ pub mod a { // Should only contain "Structs". //@ count - '//*[@id="main-content"]//*[@class="item-table"]' 1 //@ has - '//*[@id="structs"]' 'Structs' - //@ has - '//*[@id="main-content"]//a[@href="struct.A.html"]' 'A' - //@ has - '//*[@id="main-content"]//a[@href="struct.B.html"]' 'B' + //@ has - '//*[@id="main-content"]//a[@href="type.A.html"]' 'A' + //@ has - '//*[@id="main-content"]//a[@href="type.B.html"]' 'B' mod b { pub struct B; } diff --git a/tests/rustdoc-html/reexport/reexport-trait-from-hidden-111064-2.rs b/tests/rustdoc-html/reexport/reexport-trait-from-hidden-111064-2.rs index 8f0a5806b0918..b75f4cb95c5d0 100644 --- a/tests/rustdoc-html/reexport/reexport-trait-from-hidden-111064-2.rs +++ b/tests/rustdoc-html/reexport/reexport-trait-from-hidden-111064-2.rs @@ -13,7 +13,8 @@ pub trait MetaSized: PointeeSized {} pub trait Sized: MetaSized {} //@ files "foo" "['sidebar-items.js', 'all.html', 'hidden', 'index.html', 'struct.Bar.html', \ -// 'visible', 'trait.Sized.html', 'trait.MetaSized.html', 'trait.PointeeSized.html']" +// 'visible', 'trait.Sized.html', 'trait.MetaSized.html', 'trait.PointeeSized.html', \ +// 'type.Bar.html']" //@ files "foo/hidden" "['inner']" //@ files "foo/hidden/inner" "['trait.Foo.html']" //@ files "foo/visible" "['index.html', 'sidebar-items.js', 'trait.Foo.html']" @@ -39,6 +40,8 @@ pub mod hidden { pub use hidden::inner as visible; //@ has 'foo/struct.Bar.html' +//@ matchesraw - '' +//@ has 'foo/type.Bar.html' //@ count - '//*[@id="impl-Foo-for-Bar"]' 1 pub struct Bar; diff --git a/tests/rustdoc-html/reexport/reexports-of-same-name.rs b/tests/rustdoc-html/reexport/reexports-of-same-name.rs index 6e5d328b081ef..38702d118c96a 100644 --- a/tests/rustdoc-html/reexport/reexports-of-same-name.rs +++ b/tests/rustdoc-html/reexport/reexports-of-same-name.rs @@ -16,11 +16,11 @@ pub mod nested { } //@ count - '//*[@id="main-content"]//code' 'pub use nested::Foo;' 2 -//@ has - '//*[@id="reexport.Foo"]//a[@href="nested/struct.Foo.html"]' 'Foo' +//@ has - '//*[@id="reexport.Foo"]//a[@href="nested/type.Foo.html"]' 'Foo' //@ has - '//*[@id="reexport.Foo-1"]//a[@href="nested/fn.Foo.html"]' 'Foo' pub use nested::Foo; //@ count - '//*[@id="main-content"]//code' 'pub use Foo as Bar;' 2 -//@ has - '//*[@id="reexport.Bar"]//a[@href="nested/struct.Foo.html"]' 'Foo' +//@ has - '//*[@id="reexport.Bar"]//a[@href="nested/type.Foo.html"]' 'Foo' //@ has - '//*[@id="reexport.Bar-1"]//a[@href="nested/fn.Foo.html"]' 'Foo' pub use Foo as Bar; diff --git a/tests/rustdoc-html/reexport/reexports-priv.rs b/tests/rustdoc-html/reexport/reexports-priv.rs index 4521b4feebc43..9f880a754fedd 100644 --- a/tests/rustdoc-html/reexport/reexports-priv.rs +++ b/tests/rustdoc-html/reexport/reexports-priv.rs @@ -14,22 +14,22 @@ pub(self) use reexports::addr_of_self; //@ !has 'foo/macro.addr_of_local.html' use reexports::addr_of_local; -//@ has 'foo/struct.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' +//@ has 'foo/type.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' pub use reexports::Foo; -//@ !has 'foo/struct.FooCrate.html' +//@ !has 'foo/type.FooCrate.html' pub(crate) use reexports::FooCrate; -//@ !has 'foo/struct.FooSelf.html' +//@ !has 'foo/type.FooSelf.html' pub(self) use reexports::FooSelf; -//@ !has 'foo/struct.FooLocal.html' +//@ !has 'foo/type.FooLocal.html' use reexports::FooLocal; -//@ has 'foo/enum.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' +//@ has 'foo/type.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' pub use reexports::Bar; -//@ !has 'foo/enum.BarCrate.html' +//@ !has 'foo/type.BarCrate.html' pub(crate) use reexports::BarCrate; -//@ !has 'foo/enum.BarSelf.html' +//@ !has 'foo/type.BarSelf.html' pub(self) use reexports::BarSelf; -//@ !has 'foo/enum.BarLocal.html' +//@ !has 'foo/type.BarLocal.html' use reexports::BarLocal; //@ has 'foo/fn.foo.html' '//pre[@class="rust item-decl"]' 'pub fn foo()' @@ -50,13 +50,13 @@ pub(self) use reexports::TypeSelf; //@ !has 'foo/type.TypeLocal.html' use reexports::TypeLocal; -//@ has 'foo/union.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' +//@ has 'foo/type.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' pub use reexports::Union; -//@ !has 'foo/union.UnionCrate.html' +//@ !has 'foo/type.UnionCrate.html' pub(crate) use reexports::UnionCrate; -//@ !has 'foo/union.UnionSelf.html' +//@ !has 'foo/type.UnionSelf.html' pub(self) use reexports::UnionSelf; -//@ !has 'foo/union.UnionLocal.html' +//@ !has 'foo/type.UnionLocal.html' use reexports::UnionLocal; pub mod outer { @@ -72,26 +72,26 @@ pub mod outer { //@ !has 'foo/outer/inner/macro.addr_of_local.html' use reexports::addr_of_local; - //@ has 'foo/outer/inner/struct.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' + //@ has 'foo/outer/inner/type.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' pub use reexports::Foo; - //@ has 'foo/outer/inner/struct.FooCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) struct FooCrate;' + //@ has 'foo/outer/inner/type.FooCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) struct FooCrate;' pub(crate) use reexports::FooCrate; - //@ has 'foo/outer/inner/struct.FooSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) struct FooSuper;' + //@ has 'foo/outer/inner/type.FooSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) struct FooSuper;' pub(super) use reexports::FooSuper; - //@ !has 'foo/outer/inner/struct.FooSelf.html' + //@ !has 'foo/outer/inner/type.FooSelf.html' pub(self) use reexports::FooSelf; - //@ !has 'foo/outer/inner/struct.FooLocal.html' + //@ !has 'foo/outer/inner/type.FooLocal.html' use reexports::FooLocal; - //@ has 'foo/outer/inner/enum.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' + //@ has 'foo/outer/inner/type.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' pub use reexports::Bar; - //@ has 'foo/outer/inner/enum.BarCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) enum BarCrate {' + //@ has 'foo/outer/inner/type.BarCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) enum BarCrate {' pub(crate) use reexports::BarCrate; - //@ has 'foo/outer/inner/enum.BarSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) enum BarSuper {' + //@ has 'foo/outer/inner/type.BarSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) enum BarSuper {' pub(super) use reexports::BarSuper; - //@ !has 'foo/outer/inner/enum.BarSelf.html' + //@ !has 'foo/outer/inner/type.BarSelf.html' pub(self) use reexports::BarSelf; - //@ !has 'foo/outer/inner/enum.BarLocal.html' + //@ !has 'foo/outer/inner/type.BarLocal.html' use reexports::BarLocal; //@ has 'foo/outer/inner/fn.foo.html' '//pre[@class="rust item-decl"]' 'pub fn foo()' @@ -116,20 +116,20 @@ pub mod outer { //@ !has 'foo/outer/inner/type.TypeLocal.html' use reexports::TypeLocal; - //@ has 'foo/outer/inner/union.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' + //@ has 'foo/outer/inner/type.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' pub use reexports::Union; - //@ has 'foo/outer/inner/union.UnionCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) union UnionCrate {' + //@ has 'foo/outer/inner/type.UnionCrate.html' '//*[@class="rust item-decl"]' 'pub(crate) union UnionCrate {' pub(crate) use reexports::UnionCrate; - //@ has 'foo/outer/inner/union.UnionSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) union UnionSuper {' + //@ has 'foo/outer/inner/type.UnionSuper.html' '//*[@class="rust item-decl"]' 'pub(in outer) union UnionSuper {' pub(super) use reexports::UnionSuper; - //@ !has 'foo/outer/inner/union.UnionSelf.html' + //@ !has 'foo/outer/inner/type.UnionSelf.html' pub(self) use reexports::UnionSelf; - //@ !has 'foo/outer/inner/union.UnionLocal.html' + //@ !has 'foo/outer/inner/type.UnionLocal.html' use reexports::UnionLocal; } } mod re_re_exports { - //@ !has 'foo/re_re_exports/union.Union.html' + //@ !has 'foo/re_re_exports/type.Union.html' use crate::reexports::Union; } diff --git a/tests/rustdoc-html/reexport/reexports.rs b/tests/rustdoc-html/reexport/reexports.rs index b17e9cd719a1e..3867eeccd57c4 100644 --- a/tests/rustdoc-html/reexport/reexports.rs +++ b/tests/rustdoc-html/reexport/reexports.rs @@ -13,22 +13,22 @@ pub(self) use reexports::addr_of_self; //@ !has 'foo/macro.addr_of_local.html' use reexports::addr_of_local; -//@ has 'foo/struct.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' +//@ has 'foo/type.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' pub use reexports::Foo; -//@ !has 'foo/struct.FooCrate.html' +//@ !has 'foo/type.FooCrate.html' pub(crate) use reexports::FooCrate; -//@ !has 'foo/struct.FooSelf.html' +//@ !has 'foo/type.FooSelf.html' pub(self) use reexports::FooSelf; -//@ !has 'foo/struct.FooLocal.html' +//@ !has 'foo/type.FooLocal.html' use reexports::FooLocal; -//@ has 'foo/enum.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' +//@ has 'foo/type.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' pub use reexports::Bar; -//@ !has 'foo/enum.BarCrate.html' +//@ !has 'foo/type.BarCrate.html' pub(crate) use reexports::BarCrate; -//@ !has 'foo/enum.BarSelf.html' +//@ !has 'foo/type.BarSelf.html' pub(self) use reexports::BarSelf; -//@ !has 'foo/enum.BarLocal.html' +//@ !has 'foo/type.BarLocal.html' use reexports::BarLocal; //@ has 'foo/fn.foo.html' '//pre[@class="rust item-decl"]' 'pub fn foo()' @@ -49,13 +49,13 @@ pub(self) use reexports::TypeSelf; //@ !has 'foo/type.TypeLocal.html' use reexports::TypeLocal; -//@ has 'foo/union.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' +//@ has 'foo/type.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' pub use reexports::Union; -//@ !has 'foo/union.UnionCrate.html' +//@ !has 'foo/type.UnionCrate.html' pub(crate) use reexports::UnionCrate; -//@ !has 'foo/union.UnionSelf.html' +//@ !has 'foo/type.UnionSelf.html' pub(self) use reexports::UnionSelf; -//@ !has 'foo/union.UnionLocal.html' +//@ !has 'foo/type.UnionLocal.html' use reexports::UnionLocal; pub mod outer { @@ -71,26 +71,26 @@ pub mod outer { //@ !has 'foo/outer/inner/macro.addr_of_local.html' use reexports::addr_of_local; - //@ has 'foo/outer/inner/struct.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' + //@ has 'foo/outer/inner/type.Foo.html' '//*[@class="rust item-decl"]' 'pub struct Foo;' pub use reexports::Foo; - //@ !has 'foo/outer/inner/struct.FooCrate.html' + //@ !has 'foo/outer/inner/type.FooCrate.html' pub(crate) use reexports::FooCrate; - //@ !has 'foo/outer/inner/struct.FooSuper.html' + //@ !has 'foo/outer/inner/type.FooSuper.html' pub(super) use reexports::FooSuper; - //@ !has 'foo/outer/inner/struct.FooSelf.html' + //@ !has 'foo/outer/inner/type.FooSelf.html' pub(self) use reexports::FooSelf; - //@ !has 'foo/outer/inner/struct.FooLocal.html' + //@ !has 'foo/outer/inner/type.FooLocal.html' use reexports::FooLocal; - //@ has 'foo/outer/inner/enum.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' + //@ has 'foo/outer/inner/type.Bar.html' '//*[@class="rust item-decl"]' 'pub enum Bar {' pub use reexports::Bar; - //@ !has 'foo/outer/inner/enum.BarCrate.html' + //@ !has 'foo/outer/inner/type.BarCrate.html' pub(crate) use reexports::BarCrate; - //@ !has 'foo/outer/inner/enum.BarSuper.html' + //@ !has 'foo/outer/inner/type.BarSuper.html' pub(super) use reexports::BarSuper; - //@ !has 'foo/outer/inner/enum.BarSelf.html' + //@ !has 'foo/outer/inner/type.BarSelf.html' pub(self) use reexports::BarSelf; - //@ !has 'foo/outer/inner/enum.BarLocal.html' + //@ !has 'foo/outer/inner/type.BarLocal.html' use reexports::BarLocal; //@ has 'foo/outer/inner/fn.foo.html' '//pre[@class="rust item-decl"]' 'pub fn foo()' @@ -115,15 +115,15 @@ pub mod outer { //@ !has 'foo/outer/inner/type.TypeLocal.html' use reexports::TypeLocal; - //@ has 'foo/outer/inner/union.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' + //@ has 'foo/outer/inner/type.Union.html' '//*[@class="rust item-decl"]' 'pub union Union {' pub use reexports::Union; - //@ !has 'foo/outer/inner/union.UnionCrate.html' + //@ !has 'foo/outer/inner/type.UnionCrate.html' pub(crate) use reexports::UnionCrate; - //@ !has 'foo/outer/inner/union.UnionSuper.html' + //@ !has 'foo/outer/inner/type.UnionSuper.html' pub(super) use reexports::UnionSuper; - //@ !has 'foo/outer/inner/union.UnionSelf.html' + //@ !has 'foo/outer/inner/type.UnionSelf.html' pub(self) use reexports::UnionSelf; - //@ !has 'foo/outer/inner/union.UnionLocal.html' + //@ !has 'foo/outer/inner/type.UnionLocal.html' use reexports::UnionLocal; } } diff --git a/tests/rustdoc-html/reexport/transient-reexports.rs b/tests/rustdoc-html/reexport/transient-reexports.rs index 1ce6b67aa3ccf..9fd183249ba64 100644 --- a/tests/rustdoc-html/reexport/transient-reexports.rs +++ b/tests/rustdoc-html/reexport/transient-reexports.rs @@ -13,7 +13,7 @@ extern crate bar; // We ensure that there is only one item, so it's not possibly another item we're gonna check. //@ count - '//dl/[@class="item-table"]/dt' 1 //@ count - '//dl/[@class="item-table"]/dd' 1 -//@ has - '//dl/[@class="item-table"]/dt/a[@href="struct.Type.html"]' 'Type' +//@ has - '//dl/[@class="item-table"]/dt/a[@href="type.Type.html"]' 'Type' // We should have "foo", "bar" and "baz" (one fragment in each crate reexport). //@ has - '//dl/[@class="item-table"]/dd' 'foo bar baz' diff --git a/tests/rustdoc-html/reexport/underscore-import-61592.rs b/tests/rustdoc-html/reexport/underscore-import-61592.rs index d0fef96858a67..08155726271ab 100644 --- a/tests/rustdoc-html/reexport/underscore-import-61592.rs +++ b/tests/rustdoc-html/reexport/underscore-import-61592.rs @@ -13,5 +13,5 @@ pub use foo::FooTrait as _; //@ has bar/index.html //@ has - '//a[@href="#reexports"]' 'Re-exports' //@ has - '//code' 'pub use foo::FooStruct as _;' -//@ !has - '//a[@href="struct._.html"]' '' +//@ !has - '//a[@href="type._.html"]' '' pub use foo::FooStruct as _; diff --git a/tests/rustdoc-html/reexport/wrapped-unnamble-type-143222.rs b/tests/rustdoc-html/reexport/wrapped-unnamble-type-143222.rs index 9a8893786f5f5..68616c25384f9 100644 --- a/tests/rustdoc-html/reexport/wrapped-unnamble-type-143222.rs +++ b/tests/rustdoc-html/reexport/wrapped-unnamble-type-143222.rs @@ -10,7 +10,7 @@ extern crate wrap_unnamable_type as helper; -//@ has 'foo/struct.Foo.html' -//@ !hasraw - 'struct.Bar.html' +//@ has 'foo/type.Foo.html' +//@ !hasraw - 'type.Bar.html' #[doc(inline)] pub use helper::Foo; diff --git a/tests/rustdoc-html/repr.rs b/tests/rustdoc-html/repr.rs index 6e80abb855d7f..28323092d329e 100644 --- a/tests/rustdoc-html/repr.rs +++ b/tests/rustdoc-html/repr.rs @@ -5,17 +5,17 @@ // Check the "local case" (HIR cleaning) // // Don't render the default repr which is `Rust`. -//@ has 'repr/struct.ReprDefault.html' +//@ has 'repr/type.ReprDefault.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(Rust)]' pub struct ReprDefault; // Don't render the `Rust` repr β€” even if given explicitly β€” since it's the default. -//@ has 'repr/struct.ReprRust.html' +//@ has 'repr/type.ReprRust.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(Rust)]' #[repr(Rust)] // omitted pub struct ReprRust; -//@ has 'repr/struct.ReprCPubFields.html' +//@ has 'repr/type.ReprCPubFields.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]' #[repr(C)] // public pub struct ReprCPubFields { @@ -23,7 +23,7 @@ pub struct ReprCPubFields { pub b: u32, } -//@ has 'repr/struct.ReprCPrivField.html' +//@ has 'repr/type.ReprCPrivField.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]' #[repr(C)] // private... pub struct ReprCPrivField { @@ -31,14 +31,14 @@ pub struct ReprCPrivField { pub b: u32, } -//@ has 'repr/enum.ReprIsize.html' +//@ has 'repr/type.ReprIsize.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(isize)]' #[repr(isize)] // public pub enum ReprIsize { Bla, } -//@ has 'repr/enum.ReprU32HiddenVariant.html' +//@ has 'repr/type.ReprU32HiddenVariant.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(u32)]' #[repr(u32)] // private... pub enum ReprU32HiddenVariant { @@ -47,7 +47,7 @@ pub enum ReprU32HiddenVariant { Public, } -//@ has 'repr/struct.ReprAlignHiddenField.html' +//@ has 'repr/type.ReprAlignHiddenField.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(align(4))]' #[repr(align(4))] // private... pub struct ReprAlignHiddenField { @@ -55,35 +55,35 @@ pub struct ReprAlignHiddenField { pub hidden: i16, // ...since this field is hidden } -//@ has 'repr/struct.ReprSimd.html' +//@ has 'repr/type.ReprSimd.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(simd, packed(2))]' #[repr(simd, packed(2))] // public pub struct ReprSimd { pub field: [u8; 1], } -//@ has 'repr/enum.ReprU32Align.html' +//@ has 'repr/type.ReprU32Align.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(u32, align(8))]' #[repr(u32, align(8))] // public pub enum ReprU32Align { Variant(u16), } -//@ has 'repr/enum.ReprCHiddenVariantField.html' +//@ has 'repr/type.ReprCHiddenVariantField.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]' #[repr(C)] // private... pub enum ReprCHiddenVariantField { Variant { #[doc(hidden)] field: () }, //...since this field is hidden } -//@ has 'repr/struct.ReprTransparentPrivField.html' +//@ has 'repr/type.ReprTransparentPrivField.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // private... pub struct ReprTransparentPrivField { field: u32, // ...since the non-1-ZST field is private } -//@ has 'repr/struct.ReprTransparentPriv1ZstFields.html' +//@ has 'repr/type.ReprTransparentPriv1ZstFields.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // public... pub struct ReprTransparentPriv1ZstFields { @@ -92,7 +92,7 @@ pub struct ReprTransparentPriv1ZstFields { marker1: Marker, } // the two private 1-ZST fields don't matter -//@ has 'repr/struct.ReprTransparentPrivFieldPub1ZstField.html' +//@ has 'repr/type.ReprTransparentPrivFieldPub1ZstField.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // private... pub struct ReprTransparentPrivFieldPub1ZstField { @@ -100,7 +100,7 @@ pub struct ReprTransparentPrivFieldPub1ZstField { pub marker: Marker, // this public 1-ZST field doesn't matter } -//@ has 'repr/struct.ReprTransparentPub1ZstField.html' +//@ has 'repr/type.ReprTransparentPub1ZstField.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // public... pub struct ReprTransparentPub1ZstField { @@ -108,26 +108,26 @@ pub struct ReprTransparentPub1ZstField { pub marker1: Marker, // ...and this field is public and visible } -//@ has 'repr/struct.ReprTransparentUnitStruct.html' +//@ has 'repr/type.ReprTransparentUnitStruct.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // public pub struct ReprTransparentUnitStruct; -//@ has 'repr/enum.ReprTransparentEnumUnitVariant.html' +//@ has 'repr/type.ReprTransparentEnumUnitVariant.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // public pub enum ReprTransparentEnumUnitVariant { Variant, } -//@ has 'repr/enum.ReprTransparentEnumHiddenUnitVariant.html' +//@ has 'repr/type.ReprTransparentEnumHiddenUnitVariant.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // private pub enum ReprTransparentEnumHiddenUnitVariant { #[doc(hidden)] Variant(u32), } -//@ has 'repr/enum.ReprTransparentEnumPub1ZstField.html' +//@ has 'repr/type.ReprTransparentEnumPub1ZstField.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // public... pub enum ReprTransparentEnumPub1ZstField { @@ -138,7 +138,7 @@ pub enum ReprTransparentEnumPub1ZstField { }, } -//@ has 'repr/enum.ReprTransparentEnumHidden1ZstField.html' +//@ has 'repr/type.ReprTransparentEnumHidden1ZstField.html' //@ !has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // private... pub enum ReprTransparentEnumHidden1ZstField { @@ -149,7 +149,7 @@ pub enum ReprTransparentEnumHidden1ZstField { } // Regression test for . -//@ has 'repr/struct.RustcPubTransparent.html' +//@ has 'repr/type.RustcPubTransparent.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(transparent)]' #[repr(transparent)] // public... #[rustc_pub_transparent] // ...since this attribute was applied @@ -169,6 +169,6 @@ struct Marker; // 1-ZST extern crate ext_repr as ext; // Regression test for . -//@ has 'repr/enum.ReprI8.html' +//@ has 'repr/type.ReprI8.html' //@ has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(i8)]' pub use ext::ReprI8; diff --git a/tests/rustdoc-html/sidebar/logo-class-default.rs b/tests/rustdoc-html/sidebar/logo-class-default.rs index cabf95569ee4d..032635c9453f5 100644 --- a/tests/rustdoc-html/sidebar/logo-class-default.rs +++ b/tests/rustdoc-html/sidebar/logo-class-default.rs @@ -1,4 +1,4 @@ // Note: this test is paired with logo-class.rs and logo-class-rust.rs. -//@ !has logo_class_default/struct.SomeStruct.html '//*[@class="logo-container"]/img' '' +//@ !has logo_class_default/type.SomeStruct.html '//*[@class="logo-container"]/img' '' //@ !has src/logo_class_default/logo-class-default.rs.html '//*[@class="sub-logo-container"]/img' '' pub struct SomeStruct; diff --git a/tests/rustdoc-html/sidebar/logo-class-rust.rs b/tests/rustdoc-html/sidebar/logo-class-rust.rs index d37438f76194b..65c56cb230027 100644 --- a/tests/rustdoc-html/sidebar/logo-class-rust.rs +++ b/tests/rustdoc-html/sidebar/logo-class-rust.rs @@ -2,5 +2,5 @@ #![allow(internal_features)] #![doc(rust_logo)] // Note: this test is paired with logo-class.rs and logo-class-default.rs. -//@ has logo_class_rust/struct.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' '' +//@ has logo_class_rust/type.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' '' pub struct SomeStruct; diff --git a/tests/rustdoc-html/sidebar/logo-class.rs b/tests/rustdoc-html/sidebar/logo-class.rs index 73d5244fc4164..d4f501fd71d72 100644 --- a/tests/rustdoc-html/sidebar/logo-class.rs +++ b/tests/rustdoc-html/sidebar/logo-class.rs @@ -2,6 +2,6 @@ "https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png")] // Note: this test is paired with logo-class-default.rs and logo-class-rust.rs. -//@ has logo_class/struct.SomeStruct.html '//*[@class="logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' '' -//@ !has logo_class/struct.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' '' +//@ has logo_class/type.SomeStruct.html '//*[@class="logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' '' +//@ !has logo_class/type.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' '' pub struct SomeStruct; diff --git a/tests/rustdoc-html/sidebar/module.rs b/tests/rustdoc-html/sidebar/module.rs index b5bcb9f232c75..a033a1a17516f 100644 --- a/tests/rustdoc-html/sidebar/module.rs +++ b/tests/rustdoc-html/sidebar/module.rs @@ -6,7 +6,7 @@ //@ has 'foo/bar/index.html' //@ has - '//section[@id="rustdoc-toc"]/h3' 'Module Items' pub mod bar { - //@ has 'foo/bar/struct.Baz.html' + //@ has 'foo/bar/type.Baz.html' //@ !has - '//section[@id="rustdoc-toc"]/h3' 'Module Items' pub struct Baz; } diff --git a/tests/rustdoc-html/sidebar/sidebar-items.rs b/tests/rustdoc-html/sidebar/sidebar-items.rs index bd0893dac3e36..8c20dd9bb052d 100644 --- a/tests/rustdoc-html/sidebar/sidebar-items.rs +++ b/tests/rustdoc-html/sidebar/sidebar-items.rs @@ -31,7 +31,7 @@ pub trait DynCompatible { fn access(&self); } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Fields' //@ has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f"]' 'f' //@ has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.u"]' 'u' @@ -42,7 +42,7 @@ pub struct Bar { waza: u32, } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#implementations"]' 'Associated Functions' //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#implementations"]' 'Methods' impl Bar { @@ -50,7 +50,7 @@ impl Bar { pub fn assoc_fn() {} } -//@ has foo/enum.En.html +//@ has foo/type.En.html //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#variants"]' 'Variants' //@ has - '//*[@class="sidebar-elems"]//section//a' 'Foo' //@ has - '//*[@class="sidebar-elems"]//section//a' 'Bar' @@ -59,7 +59,7 @@ pub enum En { Bar, } -//@ has foo/union.MyUnion.html +//@ has foo/type.MyUnion.html //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Fields' //@ has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f1"]' 'f1' //@ has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f2"]' 'f2' diff --git a/tests/rustdoc-html/sidebar/sidebar-link-generation.rs b/tests/rustdoc-html/sidebar/sidebar-link-generation.rs index ee868ec75d34c..e682db54a1492 100644 --- a/tests/rustdoc-html/sidebar/sidebar-link-generation.rs +++ b/tests/rustdoc-html/sidebar/sidebar-link-generation.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.SomeStruct.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.some_fn-1"]' \ +//@ has foo/type.SomeStruct.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.some_fn-1"]' \ // "some_fn" pub struct SomeStruct { _inner: T } diff --git a/tests/rustdoc-html/sidebar/top-toc-idmap.rs b/tests/rustdoc-html/sidebar/top-toc-idmap.rs index 8eaa03a221a70..062b43c92002e 100644 --- a/tests/rustdoc-html/sidebar/top-toc-idmap.rs +++ b/tests/rustdoc-html/sidebar/top-toc-idmap.rs @@ -29,7 +29,7 @@ /// The difference between struct-like headers and module-like headers /// is strange, but not actually a problem as long as we're consistent. -//@ has foo/struct.MyStruct.html +//@ has foo/type.MyStruct.html // User header //@ has - '//section[@id="rustdoc-toc"]/ul[@class="block top-toc"]/li/a[@href="#fields-1"]' 'Fields' //@ has - '//details[@class="toggle top-doc"]/div[@class="docblock"]/h2[@id="fields-1"]' 'Fields' diff --git a/tests/rustdoc-html/sized_trait.rs b/tests/rustdoc-html/sized_trait.rs index 4df62fdc081b6..f0f3982ba1c3f 100644 --- a/tests/rustdoc-html/sized_trait.rs +++ b/tests/rustdoc-html/sized_trait.rs @@ -1,16 +1,16 @@ #![crate_name = "foo"] -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ !has - '//*[@id="impl-Sized"]' '' pub struct Bar { a: u16, } -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ !has - '//*[@id="impl-Sized"]' '' pub struct Foo(T); -//@ has foo/struct.Unsized.html +//@ has foo/type.Unsized.html //@ has - '//*[@id="impl-Sized-for-Unsized"]//h3[@class="code-header"]' 'impl !Sized for Unsized' pub struct Unsized { data: [u8], diff --git a/tests/rustdoc-html/smoke.rs b/tests/rustdoc-html/smoke.rs index 415fca313fc55..ff2d0d19c6ecc 100644 --- a/tests/rustdoc-html/smoke.rs +++ b/tests/rustdoc-html/smoke.rs @@ -17,7 +17,7 @@ pub mod bar { //@ has smoke/bar/trait.Doge.html pub trait Doge { fn dummy(&self) { } } - //@ has smoke/bar/struct.Foo.html + //@ has smoke/bar/type.Foo.html pub struct Foo { x: isize, y: usize } //@ has smoke/bar/fn.prawns.html diff --git a/tests/rustdoc-html/source-code-pages/assoc-type-source-link.rs b/tests/rustdoc-html/source-code-pages/assoc-type-source-link.rs index a955a67a4579e..7c23304fdf019 100644 --- a/tests/rustdoc-html/source-code-pages/assoc-type-source-link.rs +++ b/tests/rustdoc-html/source-code-pages/assoc-type-source-link.rs @@ -4,7 +4,7 @@ #![feature(inherent_associated_types)] #![allow(incomplete_features)] -//@ has 'foo/struct.Bar.html' +//@ has 'foo/type.Bar.html' pub struct Bar; impl Bar { diff --git a/tests/rustdoc-html/source-code-pages/check-source-code-urls-to-def.rs b/tests/rustdoc-html/source-code-pages/check-source-code-urls-to-def.rs index 9036961358787..0fac4cc2c5d9e 100644 --- a/tests/rustdoc-html/source-code-pages/check-source-code-urls-to-def.rs +++ b/tests/rustdoc-html/source-code-pages/check-source-code-urls-to-def.rs @@ -28,12 +28,12 @@ impl Foo { fn babar() {} -//@ has - '//pre[@class="rust"]//a/@href' '/struct.String.html' +//@ has - '//pre[@class="rust"]//a/@href' '/type.String.html' //@ has - '//pre[@class="rust"]//a/@href' '/primitive.u32.html' //@ has - '//pre[@class="rust"]//a/@href' '/primitive.str.html' // The 5 links to line 23 and the line 23 itself. //@ count - '//pre[@class="rust"]//a[@href="#23"]' 6 -//@ has - '//pre[@class="rust"]//a[@href="../../source_code/struct.SourceCode.html"]' \ +//@ has - '//pre[@class="rust"]//a[@href="../../source_code/type.SourceCode.html"]' \ // 'SourceCode' pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::SourceCode) { let x = 12; diff --git a/tests/rustdoc-html/source-code-pages/html-no-source.rs b/tests/rustdoc-html/source-code-pages/html-no-source.rs index 248afbd00eff9..6aba2810b7186 100644 --- a/tests/rustdoc-html/source-code-pages/html-no-source.rs +++ b/tests/rustdoc-html/source-code-pages/html-no-source.rs @@ -16,7 +16,7 @@ #[stable(feature = "bar", since = "1.0")] pub fn foo() {} -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//div[@class="main-heading"]/*[@class="sub-heading"]' '1.0.0' //@ !has - '//div[@class="main-heading"]/*[@class="sub-heading"]' '1.0.0 Β· source' #[stable(feature = "bar", since = "1.0")] diff --git a/tests/rustdoc-html/source-code-pages/source-code-highlight.rs b/tests/rustdoc-html/source-code-pages/source-code-highlight.rs index f1c905e64c075..8719d740f91f8 100644 --- a/tests/rustdoc-html/source-code-pages/source-code-highlight.rs +++ b/tests/rustdoc-html/source-code-pages/source-code-highlight.rs @@ -18,12 +18,12 @@ foo! {} //@ hasraw - 'f' #[rustfmt::skip] pub fn f () {} -//@ hasraw - 'Bar' -//@ hasraw - 'Bar' +//@ hasraw - 'Bar' +//@ hasraw - 'Bar' //@ hasraw - 'u32' #[rustfmt::skip] pub struct Bar ( u32 ); -//@ hasraw - 'Foo' +//@ hasraw - 'Foo' pub enum Foo { A, } diff --git a/tests/rustdoc-html/source-code-pages/source-version-separator.rs b/tests/rustdoc-html/source-code-pages/source-version-separator.rs index 78b9d364d2152..56f7d5bf3e9db 100644 --- a/tests/rustdoc-html/source-code-pages/source-version-separator.rs +++ b/tests/rustdoc-html/source-code-pages/source-version-separator.rs @@ -13,7 +13,7 @@ pub trait Bar { //@ has - '//div[@id="implementors-list"]//*[@class="rightside"]' '4.0.0 Β· Source' -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//div[@class="main-heading"]/*[@class="sub-heading"]' '1.0.0 Β· Source' #[stable(feature = "baz", since = "1.0")] pub struct Foo; diff --git a/tests/rustdoc-html/source-code-pages/src-links-auto-impls.rs b/tests/rustdoc-html/source-code-pages/src-links-auto-impls.rs index 5a777f59b7e50..e57f512d9bc36 100644 --- a/tests/rustdoc-html/source-code-pages/src-links-auto-impls.rs +++ b/tests/rustdoc-html/source-code-pages/src-links-auto-impls.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Unsized.html +//@ has foo/type.Unsized.html //@ has - '//*[@id="impl-Sized-for-Unsized"]/h3[@class="code-header"]' 'impl !Sized for Unsized' //@ !has - '//*[@id="impl-Sized-for-Unsized"]//a[@class="src"]' 'Source' //@ has - '//*[@id="impl-Sync-for-Unsized"]/h3[@class="code-header"]' 'impl Sync for Unsized' diff --git a/tests/rustdoc-html/source-code-pages/src-links-external.rs b/tests/rustdoc-html/source-code-pages/src-links-external.rs index e8acbf1b9b4b0..00baa1b516254 100644 --- a/tests/rustdoc-html/source-code-pages/src-links-external.rs +++ b/tests/rustdoc-html/source-code-pages/src-links-external.rs @@ -10,4 +10,4 @@ extern crate src_links_external; #[doc(inline)] pub use src_links_external as bar; -//@ has foo/bar/struct.Foo.html '//a/@href' '../../src/src_links_external/src-links-external.rs.html#1' +//@ has foo/bar/type.Foo.html '//a/@href' '../../src/src_links_external/src-links-external.rs.html#1' diff --git a/tests/rustdoc-html/source-code-pages/src-links.rs b/tests/rustdoc-html/source-code-pages/src-links.rs index 24039a5d84e2a..914bf9afc0979 100644 --- a/tests/rustdoc-html/source-code-pages/src-links.rs +++ b/tests/rustdoc-html/source-code-pages/src-links.rs @@ -27,7 +27,7 @@ pub mod bar { //@ has foo/bar/trait.Foobar.html '//a/@href' '../../src/foo/src-links.rs.html' pub trait Foobar { fn dummy(&self) { } } - //@ has foo/bar/struct.Foo.html '//a/@href' '../../src/foo/src-links.rs.html' + //@ has foo/bar/type.Foo.html '//a/@href' '../../src/foo/src-links.rs.html' pub struct Foo { x: i32, y: u32 } //@ has foo/bar/fn.prawns.html '//a/@href' '../../src/foo/src-links.rs.html' @@ -46,6 +46,6 @@ pub fn modfn() { } //@ has foo/qux/bar/baz/index.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html' //@ has foo/qux/bar/baz/fn.baz.html '//a/@href' '../../../../src/foo/src-links/mod.rs.html' //@ has foo/qux/bar/trait.Foobar.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' -//@ has foo/qux/bar/struct.Foo.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' +//@ has foo/qux/bar/type.Foo.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' //@ has foo/qux/bar/fn.prawns.html '//a/@href' '../../../src/foo/src-links/mod.rs.html' //@ has foo/qux/fn.modfn.html '//a/@href' '../../src/foo/src-links/mod.rs.html' diff --git a/tests/rustdoc-html/source-code-pages/version-separator-without-source.rs b/tests/rustdoc-html/source-code-pages/version-separator-without-source.rs index 7cd1780f1d30e..89d53a6c6535f 100644 --- a/tests/rustdoc-html/source-code-pages/version-separator-without-source.rs +++ b/tests/rustdoc-html/source-code-pages/version-separator-without-source.rs @@ -9,7 +9,7 @@ #[stable(feature = "bar", since = "1.0")] pub fn foo() {} -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ has - '//div[@class="main-heading"]/*[@class="sub-heading"]' '1.0.0' //@ !has - '//div[@class="main-heading"]/*[@class="sub-heading"]' '1.0.0 Β· source' #[stable(feature = "bar", since = "1.0")] diff --git a/tests/rustdoc-html/stability.rs b/tests/rustdoc-html/stability.rs index 8df66a59d3c15..79ef2ad3729cd 100644 --- a/tests/rustdoc-html/stability.rs +++ b/tests/rustdoc-html/stability.rs @@ -14,10 +14,10 @@ pub struct AaStable; #[unstable(feature = "test", issue = "none")] pub struct Unstable { - //@ has stability/struct.Unstable.html \ + //@ has stability/type.Unstable.html \ // '//span[@class="item-info"]//div[@class="stab unstable"]' \ // 'This is a nightly-only experimental API' - //@ count stability/struct.Unstable.html '//span[@class="stab unstable"]' 0 + //@ count stability/type.Unstable.html '//span[@class="stab unstable"]' 0 pub foo: u32, pub bar: u32, } @@ -27,7 +27,7 @@ pub struct ZzStable; #[unstable(feature = "unstable", issue = "none")] pub mod unstable { - //@ !hasraw stability/unstable/struct.StableInUnstable.html \ + //@ !hasraw stability/unstable/type.StableInUnstable.html \ // '//div[@class="main-heading"]//span[@class="since"]' //@ has - '//div[@class="stab unstable"]' 'experimental' #[stable(feature = "rust1", since = "1.0.0")] @@ -35,21 +35,21 @@ pub mod unstable { #[stable(feature = "rust1", since = "1.0.0")] pub mod stable_in_unstable { - //@ !hasraw stability/unstable/stable_in_unstable/struct.Inner.html \ + //@ !hasraw stability/unstable/stable_in_unstable/type.Inner.html \ // '//div[@class="main-heading"]//span[@class="since"]' //@ has - '//div[@class="stab unstable"]' 'experimental' #[stable(feature = "rust1", since = "1.0.0")] pub struct Inner; } - //@ has stability/struct.AaStable.html \ + //@ has stability/type.AaStable.html \ // '//*[@id="method.foo"]//span[@class="since"]' '2.2.2' impl super::AaStable { #[stable(feature = "rust2", since = "2.2.2")] pub fn foo() {} } - //@ has stability/unstable/struct.StableInUnstable.html \ + //@ has stability/unstable/type.StableInUnstable.html \ // '//*[@id="method.foo"]//span[@class="since"]' '1.0.0' impl StableInUnstable { #[stable(feature = "rust1", since = "1.0.0")] @@ -60,7 +60,7 @@ pub mod unstable { #[unstable(feature = "unstable", issue = "none")] #[doc(hidden)] pub mod unstable_stripped { - //@ has stability/struct.AaStable.html \ + //@ has stability/type.AaStable.html \ // '//*[@id="method.foo"]//span[@class="since"]' '2.2.2' impl super::AaStable { #[stable(feature = "rust2", since = "2.2.2")] @@ -70,14 +70,14 @@ pub mod unstable_stripped { #[stable(feature = "rust2", since = "2.2.2")] pub mod stable_later { - //@ has stability/stable_later/struct.StableInLater.html \ + //@ has stability/stable_later/type.StableInLater.html \ // '//div[@class="main-heading"]//span[@class="since"]' '2.2.2' #[stable(feature = "rust1", since = "1.0.0")] pub struct StableInLater; #[stable(feature = "rust1", since = "1.0.0")] pub mod stable_in_later { - //@ has stability/stable_later/stable_in_later/struct.Inner.html \ + //@ has stability/stable_later/stable_in_later/type.Inner.html \ // '//div[@class="main-heading"]//span[@class="since"]' '2.2.2' #[stable(feature = "rust1", since = "1.0.0")] pub struct Inner; @@ -90,26 +90,26 @@ pub mod stable_later { module = "stable_module", )] pub mod stable_earlier1 { - //@ has stability/stable_earlier1/struct.StableInUnstable.html \ + //@ has stability/stable_earlier1/type.StableInUnstable.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0' //@ has - '//*[@id="method.foo"]//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use crate::unstable::StableInUnstable; - //@ has stability/stable_earlier1/stable_in_unstable/struct.Inner.html \ + //@ has stability/stable_earlier1/stable_in_unstable/type.Inner.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use crate::unstable::stable_in_unstable; - //@ has stability/stable_earlier1/struct.StableInLater.html \ + //@ has stability/stable_earlier1/type.StableInLater.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use crate::stable_later::StableInLater; - //@ has stability/stable_earlier1/stable_in_later/struct.Inner.html \ + //@ has stability/stable_earlier1/stable_in_later/type.Inner.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] @@ -119,26 +119,26 @@ pub mod stable_earlier1 { /// These will inherit the crate stability. #[stable(feature = "rust1", since = "1.0.0")] pub mod stable_earlier2 { - //@ has stability/stable_earlier2/struct.StableInUnstable.html \ + //@ has stability/stable_earlier2/type.StableInUnstable.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.6.0' //@ has - '//*[@id="method.foo"]//span[@class="since"]' '1.0.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use crate::unstable::StableInUnstable; - //@ has stability/stable_earlier2/stable_in_unstable/struct.Inner.html \ + //@ has stability/stable_earlier2/stable_in_unstable/type.Inner.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.6.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use crate::unstable::stable_in_unstable; - //@ has stability/stable_earlier2/struct.StableInLater.html \ + //@ has stability/stable_earlier2/type.StableInLater.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.6.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use crate::stable_later::StableInLater; - //@ has stability/stable_earlier2/stable_in_later/struct.Inner.html \ + //@ has stability/stable_earlier2/stable_in_later/type.Inner.html \ // '//div[@class="main-heading"]//span[@class="since"]' '1.6.0' #[doc(inline)] #[stable(feature = "rust1", since = "1.0.0")] diff --git a/tests/rustdoc-html/staged-api-deprecated-unstable-32374.rs b/tests/rustdoc-html/staged-api-deprecated-unstable-32374.rs index 1021ce86df08f..b4a02ea91790b 100644 --- a/tests/rustdoc-html/staged-api-deprecated-unstable-32374.rs +++ b/tests/rustdoc-html/staged-api-deprecated-unstable-32374.rs @@ -8,23 +8,23 @@ //@ matches issue_32374/index.html '//dt/span[@class="stab unstable"]' 'Experimental' //@ matches issue_32374/index.html '//dd/text()' 'Docs' -//@ has issue_32374/struct.T.html '//*[@class="stab deprecated"]/span' 'πŸ‘Ž' -//@ has issue_32374/struct.T.html '//*[@class="stab deprecated"]/span' \ +//@ has issue_32374/type.T.html '//*[@class="stab deprecated"]/span' 'πŸ‘Ž' +//@ has issue_32374/type.T.html '//*[@class="stab deprecated"]/span' \ // 'Deprecated since 1.0.0: text' //@ hasraw - 'test #32374' -//@ matches issue_32374/struct.T.html '//*[@class="stab unstable"]' 'πŸ”¬' -//@ matches issue_32374/struct.T.html '//*[@class="stab unstable"]' \ +//@ matches issue_32374/type.T.html '//*[@class="stab unstable"]' 'πŸ”¬' +//@ matches issue_32374/type.T.html '//*[@class="stab unstable"]' \ // 'This is a nightly-only experimental API. \(test\s#32374\)$' /// Docs #[deprecated(since = "1.0.0", note = "text")] #[unstable(feature = "test", issue = "32374")] pub struct T; -//@ has issue_32374/struct.U.html '//*[@class="stab deprecated"]' 'πŸ‘Ž' -//@ has issue_32374/struct.U.html '//*[@class="stab deprecated"]' \ +//@ has issue_32374/type.U.html '//*[@class="stab deprecated"]' 'πŸ‘Ž' +//@ has issue_32374/type.U.html '//*[@class="stab deprecated"]' \ // 'Deprecated since 1.0.0: deprecated' -//@ has issue_32374/struct.U.html '//*[@class="stab unstable"]' 'πŸ”¬' -//@ has issue_32374/struct.U.html '//*[@class="stab unstable"]' \ +//@ has issue_32374/type.U.html '//*[@class="stab unstable"]' 'πŸ”¬' +//@ has issue_32374/type.U.html '//*[@class="stab unstable"]' \ // 'This is a nightly-only experimental API. (test #32374)' #[deprecated(since = "1.0.0", note = "deprecated")] #[unstable(feature = "test", issue = "32374", reason = "unstable")] diff --git a/tests/rustdoc-html/static-root-path.rs b/tests/rustdoc-html/static-root-path.rs index 1bca4e40f44c1..7df23f54d7603 100644 --- a/tests/rustdoc-html/static-root-path.rs +++ b/tests/rustdoc-html/static-root-path.rs @@ -1,6 +1,6 @@ //@ compile-flags:-Z unstable-options --static-root-path /cache/ -//@ has static_root_path/struct.SomeStruct.html +//@ has static_root_path/type.SomeStruct.html //@ matchesraw - '"/cache/main-' //@ !matchesraw - '"\.\./main' //@ matchesraw - 'data-root-path="\.\./"' diff --git a/tests/rustdoc-html/struct-field.rs b/tests/rustdoc-html/struct-field.rs index c04fcb344a1d1..93643ca77a949 100644 --- a/tests/rustdoc-html/struct-field.rs +++ b/tests/rustdoc-html/struct-field.rs @@ -1,9 +1,9 @@ #![crate_name = "foo"] -//@ has foo/index.html '//*[@class="docblock"]/p/a[@href="struct.Foo.html#structfield.bar"]' 'Foo::bar' -//@ has foo/index.html '//*[@class="docblock"]/p/a[@href="union.Bar.html#structfield.foo"]' 'Bar::foo' -//@ has foo/index.html '//*[@class="docblock"]/p/a[@href="enum.Uniooon.html#variant.X"]' 'Uniooon::X' +//@ has foo/index.html '//*[@class="docblock"]/p/a[@href="type.Foo.html#structfield.bar"]' 'Foo::bar' +//@ has foo/index.html '//*[@class="docblock"]/p/a[@href="type.Bar.html#structfield.foo"]' 'Bar::foo' +//@ has foo/index.html '//*[@class="docblock"]/p/a[@href="type.Uniooon.html#variant.X"]' 'Uniooon::X' //! Test with [Foo::bar], [Bar::foo], [Uniooon::X] diff --git a/tests/rustdoc-html/structfields.rs b/tests/rustdoc-html/structfields.rs index b7644f3bb599b..ce1d9f0557430 100644 --- a/tests/rustdoc-html/structfields.rs +++ b/tests/rustdoc-html/structfields.rs @@ -1,4 +1,4 @@ -//@ has structfields/struct.Foo.html +//@ has structfields/type.Foo.html pub struct Foo { //@ has - //pre "pub a: ()" pub a: (), @@ -12,14 +12,14 @@ pub struct Foo { pub d: usize, } -//@ has structfields/struct.Bar.html +//@ has structfields/type.Bar.html pub struct Bar { //@ has - //pre "pub a: ()" pub a: (), //@ !has - //pre "/* private fields */" } -//@ has structfields/enum.Qux.html +//@ has structfields/type.Qux.html pub enum Qux { Quz { //@ has - //pre "a: ()" @@ -33,12 +33,12 @@ pub enum Qux { }, } -//@ has structfields/struct.Baz.html //pre "pub struct Baz { /* private fields */ }" +//@ has structfields/type.Baz.html //pre "pub struct Baz { /* private fields */ }" pub struct Baz { x: u8, #[doc(hidden)] pub y: u8, } -//@ has structfields/struct.Quux.html //pre "pub struct Quux {}" +//@ has structfields/type.Quux.html //pre "pub struct Quux {}" pub struct Quux {} diff --git a/tests/rustdoc-html/synthetic_auto/auto-trait-lifetimes-56822.rs b/tests/rustdoc-html/synthetic_auto/auto-trait-lifetimes-56822.rs index 4ed1b6c5913b8..83e3580a5f387 100644 --- a/tests/rustdoc-html/synthetic_auto/auto-trait-lifetimes-56822.rs +++ b/tests/rustdoc-html/synthetic_auto/auto-trait-lifetimes-56822.rs @@ -19,7 +19,7 @@ impl<'a, T> MyTrait for Inner<'a, T> { type Output = &'a T; } -//@ has foo/struct.Parser.html +//@ has foo/type.Parser.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<'a> Send for Parser<'a>" pub struct Parser<'a> { diff --git a/tests/rustdoc-html/synthetic_auto/basic.rs b/tests/rustdoc-html/synthetic_auto/basic.rs index e8c2f5da9fe63..08f1cb3848851 100644 --- a/tests/rustdoc-html/synthetic_auto/basic.rs +++ b/tests/rustdoc-html/synthetic_auto/basic.rs @@ -1,4 +1,4 @@ -//@ has basic/struct.Foo.html +//@ has basic/type.Foo.html //@ has - '//h3[@class="code-header"]' 'impl Send for Foowhere T: Send' //@ has - '//h3[@class="code-header"]' 'impl Sync for Foowhere T: Sync' //@ count - '//*[@id="implementations-list"]//*[@class="impl"]' 0 diff --git a/tests/rustdoc-html/synthetic_auto/bounds.rs b/tests/rustdoc-html/synthetic_auto/bounds.rs index e93639acd0786..7eeaf8da07c7d 100644 --- a/tests/rustdoc-html/synthetic_auto/bounds.rs +++ b/tests/rustdoc-html/synthetic_auto/bounds.rs @@ -1,7 +1,7 @@ pub struct Outer(Inner); pub struct Inner(T); -//@ has bounds/struct.Outer.html +//@ has bounds/type.Outer.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Unpin for Outerwhere \ // T: for<'any> Trait = (), X = ()>," diff --git a/tests/rustdoc-html/synthetic_auto/complex.rs b/tests/rustdoc-html/synthetic_auto/complex.rs index 51303658890b9..579e1d335277c 100644 --- a/tests/rustdoc-html/synthetic_auto/complex.rs +++ b/tests/rustdoc-html/synthetic_auto/complex.rs @@ -19,7 +19,7 @@ mod foo { } } -//@ has complex/struct.NotOuter.html +//@ has complex/type.NotOuter.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<'a, T, K> Send for Outer<'a, T, K>where 'a: 'static, T: MyTrait<'a>, \ // K: for<'b> Fn((&'b bool, &'a u8)) -> &'b i8 + ?Sized, >::MyItem: Copy," diff --git a/tests/rustdoc-html/synthetic_auto/crate-local.rs b/tests/rustdoc-html/synthetic_auto/crate-local.rs index b3bd67f839cab..63d0325383bc1 100644 --- a/tests/rustdoc-html/synthetic_auto/crate-local.rs +++ b/tests/rustdoc-html/synthetic_auto/crate-local.rs @@ -2,7 +2,7 @@ pub auto trait Banana {} -//@ has crate_local/struct.Peach.html +//@ has crate_local/type.Peach.html //@ has - '//h3[@class="code-header"]' 'impl Banana for Peach' //@ has - '//h3[@class="code-header"]' 'impl Send for Peach' //@ has - '//h3[@class="code-header"]' 'impl Sync for Peach' diff --git a/tests/rustdoc-html/synthetic_auto/lifetimes.rs b/tests/rustdoc-html/synthetic_auto/lifetimes.rs index c47bd8f065cb7..74ed5fdb60d6f 100644 --- a/tests/rustdoc-html/synthetic_auto/lifetimes.rs +++ b/tests/rustdoc-html/synthetic_auto/lifetimes.rs @@ -8,7 +8,7 @@ where T: for<'b> Fn(&'b bool) -> &'a u8, {} -//@ has lifetimes/struct.Foo.html +//@ has lifetimes/type.Foo.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<'c, K> Send for Foo<'c, K>where 'c: 'static, K: for<'b> Fn(&'b bool) -> &'c u8," // diff --git a/tests/rustdoc-html/synthetic_auto/manual.rs b/tests/rustdoc-html/synthetic_auto/manual.rs index 830bfccca09e9..9bce9052cb933 100644 --- a/tests/rustdoc-html/synthetic_auto/manual.rs +++ b/tests/rustdoc-html/synthetic_auto/manual.rs @@ -1,4 +1,4 @@ -//@ has manual/struct.Foo.html +//@ has manual/type.Foo.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // 'impl Sync for Foowhere T: Sync' // diff --git a/tests/rustdoc-html/synthetic_auto/negative.rs b/tests/rustdoc-html/synthetic_auto/negative.rs index a2fe6187e8e14..f4b339a68e8a0 100644 --- a/tests/rustdoc-html/synthetic_auto/negative.rs +++ b/tests/rustdoc-html/synthetic_auto/negative.rs @@ -2,7 +2,7 @@ pub struct Inner { field: *mut T, } -//@ has negative/struct.Outer.html +//@ has negative/type.Outer.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl !Send for Outer" // diff --git a/tests/rustdoc-html/synthetic_auto/nested.rs b/tests/rustdoc-html/synthetic_auto/nested.rs index edd7ca6469855..01a14227ea97a 100644 --- a/tests/rustdoc-html/synthetic_auto/nested.rs +++ b/tests/rustdoc-html/synthetic_auto/nested.rs @@ -8,7 +8,7 @@ where { } -//@ has nested/struct.Foo.html +//@ has nested/type.Foo.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // 'impl Send for Foowhere T: Copy' // diff --git a/tests/rustdoc-html/synthetic_auto/next-solver-ambiguity.rs b/tests/rustdoc-html/synthetic_auto/next-solver-ambiguity.rs index b48be49b29761..fb38099c59083 100644 --- a/tests/rustdoc-html/synthetic_auto/next-solver-ambiguity.rs +++ b/tests/rustdoc-html/synthetic_auto/next-solver-ambiguity.rs @@ -2,6 +2,6 @@ //@ edition: 2021 #![crate_name = "foo"] -//@ has 'foo/struct.Foo.html' +//@ has 'foo/type.Foo.html' //@ has - '//h3[@class="code-header"]' "impl<'a, 'b, T> Send for Foo<'a, 'b, T>where &'a T: Send, &'b T: Send" pub struct Foo<'a, 'b, T: 'a + 'b>(&'a T, &'b T); diff --git a/tests/rustdoc-html/synthetic_auto/next-solver-possible-impl.rs b/tests/rustdoc-html/synthetic_auto/next-solver-possible-impl.rs index 145174a1961a5..d096a2908c477 100644 --- a/tests/rustdoc-html/synthetic_auto/next-solver-possible-impl.rs +++ b/tests/rustdoc-html/synthetic_auto/next-solver-possible-impl.rs @@ -5,7 +5,7 @@ pub auto trait Marker {} -//@ has 'foo/struct.MyType.html' +//@ has 'foo/type.MyType.html' //@ !has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]' 'Marker for MyType' pub struct MyType(T); diff --git a/tests/rustdoc-html/synthetic_auto/no-redundancy.rs b/tests/rustdoc-html/synthetic_auto/no-redundancy.rs index 7260107d8617b..3e7c97a54045d 100644 --- a/tests/rustdoc-html/synthetic_auto/no-redundancy.rs +++ b/tests/rustdoc-html/synthetic_auto/no-redundancy.rs @@ -8,7 +8,7 @@ where { } -//@ has no_redundancy/struct.Outer.html +//@ has no_redundancy/type.Outer.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Send for Outerwhere T: Copy + Send" pub struct Outer { diff --git a/tests/rustdoc-html/synthetic_auto/normalize-auto-trait-80233.rs b/tests/rustdoc-html/synthetic_auto/normalize-auto-trait-80233.rs index 2552bca87d22b..127f6a44c2e6e 100644 --- a/tests/rustdoc-html/synthetic_auto/normalize-auto-trait-80233.rs +++ b/tests/rustdoc-html/synthetic_auto/normalize-auto-trait-80233.rs @@ -32,7 +32,7 @@ impl Trait3 for Vec { pub struct Struct1 {} -//@ has foo/struct.Question.html +//@ has foo/type.Question.html //@ has - '//h3[@class="code-header"]' 'impl Send for Question' pub struct Question { pub ins: < as Trait3>::Type3 as Trait2>::Type2, diff --git a/tests/rustdoc-html/synthetic_auto/overflow.rs b/tests/rustdoc-html/synthetic_auto/overflow.rs index 634217cfcddce..0173ce4a985d0 100644 --- a/tests/rustdoc-html/synthetic_auto/overflow.rs +++ b/tests/rustdoc-html/synthetic_auto/overflow.rs @@ -20,7 +20,7 @@ enum TyData { struct VariableKind(I::InternedType); -//@ has overflow/struct.BoundVarsCollector.html +//@ has overflow/type.BoundVarsCollector.html //@ has - '//h3[@class="code-header"]' "impl<'tcx> Send for BoundVarsCollector<'tcx>" pub struct BoundVarsCollector<'tcx> { val: VariableKind> diff --git a/tests/rustdoc-html/synthetic_auto/project.rs b/tests/rustdoc-html/synthetic_auto/project.rs index 10046bff91387..c342791a7d49c 100644 --- a/tests/rustdoc-html/synthetic_auto/project.rs +++ b/tests/rustdoc-html/synthetic_auto/project.rs @@ -22,7 +22,7 @@ where { } -//@ has project/struct.Foo.html +//@ has project/type.Foo.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<'c, K> Send for Foo<'c, K>where 'c: 'static, K: MyTrait," // diff --git a/tests/rustdoc-html/synthetic_auto/self-referential.rs b/tests/rustdoc-html/synthetic_auto/self-referential.rs index f6c7daeec8d4d..3a283e6543090 100644 --- a/tests/rustdoc-html/synthetic_auto/self-referential.rs +++ b/tests/rustdoc-html/synthetic_auto/self-referential.rs @@ -22,7 +22,7 @@ impl Pattern for Wrapper { } -//@ has self_referential/struct.WriteAndThen.html +//@ has self_referential/type.WriteAndThen.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Send for WriteAndThenwhere ::Value: Send" pub struct WriteAndThen(pub P1::Value,pub > as Pattern>::Value) diff --git a/tests/rustdoc-html/synthetic_auto/send-impl-conditional-60726.rs b/tests/rustdoc-html/synthetic_auto/send-impl-conditional-60726.rs index 9937628cabe86..f659ba4337ac8 100644 --- a/tests/rustdoc-html/synthetic_auto/send-impl-conditional-60726.rs +++ b/tests/rustdoc-html/synthetic_auto/send-impl-conditional-60726.rs @@ -28,7 +28,7 @@ where I:InterfaceType {} -//@ has foo/struct.IntoIter.html +//@ has foo/type.IntoIter.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl !Send for IntoIter" //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ diff --git a/tests/rustdoc-html/synthetic_auto/static-region.rs b/tests/rustdoc-html/synthetic_auto/static-region.rs index 0b7d048765bea..79c7229ce9f44 100644 --- a/tests/rustdoc-html/synthetic_auto/static-region.rs +++ b/tests/rustdoc-html/synthetic_auto/static-region.rs @@ -2,7 +2,7 @@ pub trait OwnedTrait<'a> { type Reader; } -//@ has static_region/struct.Owned.html +//@ has static_region/type.Owned.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Send for Ownedwhere >::Reader: Send" pub struct Owned where T: OwnedTrait<'static> { diff --git a/tests/rustdoc-html/synthetic_auto/supertrait-bounds.rs b/tests/rustdoc-html/synthetic_auto/supertrait-bounds.rs index d96d16786e8b4..e8b2195e1b334 100644 --- a/tests/rustdoc-html/synthetic_auto/supertrait-bounds.rs +++ b/tests/rustdoc-html/synthetic_auto/supertrait-bounds.rs @@ -7,7 +7,7 @@ pub struct Type(T); -//@ has supertrait_bounds/struct.Type.html +//@ has supertrait_bounds/type.Type.html //@ has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Send for Typewhere T: Send," diff --git a/tests/rustdoc-html/tab_title.rs b/tests/rustdoc-html/tab_title.rs index 4056da412d4ae..87118b7c00740 100644 --- a/tests/rustdoc-html/tab_title.rs +++ b/tests/rustdoc-html/tab_title.rs @@ -10,7 +10,7 @@ /// blah pub fn widget_count() {} -//@ has foo/struct.Widget.html '//head/title' 'Widget in foo - Rust' +//@ has foo/type.Widget.html '//head/title' 'Widget in foo - Rust' pub struct Widget; //@ has foo/constant.ANSWER.html '//head/title' 'ANSWER in foo - Rust' @@ -18,7 +18,7 @@ pub const ANSWER: u8 = 42; //@ has foo/blah/index.html '//head/title' 'foo::blah - Rust' pub mod blah { - //@ has foo/blah/struct.Widget.html '//head/title' 'Widget in foo::blah - Rust' + //@ has foo/blah/type.Widget.html '//head/title' 'Widget in foo::blah - Rust' pub struct Widget; //@ has foo/blah/trait.Awesome.html '//head/title' 'Awesome in foo::blah - Rust' diff --git a/tests/rustdoc-html/table-in-docblock.rs b/tests/rustdoc-html/table-in-docblock.rs index af376438ce678..e6da18a6a0480 100644 --- a/tests/rustdoc-html/table-in-docblock.rs +++ b/tests/rustdoc-html/table-in-docblock.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ count - '//*[@class="docblock"]/div/table' 2 //@ !has - '//*[@class="docblock"]/table' '' /// | hello | hello2 | diff --git a/tests/rustdoc-html/titles.rs b/tests/rustdoc-html/titles.rs index 23915b05c2709..bfd7ff0b6716a 100644 --- a/tests/rustdoc-html/titles.rs +++ b/tests/rustdoc-html/titles.rs @@ -27,12 +27,12 @@ pub fn foo_fn() {} //@ matches - '//h2[@class="location"]' 'FooTrait' pub trait FooTrait {} -//@ matches 'foo/struct.FooStruct.html' '//h1' 'Struct FooStruct' +//@ matches 'foo/type.FooStruct.html' '//h1' 'Struct FooStruct' //@ matches - '//*[@class="rustdoc-breadcrumbs"]' 'foo' //@ matches - '//h2[@class="location"]' 'FooStruct' pub struct FooStruct; -//@ matches 'foo/enum.FooEnum.html' '//h1' 'Enum FooEnum' +//@ matches 'foo/type.FooEnum.html' '//h1' 'Enum FooEnum' //@ matches - '//*[@class="rustdoc-breadcrumbs"]' 'foo' //@ matches - '//h2[@class="location"]' 'FooEnum' pub enum FooEnum {} diff --git a/tests/rustdoc-html/toggle-item-contents.rs b/tests/rustdoc-html/toggle-item-contents.rs index 1cc1da5910560..858f1b3daed4e 100644 --- a/tests/rustdoc-html/toggle-item-contents.rs +++ b/tests/rustdoc-html/toggle-item-contents.rs @@ -1,13 +1,13 @@ #![allow(unused)] -//@ has 'toggle_item_contents/struct.PubStruct.html' +//@ has 'toggle_item_contents/type.PubStruct.html' //@ count - '//details[@class="toggle type-contents-toggle"]' 0 pub struct PubStruct { pub a: usize, pub b: usize, } -//@ has 'toggle_item_contents/struct.BigPubStruct.html' +//@ has 'toggle_item_contents/type.BigPubStruct.html' //@ count - '//details[@class="toggle type-contents-toggle"]' 1 //@ has - '//details[@class="toggle type-contents-toggle"]' 'Show 13 fields' pub struct BigPubStruct { @@ -26,7 +26,7 @@ pub struct BigPubStruct { pub m: usize, } -//@ has 'toggle_item_contents/union.BigUnion.html' +//@ has 'toggle_item_contents/type.BigUnion.html' //@ count - '//details[@class="toggle type-contents-toggle"]' 1 //@ has - '//details[@class="toggle type-contents-toggle"]' 'Show 13 fields' pub union BigUnion { @@ -45,7 +45,7 @@ pub union BigUnion { pub m: usize, } -//@ has 'toggle_item_contents/union.Union.html' +//@ has 'toggle_item_contents/type.Union.html' //@ count - '//details[@class="toggle type-contents-toggle"]' 0 pub union Union { pub a: usize, @@ -53,7 +53,7 @@ pub union Union { pub c: usize, } -//@ has 'toggle_item_contents/struct.PrivStruct.html' +//@ has 'toggle_item_contents/type.PrivStruct.html' //@ count - '//details[@class="toggle type-contents-toggle"]' 0 //@ has - '//pre[@class="rust item-decl"]' '/* private fields */' pub struct PrivStruct { @@ -61,7 +61,7 @@ pub struct PrivStruct { b: usize, } -//@ has 'toggle_item_contents/enum.Enum.html' +//@ has 'toggle_item_contents/type.Enum.html' //@ !has - '//details[@class="toggle type-contents-toggle"]' '' pub enum Enum { A, B, C, @@ -71,7 +71,7 @@ pub enum Enum { } } -//@ has 'toggle_item_contents/enum.EnumStructVariant.html' +//@ has 'toggle_item_contents/type.EnumStructVariant.html' //@ !has - '//details[@class="toggle type-contents-toggle"]' '' pub enum EnumStructVariant { A, B, C, @@ -80,7 +80,7 @@ pub enum EnumStructVariant { } } -//@ has 'toggle_item_contents/enum.LargeEnum.html' +//@ has 'toggle_item_contents/type.LargeEnum.html' //@ count - '//pre[@class="rust item-decl"]//details[@class="toggle type-contents-toggle"]' 1 //@ has - '//pre[@class="rust item-decl"]//details[@class="toggle type-contents-toggle"]' 'Show 13 variants' pub enum LargeEnum { diff --git a/tests/rustdoc-html/toggle-method.rs b/tests/rustdoc-html/toggle-method.rs index 21057dfeb6545..8483f51ec3a9f 100644 --- a/tests/rustdoc-html/toggle-method.rs +++ b/tests/rustdoc-html/toggle-method.rs @@ -3,7 +3,7 @@ // Struct methods with documentation should be wrapped in a
toggle with an appropriate // summary. Struct methods with no documentation should not be wrapped. // -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//details[@class="toggle method-toggle"]//summary//h4[@class="code-header"]' 'is_documented()' //@ has - '//details[@class="toggle method-toggle"]//*[@class="docblock"]' 'is_documented is documented' //@ !has - '//details[@class="toggle method-toggle"]//summary//h4[@class="code-header"]' 'not_documented()' diff --git a/tests/rustdoc-html/trait-read-more-161300.rs b/tests/rustdoc-html/trait-read-more-161300.rs index 47aac5a2770a4..a5ddf1c7e2df7 100644 --- a/tests/rustdoc-html/trait-read-more-161300.rs +++ b/tests/rustdoc-html/trait-read-more-161300.rs @@ -2,7 +2,7 @@ // ensures the "read more" link exists in various circumstances. #![crate_name = "foo"] -//@ has 'foo/struct.MyStruct.html' +//@ has 'foo/type.MyStruct.html' pub trait MyTrait { /// First /// diff --git a/tests/rustdoc-html/trait-src-link.rs b/tests/rustdoc-html/trait-src-link.rs index 7bf883d52da1e..7817a3a15b67a 100644 --- a/tests/rustdoc-html/trait-src-link.rs +++ b/tests/rustdoc-html/trait-src-link.rs @@ -10,17 +10,17 @@ pub trait Foo { pub struct Bar; impl Foo for Bar { - //@ has quix/struct.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#14"]' 'Source' + //@ has quix/type.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#14"]' 'Source' fn required() {} - //@ has quix/struct.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#7"]' 'Source' + //@ has quix/type.Bar.html '//a[@href="../src/quix/trait-src-link.rs.html#7"]' 'Source' } pub struct Baz; impl Foo for Baz { - //@ has quix/struct.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#22"]' 'Source' + //@ has quix/type.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#22"]' 'Source' fn required() {} - //@ has quix/struct.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#25"]' 'Source' + //@ has quix/type.Baz.html '//a[@href="../src/quix/trait-src-link.rs.html#25"]' 'Source' fn provided() {} } diff --git a/tests/rustdoc-html/traits-in-bodies.rs b/tests/rustdoc-html/traits-in-bodies.rs index a6f6158afa4a6..4bd8f5a207507 100644 --- a/tests/rustdoc-html/traits-in-bodies.rs +++ b/tests/rustdoc-html/traits-in-bodies.rs @@ -3,7 +3,7 @@ pub struct Bounded(T); -//@ has traits_in_bodies/struct.SomeStruct.html +//@ has traits_in_bodies/type.SomeStruct.html //@ has - '//h3[@class="code-header"]' 'impl Clone for SomeStruct' pub struct SomeStruct; @@ -17,7 +17,7 @@ fn asdf() -> Bounded { Bounded(SomeStruct) } -//@ has traits_in_bodies/struct.Point.html +//@ has traits_in_bodies/type.Point.html //@ has - '//h3[@class="code-header"]' 'impl Copy for Point' #[derive(Clone)] pub struct Point { @@ -30,7 +30,7 @@ const _FOO: () = { () }; -//@ has traits_in_bodies/struct.Inception.html +//@ has traits_in_bodies/type.Inception.html //@ has - '//h3[@class="code-header"]' 'impl Clone for Inception' pub struct Inception; diff --git a/tests/rustdoc-html/tuple-struct-fields-doc.rs b/tests/rustdoc-html/tuple-struct-fields-doc.rs index 55ee6662139a7..c18494f764d99 100644 --- a/tests/rustdoc-html/tuple-struct-fields-doc.rs +++ b/tests/rustdoc-html/tuple-struct-fields-doc.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has foo/struct.Foo.html +//@ has foo/type.Foo.html //@ has - '//h2[@id="fields"]' 'Tuple Fields' //@ has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Tuple Fields' //@ has - '//*[@id="structfield.0"]' '0: u32' @@ -18,7 +18,7 @@ pub struct Foo( pub i8, ); -//@ has foo/enum.Bar.html +//@ has foo/type.Bar.html //@ has - '//pre[@class="rust item-decl"]' 'BarVariant(String),' //@ matches - '//*[@id="variant.BarVariant.fields"]/h4' '^Tuple Fields$' //@ has - '//*[@id="variant.BarVariant.field.0"]' '0: String' diff --git a/tests/rustdoc-html/tuple-struct-where-clause-34928.rs b/tests/rustdoc-html/tuple-struct-where-clause-34928.rs index 804663a86f40b..46a22997b9aad 100644 --- a/tests/rustdoc-html/tuple-struct-where-clause-34928.rs +++ b/tests/rustdoc-html/tuple-struct-where-clause-34928.rs @@ -4,5 +4,5 @@ pub trait Bar {} -//@ has foo/struct.Foo.html '//pre' 'pub struct Foo(pub T) where T: Bar;' +//@ has foo/type.Foo.html '//pre' 'pub struct Foo(pub T) where T: Bar;' pub struct Foo(pub T) where T: Bar; diff --git a/tests/rustdoc-html/type-layout-flag-required.rs b/tests/rustdoc-html/type-layout-flag-required.rs index 699be973e9015..89c6d642206ed 100644 --- a/tests/rustdoc-html/type-layout-flag-required.rs +++ b/tests/rustdoc-html/type-layout-flag-required.rs @@ -1,4 +1,4 @@ // Tests that `--show-type-layout` is required in order to show layout info. -//@ !hasraw type_layout_flag_required/struct.Foo.html 'Size: ' +//@ !hasraw type_layout_flag_required/type.Foo.html 'Size: ' pub struct Foo(usize); diff --git a/tests/rustdoc-html/type-layout.rs b/tests/rustdoc-html/type-layout.rs index 84d2aa8060079..6429d83dacb6f 100644 --- a/tests/rustdoc-html/type-layout.rs +++ b/tests/rustdoc-html/type-layout.rs @@ -1,6 +1,6 @@ //@ compile-flags: --show-type-layout -Z unstable-options -//@ hasraw type_layout/struct.Foo.html 'Size: ' +//@ hasraw type_layout/type.Foo.html 'Size: ' //@ hasraw - ' bytes' //@ has - '//*[@id="layout"]/a[@href="#layout"]' '' pub struct Foo { @@ -8,14 +8,14 @@ pub struct Foo { b: Vec, } -//@ hasraw type_layout/enum.Bar.html 'Size: ' +//@ hasraw type_layout/type.Bar.html 'Size: ' //@ hasraw - ' bytes' pub enum Bar<'a> { A(String), B(&'a str, (std::collections::HashMap, Foo)), } -//@ hasraw type_layout/union.Baz.html 'Size: ' +//@ hasraw type_layout/type.Baz.html 'Size: ' //@ hasraw - ' bytes' pub union Baz { a: &'static str, @@ -23,32 +23,32 @@ pub union Baz { c: &'static [u8], } -//@ hasraw type_layout/struct.X.html 'Size: ' +//@ hasraw type_layout/type.X.html 'Size: ' //@ hasraw - ' bytes' pub struct X(usize); -//@ hasraw type_layout/struct.Y.html 'Size: ' +//@ hasraw type_layout/type.Y.html 'Size: ' //@ hasraw - '1 byte' //@ !hasraw - ' bytes' pub struct Y(u8); -//@ hasraw type_layout/struct.Z.html 'Size: ' +//@ hasraw type_layout/type.Z.html 'Size: ' //@ hasraw - '0 bytes' pub struct Z; // We can't compute layout for generic types. -//@ hasraw type_layout/struct.Generic.html 'Unable to compute type layout, possibly due to this type having generic parameters.' -//@ hasraw type_layout/struct.Generic.html 'Layout can only be computed for concrete, fully-instantiated types.' +//@ hasraw type_layout/type.Generic.html 'Unable to compute type layout, possibly due to this type having generic parameters.' +//@ hasraw type_layout/type.Generic.html 'Layout can only be computed for concrete, fully-instantiated types.' //@ !hasraw - 'Size: ' pub struct Generic(T); // We *can*, however, compute layout for types that are only generic over lifetimes, -// because lifetimes are a type-system construct. -//@ hasraw type_layout/struct.GenericLifetimes.html 'Size: ' +// because lifetimes are a type-system contype. +//@ hasraw type_layout/type.GenericLifetimes.html 'Size: ' //@ hasraw - ' bytes' pub struct GenericLifetimes<'a>(&'a str); -//@ hasraw type_layout/struct.Unsized.html 'Size: ' +//@ hasraw type_layout/type.Unsized.html 'Size: ' //@ hasraw - '(unsized)' pub struct Unsized([u8]); @@ -66,14 +66,14 @@ pub type Edges<'a, E> = std::borrow::Cow<'a, [E]>; pub trait Project { type Assoc; } // We can't compute layout as the alias stays rigid. A `LayoutError::TooGeneric` is returned. -//@ hasraw type_layout/struct.RigidAlias.html 'Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.' +//@ hasraw type_layout/type.RigidAlias.html 'Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.' //@ !hasraw - 'Size: ' pub struct RigidAlias(<() as Project>::Assoc) where for<'a> (): Project; //@ !hasraw type_layout/trait.MyTrait.html 'Size: ' pub trait MyTrait {} -//@ hasraw type_layout/enum.Variants.html 'Size: ' +//@ hasraw type_layout/type.Variants.html 'Size: ' //@ hasraw - '2 bytes' //@ hasraw - 'A: 0 bytes' //@ hasraw - 'B: 1 byte' @@ -82,7 +82,7 @@ pub enum Variants { B(u8), } -//@ hasraw type_layout/enum.WithNiche.html 'Size: ' +//@ hasraw type_layout/type.WithNiche.html 'Size: ' //@ has - //p '4 bytes' //@ hasraw - 'None: 0 bytes' //@ hasraw - 'Some: 4 bytes' @@ -91,10 +91,10 @@ pub enum WithNiche { Some(std::num::NonZero), } -//@ hasraw type_layout/enum.Uninhabited.html 'Size: ' +//@ hasraw type_layout/type.Uninhabited.html 'Size: ' //@ hasraw - '0 bytes (uninhabited)' pub enum Uninhabited {} -//@ hasraw type_layout/struct.Uninhabited2.html 'Size: ' +//@ hasraw type_layout/type.Uninhabited2.html 'Size: ' //@ hasraw - '8 bytes (uninhabited)' pub struct Uninhabited2(std::convert::Infallible, u64); diff --git a/tests/rustdoc-html/typedef/impl_trait_in_assoc_type.rs b/tests/rustdoc-html/typedef/impl_trait_in_assoc_type.rs index 2846710cbed7c..4c86b569fa8ea 100644 --- a/tests/rustdoc-html/typedef/impl_trait_in_assoc_type.rs +++ b/tests/rustdoc-html/typedef/impl_trait_in_assoc_type.rs @@ -2,7 +2,7 @@ pub struct AlwaysTrue; -//@ has impl_trait_in_assoc_type/struct.AlwaysTrue.html +//@ has impl_trait_in_assoc_type/type.AlwaysTrue.html impl IntoIterator for AlwaysTrue { type Item = bool; diff --git a/tests/rustdoc-html/typedef/primitive-local-link-121106.rs b/tests/rustdoc-html/typedef/primitive-local-link-121106.rs index d4877e49a4125..d62b5ea1758fd 100644 --- a/tests/rustdoc-html/typedef/primitive-local-link-121106.rs +++ b/tests/rustdoc-html/typedef/primitive-local-link-121106.rs @@ -7,7 +7,7 @@ #[rustc_doc_primitive = "i32"] const _: () = (); -//@ has foo/struct.Node.html '//a/@href' 'primitive.i32.html' +//@ has foo/type.Node.html '//a/@href' 'primitive.i32.html' pub struct Node; impl Node { diff --git a/tests/rustdoc-html/typedef/typedef-inner-variants-lazy_type_alias.rs b/tests/rustdoc-html/typedef/typedef-inner-variants-lazy_type_alias.rs index 70023c7cf81f4..8b90ba9c947b9 100644 --- a/tests/rustdoc-html/typedef/typedef-inner-variants-lazy_type_alias.rs +++ b/tests/rustdoc-html/typedef/typedef-inner-variants-lazy_type_alias.rs @@ -3,7 +3,7 @@ #![feature(checked_type_aliases)] #![allow(incomplete_features)] -//@ has 'inner_types_lazy/struct.Pair.html' +//@ has 'inner_types_lazy/type.Pair.html' pub struct Pair { pub first: A, pub second: B, diff --git a/tests/rustdoc-html/typedef/typedef-inner-variants.rs b/tests/rustdoc-html/typedef/typedef-inner-variants.rs index 02f83c40b1b08..f0527915c885e 100644 --- a/tests/rustdoc-html/typedef/typedef-inner-variants.rs +++ b/tests/rustdoc-html/typedef/typedef-inner-variants.rs @@ -25,7 +25,7 @@ impl Interner for TyCtxt { //@ count - '//*[@id="fields"]' 0 pub type AliasTy = Ty; -//@ has 'inner_variants/enum.IrTyKind.html' +//@ has 'inner_variants/type.IrTyKind.html' pub enum IrTyKind { /// Doc comment for AdtKind AdtKind(I::Adt), @@ -55,7 +55,7 @@ pub type NearlyTyKind = IrTyKind; //@ has - '//pre[@class="rust item-decl"]//code/a[4]' "i64" pub type TyKind = IrTyKind; -//@ has 'inner_variants/union.OneOr.html' +//@ has 'inner_variants/type.OneOr.html' pub union OneOr { pub one: i64, pub or: A, @@ -69,7 +69,7 @@ pub union OneOr { //@ matches - '//pre[@class="rust item-decl"]//code' "union OneOrF64" pub type OneOrF64 = OneOr; -//@ has 'inner_variants/struct.One.html' +//@ has 'inner_variants/type.One.html' pub struct One { pub val: T, #[doc(hidden)] @@ -86,7 +86,7 @@ pub struct One { //@ matches - '//pre[@class="rust item-decl"]//code' "pub val" pub type OneU64 = One; -//@ has 'inner_variants/struct.OnceA.html' +//@ has 'inner_variants/type.OnceA.html' pub struct OnceA<'a, A> { pub a: &'a A, } @@ -99,7 +99,7 @@ pub struct OnceA<'a, A> { //@ matches - '//pre[@class="rust item-decl"]//code' "&'a" pub type Once<'a> = OnceA<'a, i64>; -//@ has 'inner_variants/struct.HighlyGenericStruct.html' +//@ has 'inner_variants/type.HighlyGenericStruct.html' pub struct HighlyGenericStruct { pub z: (A, B, C, D) } diff --git a/tests/rustdoc-html/unicode.rs b/tests/rustdoc-html/unicode.rs index a961f178ec3b1..2360b0ec44c5f 100644 --- a/tests/rustdoc-html/unicode.rs +++ b/tests/rustdoc-html/unicode.rs @@ -3,8 +3,8 @@ pub struct Foo; impl Foo { - //@ has unicode/struct.Foo.html //a/@href "#%C3%BA" - //@ !has unicode/struct.Foo.html //a/@href "#ΓΊ" + //@ has unicode/type.Foo.html //a/@href "#%C3%BA" + //@ !has unicode/type.Foo.html //a/@href "#ΓΊ" /// # ΓΊ pub fn foo() {} } diff --git a/tests/rustdoc-html/union/union-fields-html.rs b/tests/rustdoc-html/union/union-fields-html.rs index 8550980b89617..4661173005cf6 100644 --- a/tests/rustdoc-html/union/union-fields-html.rs +++ b/tests/rustdoc-html/union/union-fields-html.rs @@ -1,6 +1,6 @@ #![crate_name = "foo"] -//@ has 'foo/union.Union.html' +//@ has 'foo/type.Union.html' // Checking that there is a whitespace after `:`. //@ has - '//*[@id="structfield.a"]/code' 'a: u8' //@ has - '//*[@id="structfield.b"]/code' 'b: u32' diff --git a/tests/rustdoc-html/union/union.rs b/tests/rustdoc-html/union/union.rs index a3c046ec7c13d..372bdb1a75b7f 100644 --- a/tests/rustdoc-html/union/union.rs +++ b/tests/rustdoc-html/union/union.rs @@ -1,4 +1,4 @@ -//@ has union/union.U.html +//@ has union/type.U.html pub union U { //@ has - //pre "pub a: u8" pub a: u8, diff --git a/tests/rustdoc-html/useless_lifetime_bound.rs b/tests/rustdoc-html/useless_lifetime_bound.rs index 68d55eec10c8c..dd05716a757a1 100644 --- a/tests/rustdoc-html/useless_lifetime_bound.rs +++ b/tests/rustdoc-html/useless_lifetime_bound.rs @@ -1,12 +1,12 @@ use std::marker::PhantomData; -//@ has useless_lifetime_bound/struct.Scope.html +//@ has useless_lifetime_bound/type.Scope.html //@ !has - '//*[@class="rust struct"]' "'env: 'env" pub struct Scope<'env> { _marker: PhantomData<&'env mut &'env ()>, } -//@ has useless_lifetime_bound/struct.Scope.html +//@ has useless_lifetime_bound/type.Scope.html //@ !has - '//*[@class="rust struct"]' "T: 'a + 'a" pub struct SomeStruct<'a, T: 'a> { _marker: PhantomData<&'a T>, diff --git a/tests/rustdoc-html/visibility.rs b/tests/rustdoc-html/visibility.rs index b6a757e504765..696178af6d421 100644 --- a/tests/rustdoc-html/visibility.rs +++ b/tests/rustdoc-html/visibility.rs @@ -4,23 +4,23 @@ #![feature(inherent_associated_types)] #![allow(incomplete_features)] -//@ !has 'foo/index.html' '//a[@href="struct.FooPublic.html"]/..' 'FooPublic πŸ”’' -//@ has 'foo/struct.FooPublic.html' '//pre' 'pub struct FooPublic' +//@ !has 'foo/index.html' '//a[@href="type.FooPublic.html"]/..' 'FooPublic πŸ”’' +//@ has 'foo/type.FooPublic.html' '//pre' 'pub struct FooPublic' pub struct FooPublic; -//@ has 'foo/index.html' '//a[@href="struct.FooJustCrate.html"]/..' 'FooJustCrate πŸ”’' -//@ has 'foo/struct.FooJustCrate.html' '//pre' 'pub(crate) struct FooJustCrate' +//@ has 'foo/index.html' '//a[@href="type.FooJustCrate.html"]/..' 'FooJustCrate πŸ”’' +//@ has 'foo/type.FooJustCrate.html' '//pre' 'pub(crate) struct FooJustCrate' pub(crate) struct FooJustCrate; -//@ has 'foo/index.html' '//a[@href="struct.FooPubCrate.html"]/..' 'FooPubCrate πŸ”’' -//@ has 'foo/struct.FooPubCrate.html' '//pre' 'pub(crate) struct FooPubCrate' +//@ has 'foo/index.html' '//a[@href="type.FooPubCrate.html"]/..' 'FooPubCrate πŸ”’' +//@ has 'foo/type.FooPubCrate.html' '//pre' 'pub(crate) struct FooPubCrate' pub(crate) struct FooPubCrate; -//@ has 'foo/index.html' '//a[@href="struct.FooSelf.html"]/..' 'FooSelf πŸ”’' -//@ has 'foo/struct.FooSelf.html' '//pre' 'pub(crate) struct FooSelf' +//@ has 'foo/index.html' '//a[@href="type.FooSelf.html"]/..' 'FooSelf πŸ”’' +//@ has 'foo/type.FooSelf.html' '//pre' 'pub(crate) struct FooSelf' pub(self) struct FooSelf; -//@ has 'foo/index.html' '//a[@href="struct.FooInSelf.html"]/..' 'FooInSelf πŸ”’' -//@ has 'foo/struct.FooInSelf.html' '//pre' 'pub(crate) struct FooInSelf' +//@ has 'foo/index.html' '//a[@href="type.FooInSelf.html"]/..' 'FooInSelf πŸ”’' +//@ has 'foo/type.FooInSelf.html' '//pre' 'pub(crate) struct FooInSelf' pub(in self) struct FooInSelf; -//@ has 'foo/index.html' '//a[@href="struct.FooPriv.html"]/..' 'FooPriv πŸ”’' -//@ has 'foo/struct.FooPriv.html' '//pre' 'pub(crate) struct FooPriv' +//@ has 'foo/index.html' '//a[@href="type.FooPriv.html"]/..' 'FooPriv πŸ”’' +//@ has 'foo/type.FooPriv.html' '//pre' 'pub(crate) struct FooPriv' struct FooPriv; //@ !has 'foo/index.html' '//a[@href="pub_mod/index.html"]/..' 'pub_mod πŸ”’' @@ -31,40 +31,40 @@ pub(crate) mod pub_crate_mod {} //@ has 'foo/index.html' '//a[@href="a/index.html"]/..' 'a πŸ”’' mod a { - //@ has 'foo/a/index.html' '//a[@href="struct.FooASuper.html"]/..' 'FooASuper πŸ”’' - //@ has 'foo/a/struct.FooASuper.html' '//pre' 'pub(crate) struct FooASuper' + //@ has 'foo/a/index.html' '//a[@href="type.FooASuper.html"]/..' 'FooASuper πŸ”’' + //@ has 'foo/a/type.FooASuper.html' '//pre' 'pub(crate) struct FooASuper' pub(super) struct FooASuper; - //@ has 'foo/a/index.html' '//a[@href="struct.FooAInSuper.html"]/..' 'FooAInSuper πŸ”’' - //@ has 'foo/a/struct.FooAInSuper.html' '//pre' 'pub(crate) struct FooAInSuper' + //@ has 'foo/a/index.html' '//a[@href="type.FooAInSuper.html"]/..' 'FooAInSuper πŸ”’' + //@ has 'foo/a/type.FooAInSuper.html' '//pre' 'pub(crate) struct FooAInSuper' pub(in super) struct FooAInSuper; - //@ has 'foo/a/index.html' '//a[@href="struct.FooAInA.html"]/..' 'FooAInA πŸ”’' - //@ has 'foo/a/struct.FooAInA.html' '//pre' 'struct FooAInA' - //@ !has 'foo/a/struct.FooAInA.html' '//pre' 'pub' + //@ has 'foo/a/index.html' '//a[@href="type.FooAInA.html"]/..' 'FooAInA πŸ”’' + //@ has 'foo/a/type.FooAInA.html' '//pre' 'struct FooAInA' + //@ !has 'foo/a/type.FooAInA.html' '//pre' 'pub' pub(in a) struct FooAInA; - //@ has 'foo/a/index.html' '//a[@href="struct.FooAPriv.html"]/..' 'FooAPriv πŸ”’' - //@ has 'foo/a/struct.FooAPriv.html' '//pre' 'struct FooAPriv' - //@ !has 'foo/a/struct.FooAPriv.html' '//pre' 'pub' + //@ has 'foo/a/index.html' '//a[@href="type.FooAPriv.html"]/..' 'FooAPriv πŸ”’' + //@ has 'foo/a/type.FooAPriv.html' '//pre' 'struct FooAPriv' + //@ !has 'foo/a/type.FooAPriv.html' '//pre' 'pub' struct FooAPriv; //@ has 'foo/a/index.html' '//a[@href="b/index.html"]/..' 'b πŸ”’' mod b { - //@ has 'foo/a/b/index.html' '//a[@href="struct.FooBSuper.html"]/..' 'FooBSuper πŸ”’' - //@ has 'foo/a/b/struct.FooBSuper.html' '//pre' 'pub(super) struct FooBSuper' + //@ has 'foo/a/b/index.html' '//a[@href="type.FooBSuper.html"]/..' 'FooBSuper πŸ”’' + //@ has 'foo/a/b/type.FooBSuper.html' '//pre' 'pub(super) struct FooBSuper' pub(super) struct FooBSuper; - //@ has 'foo/a/b/index.html' '//a[@href="struct.FooBInSuperSuper.html"]/..' 'FooBInSuperSuper πŸ”’' - //@ has 'foo/a/b/struct.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper' + //@ has 'foo/a/b/index.html' '//a[@href="type.FooBInSuperSuper.html"]/..' 'FooBInSuperSuper πŸ”’' + //@ has 'foo/a/b/type.FooBInSuperSuper.html' '//pre' 'pub(crate) struct FooBInSuperSuper' pub(in super::super) struct FooBInSuperSuper; - //@ has 'foo/a/b/index.html' '//a[@href="struct.FooBInAB.html"]/..' 'FooBInAB πŸ”’' - //@ has 'foo/a/b/struct.FooBInAB.html' '//pre' 'struct FooBInAB' - //@ !has 'foo/a/b/struct.FooBInAB.html' '//pre' 'pub' + //@ has 'foo/a/b/index.html' '//a[@href="type.FooBInAB.html"]/..' 'FooBInAB πŸ”’' + //@ has 'foo/a/b/type.FooBInAB.html' '//pre' 'struct FooBInAB' + //@ !has 'foo/a/b/type.FooBInAB.html' '//pre' 'pub' pub(in a::b) struct FooBInAB; - //@ has 'foo/a/b/index.html' '//a[@href="struct.FooBPriv.html"]/..' 'FooBPriv πŸ”’' - //@ has 'foo/a/b/struct.FooBPriv.html' '//pre' 'struct FooBPriv' - //@ !has 'foo/a/b/struct.FooBPriv.html' '//pre' 'pub' + //@ has 'foo/a/b/index.html' '//a[@href="type.FooBPriv.html"]/..' 'FooBPriv πŸ”’' + //@ has 'foo/a/b/type.FooBPriv.html' '//pre' 'struct FooBPriv' + //@ !has 'foo/a/b/type.FooBPriv.html' '//pre' 'pub' struct FooBPriv; - //@ !has 'foo/a/b/index.html' '//a[@href="struct.FooBPub.html"]/..' 'FooBPub πŸ”’' - //@ has 'foo/a/b/struct.FooBPub.html' '//pre' 'pub struct FooBPub' + //@ !has 'foo/a/b/index.html' '//a[@href="type.FooBPub.html"]/..' 'FooBPub πŸ”’' + //@ has 'foo/a/b/type.FooBPub.html' '//pre' 'pub struct FooBPub' pub struct FooBPub; } } @@ -91,14 +91,14 @@ pub trait PubTrait { //@ has 'foo/index.html' '//a[@href="trait.PrivTrait.html"]/..' 'PrivTrait πŸ”’' trait PrivTrait {} -//@ has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'type Type' -//@ !has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub type Type' +//@ has 'foo/type.FooPublic.html' '//h4[@class="code-header"]' 'type Type' +//@ !has 'foo/type.FooPublic.html' '//h4[@class="code-header"]' 'pub type Type' // -//@ has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'const CONST: usize' -//@ !has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub const CONST: usize' +//@ has 'foo/type.FooPublic.html' '//h4[@class="code-header"]' 'const CONST: usize' +//@ !has 'foo/type.FooPublic.html' '//h4[@class="code-header"]' 'pub const CONST: usize' // -//@ has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'fn function()' -//@ !has 'foo/struct.FooPublic.html' '//h4[@class="code-header"]' 'pub fn function()' +//@ has 'foo/type.FooPublic.html' '//h4[@class="code-header"]' 'fn function()' +//@ !has 'foo/type.FooPublic.html' '//h4[@class="code-header"]' 'pub fn function()' impl PubTrait for FooPublic { type Type = usize; @@ -108,7 +108,7 @@ impl PubTrait for FooPublic { pub struct Assoc; -//@ has foo/struct.Assoc.html +//@ has foo/type.Assoc.html impl Assoc { //@ has - '//*[@id="associatedtype.TypePub"]' 'pub type TypePub' pub type TypePub = usize; diff --git a/tests/rustdoc-html/where.SWhere_Echo_impl.html b/tests/rustdoc-html/where.SWhere_Echo_impl.html index 726196281a59f..f3929e638f1ad 100644 --- a/tests/rustdoc-html/where.SWhere_Echo_impl.html +++ b/tests/rustdoc-html/where.SWhere_Echo_impl.html @@ -1,2 +1,2 @@ -

impl<D> Delta<D>
where +

impl<D> Delta<D>
where D: MyTrait,

\ No newline at end of file diff --git a/tests/rustdoc-html/where.SWhere_TraitWhere_item-decl.html b/tests/rustdoc-html/where.SWhere_TraitWhere_item-decl.html index c0fea95878005..e239384f7f42f 100644 --- a/tests/rustdoc-html/where.SWhere_TraitWhere_item-decl.html +++ b/tests/rustdoc-html/where.SWhere_TraitWhere_item-decl.html @@ -5,7 +5,7 @@ // Provided methods fn func(self) where Self: Sized { ... } - fn lines(self) -> Lines<Self> ⓘ + fn lines(self) -> Lines<Self> ⓘ where Self: Sized { ... } fn merge<T>(self, a: T) where Self: Sized, diff --git a/tests/rustdoc-html/where.rs b/tests/rustdoc-html/where.rs index 470af1a371462..2ddabf9678078 100644 --- a/tests/rustdoc-html/where.rs +++ b/tests/rustdoc-html/where.rs @@ -4,7 +4,7 @@ use std::io::Lines; pub trait MyTrait { fn dummy(&self) { } } -//@ has foo/struct.Alpha.html '//pre' "pub struct Alpha(/* private fields */) where A: MyTrait" +//@ has foo/type.Alpha.html '//pre' "pub struct Alpha(/* private fields */) where A: MyTrait" //@ snapshot alpha_trait_decl - '//*[@class="rust item-decl"]/code' pub struct Alpha(A) where A: MyTrait; //@ has foo/trait.Bravo.html '//pre' "pub trait Bravowhere B: MyTrait" @@ -16,7 +16,7 @@ pub fn charlie() where C: MyTrait {} pub struct Delta(D); -//@ has foo/struct.Delta.html '//*[@class="impl"]//h3[@class="code-header"]' \ +//@ has foo/type.Delta.html '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl Deltawhere D: MyTrait" //@ snapshot SWhere_Echo_impl - '//*[@id="impl-Delta%3CD%3E"]/h3[@class="code-header"]' impl Delta where D: MyTrait { @@ -25,7 +25,7 @@ impl Delta where D: MyTrait { pub struct Echo(E); -//@ has 'foo/struct.Simd.html' +//@ has 'foo/type.Simd.html' //@ snapshot SWhere_Simd_item-decl - '//pre[@class="rust item-decl"]' pub struct Simd([T; 1]) where @@ -53,7 +53,7 @@ pub trait TraitWhere { { todo!() } } -//@ has foo/struct.Echo.html '//*[@class="impl"]//h3[@class="code-header"]' \ +//@ has foo/type.Echo.html '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl MyTrait for Echowhere E: MyTrait" //@ has foo/trait.MyTrait.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl MyTrait for Echowhere E: MyTrait" @@ -61,7 +61,7 @@ impl MyTrait for Echowhere E: MyTrait {} pub enum Foxtrot { Foxtrot1(F) } -//@ has foo/enum.Foxtrot.html '//*[@class="impl"]//h3[@class="code-header"]' \ +//@ has foo/type.Foxtrot.html '//*[@class="impl"]//h3[@class="code-header"]' \ // "impl MyTrait for Foxtrotwhere F: MyTrait" //@ has foo/trait.MyTrait.html '//*[@id="implementors-list"]//h3[@class="code-header"]' \ // "impl MyTrait for Foxtrotwhere F: MyTrait" diff --git a/tests/rustdoc-html/whitespace-after-where-clause.rs b/tests/rustdoc-html/whitespace-after-where-clause.rs index d1a45c7a76808..9856fc4525bc4 100644 --- a/tests/rustdoc-html/whitespace-after-where-clause.rs +++ b/tests/rustdoc-html/whitespace-after-where-clause.rs @@ -23,7 +23,7 @@ pub trait ToOwned2 { fn whatever(&self) -> T; } -//@ has 'foo/enum.Cow.html' +//@ has 'foo/type.Cow.html' //@ snapshot enum - '//*[@class="rust item-decl"]' pub enum Cow<'a, B: ?Sized + 'a> where @@ -33,7 +33,7 @@ where Whatever(u32), } -//@ has 'foo/enum.Cow2.html' +//@ has 'foo/type.Cow2.html' //@ snapshot enum2 - '//*[@class="rust item-decl"]' // There should be a whitespace before `{` in this case! pub enum Cow2<'a, B: ?Sized + ToOwned<()> + 'a> { @@ -41,7 +41,7 @@ pub enum Cow2<'a, B: ?Sized + ToOwned<()> + 'a> { Whatever(u32), } -//@ has 'foo/struct.Struct.html' +//@ has 'foo/type.Struct.html' //@ snapshot struct - '//*[@class="rust item-decl"]' pub struct Struct<'a, B: ?Sized + 'a> where @@ -51,7 +51,7 @@ where pub b: u32, } -//@ has 'foo/struct.Struct2.html' +//@ has 'foo/type.Struct2.html' //@ snapshot struct2 - '//*[@class="rust item-decl"]' // There should be a whitespace before `{` in this case! pub struct Struct2<'a, B: ?Sized + ToOwned<()> + 'a> { @@ -59,7 +59,7 @@ pub struct Struct2<'a, B: ?Sized + ToOwned<()> + 'a> { pub b: u32, } -//@ has 'foo/union.Union.html' +//@ has 'foo/type.Union.html' //@ snapshot union - '//*[@class="rust item-decl"]' pub union Union<'a, B: ?Sized + 'a> where @@ -69,7 +69,7 @@ where b: u32, } -//@ has 'foo/union.Union2.html' +//@ has 'foo/type.Union2.html' //@ snapshot union2 - '//*[@class="rust item-decl"]' // There should be a whitespace before `{` in this case! pub union Union2<'a, B: ?Sized + ToOwned<()> + 'a> { diff --git a/tests/rustdoc-html/without-redirect.rs b/tests/rustdoc-html/without-redirect.rs index f8a332a5dd758..9809f5485b544 100644 --- a/tests/rustdoc-html/without-redirect.rs +++ b/tests/rustdoc-html/without-redirect.rs @@ -8,6 +8,6 @@ macro_rules! bar { () => {} } -//@ has foo/struct.Bar.html +//@ has foo/type.Bar.html //@ !has foo/Bar.t.html pub struct Bar;