about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-01-19 04:08:59 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-01-19 04:08:59 +0530
commit49474313fd84a6cfc7443a96f76db93643ca30f7 (patch)
tree1769ba551a1fd7b19aa1c8b4a9ae8f0fea4a101e
parentf0e8594bce2a17351aabddc3440f047212a464f8 (diff)
parentf4fac9b0fa55d253b438eccdf1794baace6c9efe (diff)
downloadrust-49474313fd84a6cfc7443a96f76db93643ca30f7.tar.gz
rust-49474313fd84a6cfc7443a96f76db93643ca30f7.zip
Rollup merge of #30988 - bluss:doc-space-t-bound, r=apasel422
Fix spacing style of `T: Bound` in docs

The space between `T` and `Bound` is the typical style used in code and
produced by rustdoc's rendering. Fixed first in Reflect's docs and then
I fixed all occurrences in docs I could find.
-rw-r--r--src/doc/book/lifetimes.md4
-rw-r--r--src/doc/nomicon/lifetime-elision.md4
-rw-r--r--src/libcore/marker.rs10
3 files changed, 9 insertions, 9 deletions
diff --git a/src/doc/book/lifetimes.md b/src/doc/book/lifetimes.md
index 8bf90b4ea4d..4193c93c894 100644
--- a/src/doc/book/lifetimes.md
+++ b/src/doc/book/lifetimes.md
@@ -353,8 +353,8 @@ fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is
 fn get_mut(&mut self) -> &mut T; // elided
 fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
 
-fn args<T:ToCStr>(&mut self, args: &[T]) -> &mut Command; // elided
-fn args<'a, 'b, T:ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; // expanded
+fn args<T: ToCStr>(&mut self, args: &[T]) -> &mut Command; // elided
+fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; // expanded
 
 fn new(buf: &mut [u8]) -> BufWriter; // elided
 fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a>; // expanded
diff --git a/src/doc/nomicon/lifetime-elision.md b/src/doc/nomicon/lifetime-elision.md
index 41014f46dd9..bcd93a58d85 100644
--- a/src/doc/nomicon/lifetime-elision.md
+++ b/src/doc/nomicon/lifetime-elision.md
@@ -55,8 +55,8 @@ fn frob(s: &str, t: &str) -> &str;                      // ILLEGAL
 fn get_mut(&mut self) -> &mut T;                        // elided
 fn get_mut<'a>(&'a mut self) -> &'a mut T;              // expanded
 
-fn args<T:ToCStr>(&mut self, args: &[T]) -> &mut Command                  // elided
-fn args<'a, 'b, T:ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded
+fn args<T: ToCStr>(&mut self, args: &[T]) -> &mut Command                  // elided
+fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded
 
 fn new(buf: &mut [u8]) -> BufWriter;                    // elided
 fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a>          // expanded
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index 621dce3efc8..1ed2a219fac 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -333,7 +333,7 @@ macro_rules! impls{
 /// use std::marker::PhantomData;
 ///
 /// # #[allow(dead_code)]
-/// struct Slice<'a, T:'a> {
+/// struct Slice<'a, T: 'a> {
 ///     start: *const T,
 ///     end: *const T,
 ///     phantom: PhantomData<&'a T>
@@ -428,18 +428,18 @@ mod impls {
 /// use std::any::Any;
 ///
 /// # #[allow(dead_code)]
-/// fn foo<T:Reflect+'static>(x: &T) {
+/// fn foo<T: Reflect + 'static>(x: &T) {
 ///     let any: &Any = x;
 ///     if any.is::<u32>() { println!("u32"); }
 /// }
 /// ```
 ///
-/// Without the declaration `T:Reflect`, `foo` would not type check
+/// Without the declaration `T: Reflect`, `foo` would not type check
 /// (note: as a matter of style, it would be preferable to write
-/// `T:Any`, because `T:Any` implies `T:Reflect` and `T:'static`, but
+/// `T: Any`, because `T: Any` implies `T: Reflect` and `T: 'static`, but
 /// we use `Reflect` here to show how it works). The `Reflect` bound
 /// thus serves to alert `foo`'s caller to the fact that `foo` may
-/// behave differently depending on whether `T=u32` or not. In
+/// behave differently depending on whether `T = u32` or not. In
 /// particular, thanks to the `Reflect` bound, callers know that a
 /// function declared like `fn bar<T>(...)` will always act in
 /// precisely the same way no matter what type `T` is supplied,