diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/rustdoc-js | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-js')
44 files changed, 0 insertions, 1300 deletions
diff --git a/src/test/rustdoc-js/basic.js b/src/test/rustdoc-js/basic.js deleted file mode 100644 index d99b23468..000000000 --- a/src/test/rustdoc-js/basic.js +++ /dev/null @@ -1,7 +0,0 @@ -const QUERY = 'Fo'; - -const EXPECTED = { - 'others': [ - { 'path': 'basic', 'name': 'Foo' }, - ], -}; diff --git a/src/test/rustdoc-js/basic.rs b/src/test/rustdoc-js/basic.rs deleted file mode 100644 index da946a58b..000000000 --- a/src/test/rustdoc-js/basic.rs +++ /dev/null @@ -1,2 +0,0 @@ -/// Docs for Foo -pub struct Foo; diff --git a/src/test/rustdoc-js/doc-alias-filter-out.js b/src/test/rustdoc-js/doc-alias-filter-out.js deleted file mode 100644 index 46a089d06..000000000 --- a/src/test/rustdoc-js/doc-alias-filter-out.js +++ /dev/null @@ -1,9 +0,0 @@ -// exact-check - -const QUERY = 'true'; - -const FILTER_CRATE = 'some_other_crate'; - -const EXPECTED = { - 'others': [], -}; diff --git a/src/test/rustdoc-js/doc-alias-filter-out.rs b/src/test/rustdoc-js/doc-alias-filter-out.rs deleted file mode 100644 index 3f0c09479..000000000 --- a/src/test/rustdoc-js/doc-alias-filter-out.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[doc(alias = "true")] -pub struct Foo; diff --git a/src/test/rustdoc-js/doc-alias-filter.js b/src/test/rustdoc-js/doc-alias-filter.js deleted file mode 100644 index e06047ba7..000000000 --- a/src/test/rustdoc-js/doc-alias-filter.js +++ /dev/null @@ -1,17 +0,0 @@ -// exact-check - -const QUERY = '"true"'; - -const FILTER_CRATE = 'doc_alias_filter'; - -const EXPECTED = { - 'others': [ - { - 'path': 'doc_alias_filter', - 'name': 'Foo', - 'alias': 'true', - 'href': '../doc_alias_filter/struct.Foo.html', - 'is_alias': true - }, - ], -}; diff --git a/src/test/rustdoc-js/doc-alias-filter.rs b/src/test/rustdoc-js/doc-alias-filter.rs deleted file mode 100644 index d5227814c..000000000 --- a/src/test/rustdoc-js/doc-alias-filter.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[doc(alias = "true")] -pub struct Foo; - -#[doc(alias = "false")] -pub struct Bar; diff --git a/src/test/rustdoc-js/doc-alias-whitespace.js b/src/test/rustdoc-js/doc-alias-whitespace.js deleted file mode 100644 index c9fc0c431..000000000 --- a/src/test/rustdoc-js/doc-alias-whitespace.js +++ /dev/null @@ -1,19 +0,0 @@ -// exact-check - -const QUERY = [ - 'Demon Lord', -]; - -const EXPECTED = [ - { - 'others': [ - { - 'path': 'doc_alias_whitespace', - 'name': 'Struct', - 'alias': 'Demon Lord', - 'href': '../doc_alias_whitespace/struct.Struct.html', - 'is_alias': true - }, - ], - }, -]; diff --git a/src/test/rustdoc-js/doc-alias-whitespace.rs b/src/test/rustdoc-js/doc-alias-whitespace.rs deleted file mode 100644 index 16c022c74..000000000 --- a/src/test/rustdoc-js/doc-alias-whitespace.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[doc(alias = "Demon Lord")] -pub struct Struct; diff --git a/src/test/rustdoc-js/doc-alias.js b/src/test/rustdoc-js/doc-alias.js deleted file mode 100644 index 7bb0cbe38..000000000 --- a/src/test/rustdoc-js/doc-alias.js +++ /dev/null @@ -1,295 +0,0 @@ -// exact-check - -const QUERY = [ - 'StructItem', - 'StructFieldItem', - 'StructMethodItem', - 'ImplTraitItem', - 'StructImplConstItem', - 'ImplTraitFunction', - 'EnumItem', - 'VariantItem', - 'EnumMethodItem', - 'TypedefItem', - 'TraitItem', - 'TraitTypeItem', - 'AssociatedConstItem', - 'TraitFunctionItem', - 'FunctionItem', - 'ModuleItem', - 'ConstItem', - 'StaticItem', - 'UnionItem', - 'UnionFieldItem', - 'UnionMethodItem', - 'MacroItem', -]; - -const EXPECTED = [ - { - // StructItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Struct', - 'alias': 'StructItem', - 'href': '../doc_alias/struct.Struct.html', - 'is_alias': true - }, - ], - }, - { - // StructFieldItem - 'others': [ - { - 'path': 'doc_alias::Struct', - 'name': 'field', - 'alias': 'StructFieldItem', - 'href': '../doc_alias/struct.Struct.html#structfield.field', - 'is_alias': true - }, - ], - }, - { - // StructMethodItem - 'others': [ - { - 'path': 'doc_alias::Struct', - 'name': 'method', - 'alias': 'StructMethodItem', - 'href': '../doc_alias/struct.Struct.html#method.method', - 'is_alias': true - }, - ], - }, - { - // ImplTraitItem - 'others': [], - }, - { - // StructImplConstItem - 'others': [ - { - 'path': 'doc_alias::Struct', - 'name': 'ImplConstItem', - 'alias': 'StructImplConstItem', - 'href': '../doc_alias/struct.Struct.html#associatedconstant.ImplConstItem', - 'is_alias': true - }, - ], - }, - { - // ImplTraitFunction - 'others': [ - { - 'path': 'doc_alias::Struct', - 'name': 'function', - 'alias': 'ImplTraitFunction', - 'href': '../doc_alias/struct.Struct.html#method.function', - 'is_alias': true - }, - ], - }, - { - // EnumItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Enum', - 'alias': 'EnumItem', - 'href': '../doc_alias/enum.Enum.html', - 'is_alias': true - }, - ], - }, - { - // VariantItem - 'others': [ - { - 'path': 'doc_alias::Enum', - 'name': 'Variant', - 'alias': 'VariantItem', - 'href': '../doc_alias/enum.Enum.html#variant.Variant', - 'is_alias': true - }, - ], - }, - { - // EnumMethodItem - 'others': [ - { - 'path': 'doc_alias::Enum', - 'name': 'method', - 'alias': 'EnumMethodItem', - 'href': '../doc_alias/enum.Enum.html#method.method', - 'is_alias': true - }, - ], - }, - { - // TypedefItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Typedef', - 'alias': 'TypedefItem', - 'href': '../doc_alias/type.Typedef.html', - 'is_alias': true - }, - ], - }, - { - // TraitItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Trait', - 'alias': 'TraitItem', - 'href': '../doc_alias/trait.Trait.html', - 'is_alias': true - }, - ], - }, - { - // TraitTypeItem - 'others': [ - { - 'path': 'doc_alias::Trait', - 'name': 'Target', - 'alias': 'TraitTypeItem', - 'href': '../doc_alias/trait.Trait.html#associatedtype.Target', - 'is_alias': true - }, - ], - }, - { - // AssociatedConstItem - 'others': [ - { - 'path': 'doc_alias::Trait', - 'name': 'AssociatedConst', - 'alias': 'AssociatedConstItem', - 'href': '../doc_alias/trait.Trait.html#associatedconstant.AssociatedConst', - 'is_alias': true - }, - ], - }, - { - // TraitFunctionItem - 'others': [ - { - 'path': 'doc_alias::Trait', - 'name': 'function', - 'alias': 'TraitFunctionItem', - 'href': '../doc_alias/trait.Trait.html#tymethod.function', - 'is_alias': true - }, - ], - }, - { - // FunctionItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'function', - 'alias': 'FunctionItem', - 'href': '../doc_alias/fn.function.html', - 'is_alias': true - }, - ], - }, - { - // ModuleItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Module', - 'alias': 'ModuleItem', - 'href': '../doc_alias/Module/index.html', - 'is_alias': true - }, - ], - }, - { - // ConstItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Const', - 'alias': 'ConstItem', - 'href': '../doc_alias/constant.Const.html', - 'is_alias': true - }, - { - 'path': 'doc_alias::Struct', - 'name': 'ImplConstItem', - }, - ], - }, - { - // StaticItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Static', - 'alias': 'StaticItem', - 'href': '../doc_alias/static.Static.html', - 'is_alias': true - }, - ], - }, - { - // UnionItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Union', - 'alias': 'UnionItem', - 'href': '../doc_alias/union.Union.html', - 'is_alias': true - }, - // Not an alias! - { - 'path': 'doc_alias::Union', - 'name': 'union_item', - 'href': '../doc_alias/union.Union.html#structfield.union_item' - }, - ], - }, - { - // UnionFieldItem - 'others': [ - { - 'path': 'doc_alias::Union', - 'name': 'union_item', - 'alias': 'UnionFieldItem', - 'href': '../doc_alias/union.Union.html#structfield.union_item', - 'is_alias': true - }, - ], - }, - { - // UnionMethodItem - 'others': [ - { - 'path': 'doc_alias::Union', - 'name': 'method', - 'alias': 'UnionMethodItem', - 'href': '../doc_alias/union.Union.html#method.method', - 'is_alias': true - }, - ], - }, - { - // MacroItem - 'others': [ - { - 'path': 'doc_alias', - 'name': 'Macro', - 'alias': 'MacroItem', - 'href': '../doc_alias/macro.Macro.html', - 'is_alias': true - }, - ], - }, -]; diff --git a/src/test/rustdoc-js/doc-alias.rs b/src/test/rustdoc-js/doc-alias.rs deleted file mode 100644 index 750b7b757..000000000 --- a/src/test/rustdoc-js/doc-alias.rs +++ /dev/null @@ -1,75 +0,0 @@ -#[doc(alias = "StructItem")] -pub struct Struct { - #[doc(alias = "StructFieldItem")] - pub field: u32, -} - -impl Struct { - #[doc(alias = "StructImplConstItem")] - pub const ImplConstItem: i32 = 0; - #[doc(alias = "StructMethodItem")] - pub fn method(&self) {} -} - -impl Trait for Struct { - type Target = u32; - const AssociatedConst: i32 = 12; - - #[doc(alias = "ImplTraitFunction")] - fn function() -> Self::Target { 0 } -} - -#[doc(alias = "EnumItem")] -pub enum Enum { - #[doc(alias = "VariantItem")] - Variant, -} - -impl Enum { - #[doc(alias = "EnumMethodItem")] - pub fn method(&self) {} -} - -#[doc(alias = "TypedefItem")] -pub type Typedef = i32; - -#[doc(alias = "TraitItem")] -pub trait Trait { - #[doc(alias = "TraitTypeItem")] - type Target; - #[doc(alias = "AssociatedConstItem")] - const AssociatedConst: i32; - - #[doc(alias = "TraitFunctionItem")] - fn function() -> Self::Target; -} - -#[doc(alias = "FunctionItem")] -pub fn function() {} - -#[doc(alias = "ModuleItem")] -pub mod Module {} - -#[doc(alias = "ConstItem")] -pub const Const: u32 = 0; - -#[doc(alias = "StaticItem")] -pub static Static: u32 = 0; - -#[doc(alias = "UnionItem")] -pub union Union { - #[doc(alias = "UnionFieldItem")] - pub union_item: u32, - pub y: f32, -} - -impl Union { - #[doc(alias = "UnionMethodItem")] - pub fn method(&self) {} -} - -#[doc(alias = "MacroItem")] -#[macro_export] -macro_rules! Macro { - () => {} -} diff --git a/src/test/rustdoc-js/exact-match.js b/src/test/rustdoc-js/exact-match.js deleted file mode 100644 index b0a411bee..000000000 --- a/src/test/rustdoc-js/exact-match.js +++ /dev/null @@ -1,9 +0,0 @@ -const QUERY = 'si::pc'; - -const EXPECTED = { - 'others': [ - { 'path': 'exact_match::Si', 'name': 'pc' }, - { 'path': 'exact_match::Psi', 'name': 'pc' }, - { 'path': 'exact_match::Si', 'name': 'pa' }, - ], -}; diff --git a/src/test/rustdoc-js/exact-match.rs b/src/test/rustdoc-js/exact-match.rs deleted file mode 100644 index 2eacc0a35..000000000 --- a/src/test/rustdoc-js/exact-match.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! imp { - ($name:ident) => { - pub struct $name { - pub op: usize, - } - impl $name { - pub fn op() {} - pub fn cmp() {} - pub fn map() {} - pub fn pop() {} - pub fn ptr() {} - pub fn rpo() {} - pub fn drop() {} - pub fn copy() {} - pub fn zip() {} - pub fn sup() {} - pub fn pa() {} - pub fn pb() {} - pub fn pc() {} - pub fn pd() {} - pub fn pe() {} - pub fn pf() {} - pub fn pg() {} - pub fn ph() {} - pub fn pi() {} - pub fn pj() {} - pub fn pk() {} - pub fn pl() {} - pub fn pm() {} - pub fn pn() {} - pub fn po() {} - } - }; - ($name:ident, $($names:ident),*) => { - imp!($name); - imp!($($names),*); - }; -} -macro_rules! en { - ($name:ident) => { - pub enum $name { - Ptr, - Rp, - Rpo, - Pt, - Drop, - Dr, - Dro, - Sup, - Op, - Cmp, - Map, - Mp, - } - }; - ($name:ident, $($names:ident),*) => { - en!($name); - en!($($names),*); - }; -} - -imp!(Ot, Foo, Cmp, Map, Loc, Lac, Toc, Si, Sig, Sip, Psy, Psi, Py, Pi, Pa, Pb, Pc, Pd); -imp!(Pe, Pf, Pg, Ph, Pj, Pk, Pl, Pm, Pn, Po, Pq, Pr, Ps, Pt, Pu, Pv, Pw, Px, Pz, Ap, Bp, Cp); -imp!(Dp, Ep, Fp, Gp, Hp, Ip, Jp, Kp, Lp, Mp, Np, Op, Pp, Qp, Rp, Sp, Tp, Up, Vp, Wp, Xp, Yp, Zp); - -en!(Place, Plac, Plae, Plce, Pace, Scalar, Scalr, Scaar, Sclar, Salar); - -pub struct P; diff --git a/src/test/rustdoc-js/foreign-type-path.js b/src/test/rustdoc-js/foreign-type-path.js deleted file mode 100644 index 334761bad..000000000 --- a/src/test/rustdoc-js/foreign-type-path.js +++ /dev/null @@ -1,9 +0,0 @@ -const QUERY = 'MyForeignType::my_method'; - -const EXPECTED = { - 'others': [ - // Test case for https://github.com/rust-lang/rust/pull/96887#pullrequestreview-967154358 - // Validates that the parent path for a foreign type method is correct. - { 'path': 'foreign_type_path::aaaaaaa::MyForeignType', 'name': 'my_method' }, - ], -}; diff --git a/src/test/rustdoc-js/foreign-type-path.rs b/src/test/rustdoc-js/foreign-type-path.rs deleted file mode 100644 index 83400104e..000000000 --- a/src/test/rustdoc-js/foreign-type-path.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![feature(extern_types)] - -pub mod aaaaaaa { - - extern { - pub type MyForeignType; - } - - impl MyForeignType { - pub fn my_method() {} - } - -} diff --git a/src/test/rustdoc-js/generics-impl.js b/src/test/rustdoc-js/generics-impl.js deleted file mode 100644 index bb6e0041d..000000000 --- a/src/test/rustdoc-js/generics-impl.js +++ /dev/null @@ -1,57 +0,0 @@ -// exact-check - -const QUERY = [ - 'Aaaaaaa -> u32', - 'Aaaaaaa -> bool', - 'Aaaaaaa -> usize', - 'Read -> u64', - 'bool -> u64', - 'Ddddddd -> u64', - '-> Ddddddd' -]; - -const EXPECTED = [ - { - // Aaaaaaa -> u32 - 'others': [ - { 'path': 'generics_impl::Aaaaaaa', 'name': 'bbbbbbb' }, - ], - }, - { - // Aaaaaaa -> bool - 'others': [ - { 'path': 'generics_impl::Aaaaaaa', 'name': 'ccccccc' }, - ], - }, - { - // Aaaaaaa -> usize - 'others': [ - { 'path': 'generics_impl::Aaaaaaa', 'name': 'read' }, - ], - }, - { - // Read -> u64 - 'others': [ - { 'path': 'generics_impl::Ddddddd', 'name': 'eeeeeee' }, - { 'path': 'generics_impl::Ddddddd', 'name': 'ggggggg' }, - ], - }, - { - // bool -> u64 - 'others': [ - { 'path': 'generics_impl::Ddddddd', 'name': 'fffffff' }, - ], - }, - { - // Ddddddd -> u64 - 'others': [ - { 'path': 'generics_impl::Ddddddd', 'name': 'ggggggg' }, - ], - }, - { - // -> Ddddddd - 'others': [ - { 'path': 'generics_impl::Ddddddd', 'name': 'hhhhhhh' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/generics-impl.rs b/src/test/rustdoc-js/generics-impl.rs deleted file mode 100644 index 696218021..000000000 --- a/src/test/rustdoc-js/generics-impl.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::io::{Result as IoResult, Read}; - -pub struct Aaaaaaa; - -impl Aaaaaaa { - pub fn bbbbbbb(self) -> u32 { - 1 - } - pub fn ccccccc(&self) -> bool { - true - } -} - -impl Read for Aaaaaaa { - fn read(&mut self, out: &mut [u8]) -> IoResult<usize> { - Ok(out.len()) - } -} - -pub struct Ddddddd<T>(T); - -impl<T: Read> Ddddddd<T> { - pub fn eeeeeee(_: T) -> u64 { - 1 - } - pub fn fffffff(_: bool) -> u64 { - 1 - } - pub fn ggggggg(self) -> u64 { - 1 - } - pub fn hhhhhhh() -> Self where T: Default { - Ddddddd(T::default()) - } -} diff --git a/src/test/rustdoc-js/generics-multi-trait.js b/src/test/rustdoc-js/generics-multi-trait.js deleted file mode 100644 index e7fcea876..000000000 --- a/src/test/rustdoc-js/generics-multi-trait.js +++ /dev/null @@ -1,32 +0,0 @@ -// exact-check - -const QUERY = [ - 'Result<SomeTrait>', - 'Zzzzzzzzzzzzzzzzzz', - 'Nonononononononono', -]; - -const EXPECTED = [ - // check one of the generic items - { - 'in_args': [ - { 'path': 'generics_multi_trait', 'name': 'beta' }, - ], - 'returned': [ - { 'path': 'generics_multi_trait', 'name': 'bet' }, - ], - }, - { - 'in_args': [ - { 'path': 'generics_multi_trait', 'name': 'beta' }, - ], - 'returned': [ - { 'path': 'generics_multi_trait', 'name': 'bet' }, - ], - }, - // ignore the name of the generic itself - { - 'in_args': [], - 'returned': [], - }, -]; diff --git a/src/test/rustdoc-js/generics-multi-trait.rs b/src/test/rustdoc-js/generics-multi-trait.rs deleted file mode 100644 index e6fd06d25..000000000 --- a/src/test/rustdoc-js/generics-multi-trait.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub trait SomeTrait {} -pub trait Zzzzzzzzzzzzzzzzzz {} - -pub fn bet<Nonononononononono: SomeTrait + Zzzzzzzzzzzzzzzzzz>() -> Result<Nonononononononono, ()> { - loop {} -} - -pub fn beta<Nonononononononono: SomeTrait + Zzzzzzzzzzzzzzzzzz>( - _param: Result<Nonononononononono, ()>, -) { - loop {} -} diff --git a/src/test/rustdoc-js/generics-trait.js b/src/test/rustdoc-js/generics-trait.js deleted file mode 100644 index 787662243..000000000 --- a/src/test/rustdoc-js/generics-trait.js +++ /dev/null @@ -1,23 +0,0 @@ -const QUERY = [ - 'Result<SomeTrait>', - 'OtherThingxxxxxxxx', -]; - -const EXPECTED = [ - { - 'in_args': [ - { 'path': 'generics_trait', 'name': 'beta' }, - ], - 'returned': [ - { 'path': 'generics_trait', 'name': 'bet' }, - ], - }, - { - 'in_args': [ - { 'path': 'generics_trait', 'name': 'alpha' }, - ], - 'returned': [ - { 'path': 'generics_trait', 'name': 'alef' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/generics-trait.rs b/src/test/rustdoc-js/generics-trait.rs deleted file mode 100644 index 20db117cc..000000000 --- a/src/test/rustdoc-js/generics-trait.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub trait SomeTrait {} -pub trait OtherThingxxxxxxxx {} - -pub fn alef<T: OtherThingxxxxxxxx>() -> Result<T, ()> { loop {} } -pub fn bet<T: SomeTrait>() -> Result<T, ()> { loop {} } - -pub fn alpha<T: OtherThingxxxxxxxx>(_param: Result<T, ()>) { loop {} } -pub fn beta<T: SomeTrait>(_param: Result<T, ()>) { loop {} } diff --git a/src/test/rustdoc-js/generics.js b/src/test/rustdoc-js/generics.js deleted file mode 100644 index 5e5ba7cd9..000000000 --- a/src/test/rustdoc-js/generics.js +++ /dev/null @@ -1,73 +0,0 @@ -// exact-check - -const QUERY = [ - 'R<P>', - '"P"', - 'P', - 'ExtraCreditStructMulti<ExtraCreditInnerMulti, ExtraCreditInnerMulti>', - 'TraitCat', - 'TraitDog', - 'Result<String>', -]; - -const EXPECTED = [ - { - // R<P> - 'returned': [ - { 'path': 'generics', 'name': 'alef' }, - ], - 'in_args': [ - { 'path': 'generics', 'name': 'alpha' }, - ], - }, - { - // "P" - 'others': [ - { 'path': 'generics', 'name': 'P' }, - ], - 'returned': [ - { 'path': 'generics', 'name': 'alef' }, - ], - 'in_args': [ - { 'path': 'generics', 'name': 'alpha' }, - ], - }, - { - // P - 'returned': [ - { 'path': 'generics', 'name': 'alef' }, - ], - 'in_args': [ - { 'path': 'generics', 'name': 'alpha' }, - ], - }, - { - // "ExtraCreditStructMulti"<ExtraCreditInnerMulti, ExtraCreditInnerMulti> - 'in_args': [ - { 'path': 'generics', 'name': 'extracreditlabhomework' }, - ], - 'returned': [], - }, - { - // TraitCat - 'in_args': [ - { 'path': 'generics', 'name': 'gamma' }, - ], - }, - { - // TraitDog - 'in_args': [ - { 'path': 'generics', 'name': 'gamma' }, - ], - }, - { - // Result<String> - 'others': [], - 'returned': [ - { 'path': 'generics', 'name': 'super_soup' }, - ], - 'in_args': [ - { 'path': 'generics', 'name': 'super_soup' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/generics.rs b/src/test/rustdoc-js/generics.rs deleted file mode 100644 index 055c51c7e..000000000 --- a/src/test/rustdoc-js/generics.rs +++ /dev/null @@ -1,28 +0,0 @@ -pub struct P; -pub struct Q; -pub struct R<T>(T); - -// returns test -pub fn alef() -> R<P> { loop {} } -pub fn bet() -> R<Q> { loop {} } - -// in_args test -pub fn alpha(_x: R<P>) { loop {} } -pub fn beta(_x: R<Q>) { loop {} } - -// test case with multiple appearances of the same type -pub struct ExtraCreditStructMulti<T, U> { t: T, u: U } -pub struct ExtraCreditInnerMulti {} -pub fn extracreditlabhomework( - _param: ExtraCreditStructMulti<ExtraCreditInnerMulti, ExtraCreditInnerMulti> -) { loop {} } -pub fn redherringmatchforextracredit( - _param: ExtraCreditStructMulti<ExtraCreditInnerMulti, ()> -) { loop {} } - -pub trait TraitCat {} -pub trait TraitDog {} - -pub fn gamma<T: TraitCat + TraitDog>(t: T) {} - -pub fn super_soup(s: Result<String, i32>) -> Result<String, i32> { s } diff --git a/src/test/rustdoc-js/impl-trait.js b/src/test/rustdoc-js/impl-trait.js deleted file mode 100644 index 8d594bf8a..000000000 --- a/src/test/rustdoc-js/impl-trait.js +++ /dev/null @@ -1,51 +0,0 @@ -// ignore-order - -const QUERY = [ - 'Aaaaaaa -> i32', - 'Aaaaaaa -> Aaaaaaa', - 'Aaaaaaa -> usize', - '-> Aaaaaaa', - 'Aaaaaaa', -]; - -const EXPECTED = [ - { - // Aaaaaaa -> i32 - 'others': [ - { 'path': 'impl_trait::Ccccccc', 'name': 'eeeeeee' }, - ], - }, - { - // Aaaaaaa -> Aaaaaaa - 'others': [ - { 'path': 'impl_trait::Ccccccc', 'name': 'fffffff' }, - ], - }, - { - // Aaaaaaa -> usize - 'others': [], - }, - { - // -> Aaaaaaa - 'others': [ - { 'path': 'impl_trait::Ccccccc', 'name': 'fffffff' }, - { 'path': 'impl_trait::Ccccccc', 'name': 'ddddddd' }, - { 'path': 'impl_trait', 'name': 'bbbbbbb' }, - ], - }, - { - // Aaaaaaa - 'others': [ - { 'path': 'impl_trait', 'name': 'Aaaaaaa' }, - ], - 'in_args': [ - { 'path': 'impl_trait::Ccccccc', 'name': 'fffffff' }, - { 'path': 'impl_trait::Ccccccc', 'name': 'eeeeeee' }, - ], - 'returned': [ - { 'path': 'impl_trait::Ccccccc', 'name': 'fffffff' }, - { 'path': 'impl_trait::Ccccccc', 'name': 'ddddddd' }, - { 'path': 'impl_trait', 'name': 'bbbbbbb' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/impl-trait.rs b/src/test/rustdoc-js/impl-trait.rs deleted file mode 100644 index fb8869b46..000000000 --- a/src/test/rustdoc-js/impl-trait.rs +++ /dev/null @@ -1,21 +0,0 @@ -pub trait Aaaaaaa {} - -impl Aaaaaaa for () {} - -pub fn bbbbbbb() -> impl Aaaaaaa { - () -} - -pub struct Ccccccc {} - -impl Ccccccc { - pub fn ddddddd(&self) -> impl Aaaaaaa { - () - } - pub fn eeeeeee(&self, _x: impl Aaaaaaa) -> i32 { - 0 - } - pub fn fffffff(&self, x: impl Aaaaaaa) -> impl Aaaaaaa { - x - } -} diff --git a/src/test/rustdoc-js/module-substring.js b/src/test/rustdoc-js/module-substring.js deleted file mode 100644 index a446c39eb..000000000 --- a/src/test/rustdoc-js/module-substring.js +++ /dev/null @@ -1,9 +0,0 @@ -const QUERY = 'ig::pc'; - -const EXPECTED = { - 'others': [ - { 'path': 'module_substring::Sig', 'name': 'pc' }, - { 'path': 'module_substring::Si', 'name': 'pc' }, - { 'path': 'module_substring::Si', 'name': 'pa' }, - ], -}; diff --git a/src/test/rustdoc-js/module-substring.rs b/src/test/rustdoc-js/module-substring.rs deleted file mode 100644 index 2eacc0a35..000000000 --- a/src/test/rustdoc-js/module-substring.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! imp { - ($name:ident) => { - pub struct $name { - pub op: usize, - } - impl $name { - pub fn op() {} - pub fn cmp() {} - pub fn map() {} - pub fn pop() {} - pub fn ptr() {} - pub fn rpo() {} - pub fn drop() {} - pub fn copy() {} - pub fn zip() {} - pub fn sup() {} - pub fn pa() {} - pub fn pb() {} - pub fn pc() {} - pub fn pd() {} - pub fn pe() {} - pub fn pf() {} - pub fn pg() {} - pub fn ph() {} - pub fn pi() {} - pub fn pj() {} - pub fn pk() {} - pub fn pl() {} - pub fn pm() {} - pub fn pn() {} - pub fn po() {} - } - }; - ($name:ident, $($names:ident),*) => { - imp!($name); - imp!($($names),*); - }; -} -macro_rules! en { - ($name:ident) => { - pub enum $name { - Ptr, - Rp, - Rpo, - Pt, - Drop, - Dr, - Dro, - Sup, - Op, - Cmp, - Map, - Mp, - } - }; - ($name:ident, $($names:ident),*) => { - en!($name); - en!($($names),*); - }; -} - -imp!(Ot, Foo, Cmp, Map, Loc, Lac, Toc, Si, Sig, Sip, Psy, Psi, Py, Pi, Pa, Pb, Pc, Pd); -imp!(Pe, Pf, Pg, Ph, Pj, Pk, Pl, Pm, Pn, Po, Pq, Pr, Ps, Pt, Pu, Pv, Pw, Px, Pz, Ap, Bp, Cp); -imp!(Dp, Ep, Fp, Gp, Hp, Ip, Jp, Kp, Lp, Mp, Np, Op, Pp, Qp, Rp, Sp, Tp, Up, Vp, Wp, Xp, Yp, Zp); - -en!(Place, Plac, Plae, Plce, Pace, Scalar, Scalr, Scaar, Sclar, Salar); - -pub struct P; diff --git a/src/test/rustdoc-js/path-ordering.js b/src/test/rustdoc-js/path-ordering.js deleted file mode 100644 index 4aee569b0..000000000 --- a/src/test/rustdoc-js/path-ordering.js +++ /dev/null @@ -1,14 +0,0 @@ -// exact-check - -const QUERY = 'b::ccccccc'; - -const EXPECTED = { - 'others': [ - // `ccccccc` is an exact match for all three of these. - // However `b` is a closer match for `bb` than for any - // of the others, so it ought to go first. - { 'path': 'path_ordering::bb', 'name': 'Ccccccc' }, - { 'path': 'path_ordering::aa', 'name': 'Ccccccc' }, - { 'path': 'path_ordering::dd', 'name': 'Ccccccc' }, - ], -}; diff --git a/src/test/rustdoc-js/path-ordering.rs b/src/test/rustdoc-js/path-ordering.rs deleted file mode 100644 index 7843cf7f9..000000000 --- a/src/test/rustdoc-js/path-ordering.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub mod dd { - pub struct Ccccccc; -} -pub mod aa { - pub struct Ccccccc; -} -pub mod bb { - pub struct Ccccccc; -} diff --git a/src/test/rustdoc-js/primitive.js b/src/test/rustdoc-js/primitive.js deleted file mode 100644 index 918f70999..000000000 --- a/src/test/rustdoc-js/primitive.js +++ /dev/null @@ -1,25 +0,0 @@ -// exact-check - -const QUERY = [ - "i32", - "str", - "TotoIsSomewhere", -]; - -const EXPECTED = [ - { - 'in_args': [ - { 'path': 'primitive', 'name': 'foo' }, - ], - }, - { - 'returned': [ - { 'path': 'primitive', 'name': 'foo' }, - ], - }, - { - 'others': [], - 'in_args': [], - 'returned': [], - }, -]; diff --git a/src/test/rustdoc-js/primitive.rs b/src/test/rustdoc-js/primitive.rs deleted file mode 100644 index 2b30ccf15..000000000 --- a/src/test/rustdoc-js/primitive.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub fn foo(i: i32) -> &'static str { - "hello" -} - -pub fn foo2<TotoIsSomewhere>(i: &TotoIsSomewhere, j: TotoIsSomewhere) {} diff --git a/src/test/rustdoc-js/prototype.js b/src/test/rustdoc-js/prototype.js deleted file mode 100644 index 2f1d841c3..000000000 --- a/src/test/rustdoc-js/prototype.js +++ /dev/null @@ -1,16 +0,0 @@ -// exact-check - -const QUERY = ['constructor', '__proto__']; - -const EXPECTED = [ - { - 'others': [], - 'returned': [], - 'in_args': [], - }, - { - 'others': [], - 'returned': [], - 'in_args': [], - }, -]; diff --git a/src/test/rustdoc-js/prototype.rs b/src/test/rustdoc-js/prototype.rs deleted file mode 100644 index 5f6d73cc1..000000000 --- a/src/test/rustdoc-js/prototype.rs +++ /dev/null @@ -1,4 +0,0 @@ -// The alias needed to be there to reproduce the bug -// that used to be here. -#[doc(alias="other_alias")] -pub fn something_else() {} diff --git a/src/test/rustdoc-js/raw-pointer.js b/src/test/rustdoc-js/raw-pointer.js deleted file mode 100644 index 140b955ea..000000000 --- a/src/test/rustdoc-js/raw-pointer.js +++ /dev/null @@ -1,55 +0,0 @@ -// ignore-order - -const QUERY = [ - 'Aaaaaaa -> i32', - 'Aaaaaaa -> Aaaaaaa', - 'Aaaaaaa -> usize', - '-> Aaaaaaa', - 'Aaaaaaa', -]; - -const EXPECTED = [ - { - // Aaaaaaa -> i32 - 'others': [ - { 'path': 'raw_pointer::Ccccccc', 'name': 'eeeeeee' }, - ], - }, - { - // Aaaaaaa -> Aaaaaaa - 'others': [ - { 'path': 'raw_pointer::Ccccccc', 'name': 'fffffff' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'ggggggg' }, - ], - }, - { - // Aaaaaaa -> usize - 'others': [], - }, - { - // -> Aaaaaaa - 'others': [ - { 'path': 'raw_pointer::Ccccccc', 'name': 'fffffff' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'ggggggg' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'ddddddd' }, - { 'path': 'raw_pointer', 'name': 'bbbbbbb' }, - ], - }, - { - // Aaaaaaa - 'others': [ - { 'path': 'raw_pointer', 'name': 'Aaaaaaa' }, - ], - 'in_args': [ - { 'path': 'raw_pointer::Ccccccc', 'name': 'fffffff' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'ggggggg' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'eeeeeee' }, - ], - 'returned': [ - { 'path': 'raw_pointer::Ccccccc', 'name': 'fffffff' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'ggggggg' }, - { 'path': 'raw_pointer::Ccccccc', 'name': 'ddddddd' }, - { 'path': 'raw_pointer', 'name': 'bbbbbbb' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/raw-pointer.rs b/src/test/rustdoc-js/raw-pointer.rs deleted file mode 100644 index b8ace2e0b..000000000 --- a/src/test/rustdoc-js/raw-pointer.rs +++ /dev/null @@ -1,24 +0,0 @@ -use std::ptr; - -pub struct Aaaaaaa {} - -pub fn bbbbbbb() -> *const Aaaaaaa { - ptr::null() -} - -pub struct Ccccccc {} - -impl Ccccccc { - pub fn ddddddd(&self) -> *const Aaaaaaa { - ptr::null() - } - pub fn eeeeeee(&self, _x: *const Aaaaaaa) -> i32 { - 0 - } - pub fn fffffff(&self, x: *const Aaaaaaa) -> *const Aaaaaaa { - x - } - pub fn ggggggg(&self, x: *mut Aaaaaaa) -> *mut Aaaaaaa { - x - } -} diff --git a/src/test/rustdoc-js/reexport.js b/src/test/rustdoc-js/reexport.js deleted file mode 100644 index 871e75d9b..000000000 --- a/src/test/rustdoc-js/reexport.js +++ /dev/null @@ -1,17 +0,0 @@ -// exact-check - -const QUERY = ['Subscriber', 'AnotherOne']; - -const EXPECTED = [ - { - 'others': [ - { 'path': 'reexport::fmt', 'name': 'Subscriber' }, - { 'path': 'reexport', 'name': 'FmtSubscriber' }, - ], - }, - { - 'others': [ - { 'path': 'reexport', 'name': 'AnotherOne' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/reexport.rs b/src/test/rustdoc-js/reexport.rs deleted file mode 100644 index d69b2901e..000000000 --- a/src/test/rustdoc-js/reexport.rs +++ /dev/null @@ -1,11 +0,0 @@ -// This test enforces that the (renamed) reexports are present in the search results. - -pub mod fmt { - pub struct Subscriber; -} -mod foo { - pub struct AnotherOne; -} - -pub use foo::AnotherOne; -pub use fmt::Subscriber as FmtSubscriber; diff --git a/src/test/rustdoc-js/search-short-types.js b/src/test/rustdoc-js/search-short-types.js deleted file mode 100644 index d14672af7..000000000 --- a/src/test/rustdoc-js/search-short-types.js +++ /dev/null @@ -1,10 +0,0 @@ -const QUERY = 'P'; - -const EXPECTED = { - 'others': [ - { 'path': 'search_short_types', 'name': 'P' }, - { 'path': 'search_short_types::VeryLongTypeName', 'name': 'p' }, - { 'path': 'search_short_types', 'name': 'Ap' }, - { 'path': 'search_short_types::VeryLongTypeName', 'name': 'ap' }, - ], -}; diff --git a/src/test/rustdoc-js/search-short-types.rs b/src/test/rustdoc-js/search-short-types.rs deleted file mode 100644 index a4083f9a7..000000000 --- a/src/test/rustdoc-js/search-short-types.rs +++ /dev/null @@ -1,74 +0,0 @@ -macro_rules! imp { - ($name:ident) => { - pub struct $name { - pub op: usize, - } - impl $name { - pub fn op() {} - pub fn cmp() {} - pub fn map() {} - pub fn pop() {} - pub fn ptr() {} - pub fn rpo() {} - pub fn drop() {} - pub fn copy() {} - pub fn zip() {} - pub fn sup() {} - pub fn pa() {} - pub fn pb() {} - pub fn pc() {} - pub fn pd() {} - pub fn pe() {} - pub fn pf() {} - pub fn pg() {} - pub fn ph() {} - pub fn pi() {} - pub fn pj() {} - pub fn pk() {} - pub fn pl() {} - pub fn pm() {} - pub fn pn() {} - pub fn po() {} - } - }; - ($name:ident, $($names:ident),*) => { - imp!($name); - imp!($($names),*); - }; -} -macro_rules! en { - ($name:ident) => { - pub enum $name { - Ptr, - Rp, - Rpo, - Pt, - Drop, - Dr, - Dro, - Sup, - Op, - Cmp, - Map, - Mp, - } - }; - ($name:ident, $($names:ident),*) => { - en!($name); - en!($($names),*); - }; -} - -imp!(Ot, Foo, Cmp, Map, Loc, Lac, Toc, Si, Sig, Sip, Psy, Psi, Py, Pi, Pa, Pb, Pc, Pd); -imp!(Pe, Pf, Pg, Ph, Pj, Pk, Pl, Pm, Pn, Po, Pq, Pr, Ps, Pt, Pu, Pv, Pw, Px, Pz, Ap, Bp, Cp); -imp!(Dp, Ep, Fp, Gp, Hp, Ip, Jp, Kp, Lp, Mp, Np, Op, Pp, Qp, Rp, Sp, Tp, Up, Vp, Wp, Xp, Yp, Zp); - -en!(Place, Plac, Plae, Plce, Pace, Scalar, Scalr, Scaar, Sclar, Salar); - -pub struct P; - -pub struct VeryLongTypeName; -impl VeryLongTypeName { - pub fn p() {} - pub fn ap() {} -} diff --git a/src/test/rustdoc-js/struct-like-variant.js b/src/test/rustdoc-js/struct-like-variant.js deleted file mode 100644 index f6deea51e..000000000 --- a/src/test/rustdoc-js/struct-like-variant.js +++ /dev/null @@ -1,7 +0,0 @@ -const QUERY = 'name'; - -const EXPECTED = { - 'others': [ - { 'path': 'struct_like_variant::Enum::Bar', 'name': 'name', 'desc': 'This is a name.' }, - ], -}; diff --git a/src/test/rustdoc-js/struct-like-variant.rs b/src/test/rustdoc-js/struct-like-variant.rs deleted file mode 100644 index 2f52a319a..000000000 --- a/src/test/rustdoc-js/struct-like-variant.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![crate_name = "struct_like_variant"] - -pub enum Enum { - Bar { - /// This is a name. - name: String - } -} diff --git a/src/test/rustdoc-js/substring.js b/src/test/rustdoc-js/substring.js deleted file mode 100644 index af05cd1ad..000000000 --- a/src/test/rustdoc-js/substring.js +++ /dev/null @@ -1,8 +0,0 @@ -const QUERY = 'waker_from'; - -const EXPECTED = { - 'others': [ - { 'path': 'substring::SuperWaker', 'name': 'local_waker_from_nonlocal' }, - { 'path': 'substring::SuperWakerTask', 'name': 'local_waker_from_nonlocal' }, - ], -}; diff --git a/src/test/rustdoc-js/substring.rs b/src/test/rustdoc-js/substring.rs deleted file mode 100644 index e729c722c..000000000 --- a/src/test/rustdoc-js/substring.rs +++ /dev/null @@ -1,21 +0,0 @@ -pub struct SuperWaker; - -impl SuperWaker { - pub fn local_waker_from_nonlocal() {} - pub fn local_waker_frm_nonlocal() {} - pub fn some_method() {} - pub fn some_other_method() {} - pub fn waker_non_local() {} - pub fn from_non_local() {} -} - -pub struct SuperWakerTask; - -impl SuperWakerTask { - pub fn local_waker_from_nonlocal() {} - pub fn local_waker_frm_nonlocal() {} - pub fn some_method() {} - pub fn some_other_method() {} - pub fn waker_non_local() {} - pub fn from_non_local() {} -} diff --git a/src/test/rustdoc-js/summaries.js b/src/test/rustdoc-js/summaries.js deleted file mode 100644 index dfb11e804..000000000 --- a/src/test/rustdoc-js/summaries.js +++ /dev/null @@ -1,21 +0,0 @@ -// ignore-tidy-linelength - -const QUERY = ['summaries', 'summaries::Sidebar', 'summaries::Sidebar2']; - -const EXPECTED = [ - { - 'others': [ - { 'path': '', 'name': 'summaries', 'desc': 'This <em>summary</em> has a link, [<code>code</code>], and <code>Sidebar2</code> intra-doc.' }, - ], - }, - { - 'others': [ - { 'path': 'summaries', 'name': 'Sidebar', 'desc': 'This <code>code</code> will be rendered in a code tag.' }, - ], - }, - { - 'others': [ - { 'path': 'summaries', 'name': 'Sidebar2', 'desc': '' }, - ], - }, -]; diff --git a/src/test/rustdoc-js/summaries.rs b/src/test/rustdoc-js/summaries.rs deleted file mode 100644 index 1ee1c34aa..000000000 --- a/src/test/rustdoc-js/summaries.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![crate_type = "lib"] -#![crate_name = "summaries"] - -#![allow(rustdoc::broken_intra_doc_links)] - -//! This *summary* has a [link], [`code`], and [`Sidebar2`] intra-doc. -//! -//! This is the second paragraph. It should not be rendered. -//! To test that intra-doc links are resolved properly, [`code`] should render -//! the square brackets, and [`Sidebar2`] should not. -//! -//! [link]: https://example.com - -/// This `code` will be rendered in a code tag. -/// -/// This text should not be rendered. -pub struct Sidebar; - -/// ```text -/// this block should not be rendered -/// ``` -pub struct Sidebar2; |