Skip to content

Commit 4947431

Browse files
committedJan 18, 2016
Rollup merge of rust-lang#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.
2 parents f0e8594 + f4fac9b commit 4947431

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎src/doc/book/lifetimes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is
353353
fn get_mut(&mut self) -> &mut T; // elided
354354
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
355355
356-
fn args<T:ToCStr>(&mut self, args: &[T]) -> &mut Command; // elided
357-
fn args<'a, 'b, T:ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; // expanded
356+
fn args<T: ToCStr>(&mut self, args: &[T]) -> &mut Command; // elided
357+
fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; // expanded
358358
359359
fn new(buf: &mut [u8]) -> BufWriter; // elided
360360
fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a>; // expanded

‎src/doc/nomicon/lifetime-elision.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ fn frob(s: &str, t: &str) -> &str; // ILLEGAL
5555
fn get_mut(&mut self) -> &mut T; // elided
5656
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
5757
58-
fn args<T:ToCStr>(&mut self, args: &[T]) -> &mut Command // elided
59-
fn args<'a, 'b, T:ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded
58+
fn args<T: ToCStr>(&mut self, args: &[T]) -> &mut Command // elided
59+
fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded
6060
6161
fn new(buf: &mut [u8]) -> BufWriter; // elided
6262
fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a> // expanded

‎src/libcore/marker.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ macro_rules! impls{
333333
/// use std::marker::PhantomData;
334334
///
335335
/// # #[allow(dead_code)]
336-
/// struct Slice<'a, T:'a> {
336+
/// struct Slice<'a, T: 'a> {
337337
/// start: *const T,
338338
/// end: *const T,
339339
/// phantom: PhantomData<&'a T>
@@ -428,18 +428,18 @@ mod impls {
428428
/// use std::any::Any;
429429
///
430430
/// # #[allow(dead_code)]
431-
/// fn foo<T:Reflect+'static>(x: &T) {
431+
/// fn foo<T: Reflect + 'static>(x: &T) {
432432
/// let any: &Any = x;
433433
/// if any.is::<u32>() { println!("u32"); }
434434
/// }
435435
/// ```
436436
///
437-
/// Without the declaration `T:Reflect`, `foo` would not type check
437+
/// Without the declaration `T: Reflect`, `foo` would not type check
438438
/// (note: as a matter of style, it would be preferable to write
439-
/// `T:Any`, because `T:Any` implies `T:Reflect` and `T:'static`, but
439+
/// `T: Any`, because `T: Any` implies `T: Reflect` and `T: 'static`, but
440440
/// we use `Reflect` here to show how it works). The `Reflect` bound
441441
/// thus serves to alert `foo`'s caller to the fact that `foo` may
442-
/// behave differently depending on whether `T=u32` or not. In
442+
/// behave differently depending on whether `T = u32` or not. In
443443
/// particular, thanks to the `Reflect` bound, callers know that a
444444
/// function declared like `fn bar<T>(...)` will always act in
445445
/// precisely the same way no matter what type `T` is supplied,

0 commit comments

Comments
 (0)