about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-03-20 22:41:19 +0100
committerBen Striegel <ben.striegel@gmail.com>2017-03-21 16:22:15 -0400
commitf53172287a4ebb57e8372ce2647628887a268696 (patch)
tree2d32e670a8b2560dba44d69ef7e6fac39a27c51e /src/test/rustdoc
parent58c701f5c7dc26d9b55c631006ece52abe1ddce2 (diff)
Add whitespace around "=" in assoc items
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/doc-assoc-item.rs28
-rw-r--r--src/test/rustdoc/issue-20646.rs4
2 files changed, 30 insertions, 2 deletions
diff --git a/src/test/rustdoc/doc-assoc-item.rs b/src/test/rustdoc/doc-assoc-item.rs
new file mode 100644
index 00000000000..36f44295953
--- /dev/null
+++ b/src/test/rustdoc/doc-assoc-item.rs
@@ -0,0 +1,28 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo<T> {
+    x: T,
+}
+
+pub trait Bar {
+    type Fuu;
+
+    fn foo(foo: Self::Fuu);
+}
+
+// @has doc_assoc_item/struct.Foo.html '//*[@class="impl"]' 'impl<T: Bar<Fuu = u32>> Foo<T>'
+impl<T: Bar<Fuu = u32>> Foo<T> {
+    pub fn new(t: T) -> Foo<T> {
+        Foo {
+            x: t,
+        }
+    }
+}
diff --git a/src/test/rustdoc/issue-20646.rs b/src/test/rustdoc/issue-20646.rs
index 87c40d11579..49fac20035f 100644
--- a/src/test/rustdoc/issue-20646.rs
+++ b/src/test/rustdoc/issue-20646.rs
@@ -23,7 +23,7 @@ pub trait Trait {
 }
 
 // @has issue_20646/fn.fun.html \
-//      '//*[@class="rust fn"]' 'where T: Trait<Output=i32>'
+//      '//*[@class="rust fn"]' 'where T: Trait<Output = i32>'
 pub fn fun<T>(_: T) where T: Trait<Output=i32> {}
 
 pub mod reexport {
@@ -31,6 +31,6 @@ pub mod reexport {
     //      '//*[@id="associatedtype.Output"]' \
     //      'type Output'
     // @has issue_20646/reexport/fn.fun.html \
-    //      '//*[@class="rust fn"]' 'where T: Trait<Output=i32>'
+    //      '//*[@class="rust fn"]' 'where T: Trait<Output = i32>'
     pub use issue_20646::{Trait, fun};
 }