diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/rustdoc-gui/src/lib2/lib.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/src/lib2/lib.rs b/src/test/rustdoc-gui/src/lib2/lib.rs index 87f91be3a..24aecc70d 100644 --- a/src/test/rustdoc-gui/src/lib2/lib.rs +++ b/src/test/rustdoc-gui/src/lib2/lib.rs @@ -38,11 +38,14 @@ pub trait Trait { #[deprecated = "Whatever [`Foo`](#tadam)"] fn foo() {} + fn fooo(); } impl Trait for Foo { type X = u32; const Y: u32 = 0; + + fn fooo() {} } impl implementors::Whatever for Foo { @@ -143,3 +146,40 @@ pub struct LongItemInfo2; /// Some docs. #[doc(cfg(any(target_os = "android", target_os = "linux", target_os = "emscripten", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd")))] impl SimpleTrait for LongItemInfo2 {} + +pub struct WhereWhitespace<T>; + +impl<T> WhereWhitespace<T> { + pub fn new<F>(f: F) -> Self + where + F: FnMut() -> i32, + {} +} + +impl<K, T> Whitespace<&K> for WhereWhitespace<T> +where + K: std::fmt::Debug, +{ + type Output = WhereWhitespace<T>; + fn index(&self, _key: &K) -> &Self::Output { + self + } +} + +pub trait Whitespace<Idx> +where + Idx: ?Sized, +{ + type Output; + fn index(&self, index: Idx) -> &Self::Output; +} + +pub struct ItemInfoAlignmentTest; + +impl ItemInfoAlignmentTest { + /// This method has docs + #[deprecated] + pub fn foo() {} + #[deprecated] + pub fn bar() {} +} |