diff --git a/tests/rustdoc/where.SWhere_Echo_impl.html b/tests/rustdoc/where.SWhere_Echo_impl.html new file mode 100644 index 0000000000000..7517eb090f496 --- /dev/null +++ b/tests/rustdoc/where.SWhere_Echo_impl.html @@ -0,0 +1,2 @@ +
pub struct Simd<T>(_)
where
- T: MyTrait;
\ No newline at end of file
+ T: MyTrait;
diff --git a/tests/rustdoc/where.alpha_trait_decl.html b/tests/rustdoc/where.alpha_trait_decl.html
new file mode 100644
index 0000000000000..a7700055c9a74
--- /dev/null
+++ b/tests/rustdoc/where.alpha_trait_decl.html
@@ -0,0 +1,3 @@
+pub struct Alpha<A>(_)
+where
+ A: MyTrait;
\ No newline at end of file
diff --git a/tests/rustdoc/where.bravo_trait_decl.html b/tests/rustdoc/where.bravo_trait_decl.html
new file mode 100644
index 0000000000000..00524201a8aca
--- /dev/null
+++ b/tests/rustdoc/where.bravo_trait_decl.html
@@ -0,0 +1,5 @@
+pub trait Bravo<B>where
+ B: MyTrait,{
+ // Required method
+ fn get(&self, B: B);
+}
\ No newline at end of file
diff --git a/tests/rustdoc/where.charlie_fn_decl.html b/tests/rustdoc/where.charlie_fn_decl.html
new file mode 100644
index 0000000000000..8e3bc8b01ecbd
--- /dev/null
+++ b/tests/rustdoc/where.charlie_fn_decl.html
@@ -0,0 +1,2 @@
+pub fn charlie<C>()where
+ C: MyTrait,
\ No newline at end of file
diff --git a/tests/rustdoc/where.golf_type_alias_decl.html b/tests/rustdoc/where.golf_type_alias_decl.html
new file mode 100644
index 0000000000000..8da5402f90073
--- /dev/null
+++ b/tests/rustdoc/where.golf_type_alias_decl.html
@@ -0,0 +1,2 @@
+pub type Golf<T>where
+ T: Clone, = (T, T);
\ No newline at end of file
diff --git a/tests/rustdoc/where.rs b/tests/rustdoc/where.rs
index 8b8a126e89dd5..2aa9c8b546193 100644
--- a/tests/rustdoc/where.rs
+++ b/tests/rustdoc/where.rs
@@ -5,16 +5,20 @@ use std::io::Lines;
pub trait MyTrait { fn dummy(&self) { } }
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha(_) 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"
+// @snapshot bravo_trait_decl - '//*[@class="rust item-decl"]/code'
pub trait Bravo where B: MyTrait { fn get(&self, B: B); }
// @has foo/fn.charlie.html '//pre' "pub fn charlie