Skip to content

Commit

Permalink
Auto merge of #26696 - steveklabnik:rollup, r=steveklabnik
Browse files Browse the repository at this point in the history
- Successful merges: #26373, #26506, #26580, #26622, #26627, #26651, #26678, #26692
- Failed merges:
  • Loading branch information
bors committed Jun 30, 2015
2 parents dc309d7 + 08f9b98 commit bf3c979
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@ Rust is a fast systems programming language that guarantees
memory safety and offers painless concurrency ([no data races]).
It does not employ a garbage collector and has minimal runtime overhead.

This repo contains the code for `rustc`, the Rust compiler, as well
This repo contains the code for the compiler (`rustc`), as well
as standard libraries, tools and documentation for Rust.

[no data races]: http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html
Expand Down
8 changes: 5 additions & 3 deletions src/doc/trpl/documentation.md
Expand Up @@ -33,8 +33,10 @@ pub fn new(value: T) -> Rc<T> {
```
This code generates documentation that looks [like this][rc-new]. I've left the
implementation out, with a regular comment in its place. That's the first thing
to notice about this annotation: it uses `///`, instead of `//`. The triple slash
implementation out, with a regular comment in its place.
The first thing to notice about this annotation is that it uses
`///` instead of `//`. The triple slash
indicates a documentation comment.
Documentation comments are written in Markdown.
Expand Down Expand Up @@ -375,7 +377,7 @@ $ rustdoc --test path/to/my/crate/root.rs
$ cargo test
```

That's right, `cargo test` tests embedded documentation too. However,
That's right, `cargo test` tests embedded documentation too. However,
`cargo test` will not test binary crates, only library ones. This is
due to the way `rustdoc` works: it links against the library to be tested,
but with a binary, there’s nothing to link to.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/link-args.md
Expand Up @@ -17,7 +17,7 @@ Note that this feature is currently hidden behind the `feature(link_args)` gate
because this is not a sanctioned way of performing linking. Right now rustc
shells out to the system linker, so it makes sense to provide extra command line
arguments, but this will not always be the case. In the future rustc may use
LLVM directly to link native libraries in which case `link_args` will have no
LLVM directly to link native libraries, in which case `link_args` will have no
meaning.

It is highly recommended to *not* use this attribute, and rather use the more
Expand Down
45 changes: 23 additions & 22 deletions src/libcollections/fmt.rs
Expand Up @@ -128,15 +128,15 @@
//! This allows multiple actual types to be formatted via `{:x}` (like `i8` as
//! well as `isize`). The current mapping of types to traits is:
//!
//! * *nothing* ⇒ `Display`
//! * `?` ⇒ `Debug`
//! * `o` ⇒ `Octal`
//! * `x` ⇒ `LowerHex`
//! * `X` ⇒ `UpperHex`
//! * `p` ⇒ `Pointer`
//! * `b` ⇒ `Binary`
//! * `e` ⇒ `LowerExp`
//! * `E` ⇒ `UpperExp`
//! * *nothing* ⇒ [`Display`](trait.Display.html)
//! * `?` ⇒ [`Debug`](trait.Debug.html)
//! * `o` ⇒ [`Octal`](trait.Octal.html)
//! * `x` ⇒ [`LowerHex`](trait.LowerHex.html)
//! * `X` ⇒ [`UpperHex`](trait.UpperHex.html)
//! * `p` ⇒ [`Pointer`](trait.Pointer.html)
//! * `b` ⇒ [`Binary`](trait.Binary.html)
//! * `e` ⇒ [`LowerExp`](trait.LowerExp.html)
//! * `E` ⇒ [`UpperExp`](trait.UpperExp.html)
//!
//! What this means is that any type of argument which implements the
//! `fmt::Binary` trait can then be formatted with `{:b}`. Implementations
Expand Down Expand Up @@ -367,11 +367,11 @@
//! should always be printed.
//! * '-' - Currently not used
//! * '#' - This flag is indicates that the "alternate" form of printing should
//! be used. For array slices, the alternate form omits the brackets.
//! For the integer formatting traits, the alternate forms are:
//! be used. The alternate forms are:
//! * `#?` - pretty-print the `Debug` formatting
//! * `#x` - precedes the argument with a "0x"
//! * `#X` - precedes the argument with a "0x"
//! * `#t` - precedes the argument with a "0b"
//! * `#b` - precedes the argument with a "0b"
//! * `#o` - precedes the argument with a "0o"
//! * '0' - This is used to indicate for integer formats that the padding should
//! both be done with a `0` character as well as be sign-aware. A format
Expand Down Expand Up @@ -408,19 +408,20 @@
//!
//! There are three possible ways to specify the desired `precision`:
//!
//! There are three possible ways to specify the desired `precision`:
//! 1. An integer `.N`,
//! 2. an integer followed by dollar sign `.N$`, or
//! 3. an asterisk `.*`.
//! 1. An integer `.N`:
//!
//! the integer `N` itself is the precision.
//!
//! 2. An integer followed by dollar sign `.N$`:
//!
//! The first specification, `.N`, means the integer `N` itself is the precision.
//! use format *argument* `N` (which must be a `usize`) as the precision.
//!
//! The second, `.N$`, means use format *argument* `N` (which must be a `usize`) as the precision.
//! 3. An asterisk `.*`:
//!
//! Finally, `.*` means that this `{...}` is associated with *two* format inputs rather than one:
//! the first input holds the `usize` precision, and the second holds the value to print. Note
//! that in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part
//! refers to the *value* to print, and the `precision` must come in the input preceding `<arg>`.
//! `.*` means that this `{...}` is associated with *two* format inputs rather than one: the
//! first input holds the `usize` precision, and the second holds the value to print. Note that
//! in this case, if one uses the format string `{<arg>:<spec>.*}`, then the `<arg>` part refers
//! to the *value* to print, and the `precision` must come in the input preceding `<arg>`.
//!
//! For example, these:
//!
Expand Down
2 changes: 2 additions & 0 deletions src/libcore/cmp.rs
Expand Up @@ -166,6 +166,8 @@ impl Ordering {
///
/// - total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and
/// - transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
///
/// When this trait is `derive`d, it produces a lexicographic ordering.
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Ord: Eq + PartialOrd<Self> {
/// This method returns an `Ordering` between `self` and `other`.
Expand Down
5 changes: 4 additions & 1 deletion src/libcore/fmt/mod.rs
Expand Up @@ -267,7 +267,7 @@ impl<'a> Display for Arguments<'a> {
}
}

/// Format trait for the `:?` format. Useful for debugging, all types
/// Format trait for the `?` character. Useful for debugging, all types
/// should implement this.
///
/// Generally speaking, you should just `derive` a `Debug` implementation.
Expand Down Expand Up @@ -312,6 +312,9 @@ impl<'a> Display for Arguments<'a> {
/// There are a number of `debug_*` methods on `Formatter` to help you with manual
/// implementations, such as [`debug_struct`][debug_struct].
///
/// `Debug` implementations using either `derive` or the debug builder API
/// on `Formatter` support pretty printing using the alternate flag: `{:#?}`.
///
/// [debug_struct]: ../std/fmt/struct.Formatter.html#method.debug_struct
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented = "`{Self}` cannot be formatted using `:?`; if it is \
Expand Down

0 comments on commit bf3c979

Please sign in to comment.