Skip to content

Rollup of 8 pull requests #26696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jul 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1cf6a82
README: make it clear rustc is the compiler
tshepang Jun 17, 2015
0adda45
book: fix sentence
tshepang Jun 22, 2015
e13077f
book: whitespace
tshepang Jun 22, 2015
35abf86
Improve sentence flow.
adamheins Jun 25, 2015
7d0198d
test: fix some indents
tshepang Jun 27, 2015
516941b
fmt: Update docs and mention :#? pretty-printing
Jun 30, 2015
c158be0
Add E0195 error explanation
GuillaumeGomez Jun 29, 2015
20f22b7
Add E0093 error explanation
GuillaumeGomez Jun 30, 2015
ed6940f
Add E0094 error explanation
GuillaumeGomez Jun 30, 2015
0ba2db5
Add E0211 error explanation
GuillaumeGomez Jun 30, 2015
758ea34
Add E0092 error explanation
GuillaumeGomez Jun 30, 2015
edf6132
Add E0101 error explanation
GuillaumeGomez Jun 30, 2015
a481c4e
Add E0117 error explanation
GuillaumeGomez Jun 30, 2015
2881e83
Add E0207 error explanation
GuillaumeGomez Jun 30, 2015
be38926
Add E0119 error explanation
GuillaumeGomez Jun 30, 2015
bc1b43c
doc: add example for Stdin::read_line
tshepang Jun 27, 2015
9d64131
Rollup merge of #26373 - tshepang:patch-2, r=steveklabnik
steveklabnik Jun 30, 2015
96dd82f
Rollup merge of #26506 - tshepang:doc-fix, r=steveklabnik
steveklabnik Jun 30, 2015
bac3615
Rollup merge of #26580 - adamheins:master, r=steveklabnik
steveklabnik Jun 30, 2015
cf1c5b2
Rollup merge of #26622 - tshepang:indents, r=sanxiyn
steveklabnik Jun 30, 2015
825e48f
Rollup merge of #26627 - tshepang:stdin-example, r=steveklabnik
steveklabnik Jun 30, 2015
65b5c15
Rollup merge of #26651 - GuillaumeGomez:patch-2, r=Manishearth
steveklabnik Jun 30, 2015
26ff471
Rollup merge of #26678 - bluss:doc-fmt, r=steveklabnik
steveklabnik Jun 30, 2015
08f9b98
Rollup merge of #26692 - steveklabnik:gh26620, r=alexcrichton
steveklabnik Jun 30, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
5 changes: 4 additions & 1 deletion src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
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
Loading