diff options
| author | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2016-01-17 23:36:38 +0100 |
|---|---|---|
| committer | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2016-01-17 23:44:33 +0100 |
| commit | f4fac9b0fa55d253b438eccdf1794baace6c9efe (patch) | |
| tree | 43334e0497ae4e5b557e07035d4635d1b0b859a7 /src/libcore | |
| parent | bff52927f582e2ca8dea799bd58f06e654295e21 (diff) | |
| download | rust-f4fac9b0fa55d253b438eccdf1794baace6c9efe.tar.gz rust-f4fac9b0fa55d253b438eccdf1794baace6c9efe.zip | |
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.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/marker.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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, |
