Skip to content

Rollup of 15 pull requests #33441

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

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f7e1421
Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets, (re-)including r…
pnkfelix Apr 28, 2016
27c01cb
Add process types documentation
GuillaumeGomez Apr 28, 2016
2d15690
Doc improvement on std::fmt module
GuillaumeGomez May 1, 2016
47d9f49
Remove rust flags from doc block
GuillaumeGomez May 1, 2016
e3f1312
dep_graph: avoid panicking in thread when channel closed
birkenfeld May 1, 2016
eba43fb
std::thread docs: spawn() returns not a Thread anymore
birkenfeld May 1, 2016
b75f81c
parser: do not try to continue with `unsafe` on foreign fns
birkenfeld May 2, 2016
a11ddb3
Replace copy-pasted variable name with relevant one
shepmaster May 4, 2016
2ca3120
errors in the doc
kindlychung May 4, 2016
16219de
Update iterator.rs
kindlychung May 4, 2016
3371b8a
Add detailed error explanation for E0504
cramertj May 3, 2016
d1c487e
Add an example to Wrapping's documentation.
fiveop May 5, 2016
a22ca28
[Doc] Default cpu is "generic" (and not "default")
phil-opp May 5, 2016
39eec80
mk: Fix building with --enable-ccache
alexcrichton May 1, 2016
2912bfb
doc: Update reference with better description of target_env
brson May 5, 2016
26eb2be
Fix some some duplicate words.
birkenfeld May 5, 2016
ced4a18
Rollup merge of #33129 - GuillaumeGomez:fmt_doc, r=steveklabnik
steveklabnik May 5, 2016
59abe40
Rollup merge of #33256 - pnkfelix:add-rustc-specific-tags-files, r=ni…
steveklabnik May 5, 2016
35ff573
Rollup merge of #33283 - GuillaumeGomez:process_doc, r=steveklabnik
steveklabnik May 5, 2016
181a678
Rollup merge of #33313 - birkenfeld:depgraph-panic, r=nikomatsakis
steveklabnik May 5, 2016
bad6402
Rollup merge of #33314 - alexcrichton:fix-enable-ccache, r=pnkfelix
steveklabnik May 5, 2016
ef66149
Rollup merge of #33326 - birkenfeld:issue-33321, r=GuillaumeGomez
steveklabnik May 5, 2016
bc743e7
Rollup merge of #33336 - birkenfeld:issue-27361, r=sfackler
steveklabnik May 5, 2016
31755bf
Rollup merge of #33386 - cramertj:E0504, r=steveklabnik
steveklabnik May 5, 2016
ed9244a
Rollup merge of #33402 - shepmaster:copied-variable-name, r=Manishearth
steveklabnik May 5, 2016
551b990
Rollup merge of #33409 - kindlychung:patch-2, r=steveklabnik
steveklabnik May 5, 2016
7e3c61f
Rollup merge of #33410 - GuillaumeGomez:explain, r=Manishearth
steveklabnik May 5, 2016
a6fbe0c
Rollup merge of #33428 - fiveop:wrapping_example, r=steveklabnik
steveklabnik May 5, 2016
10f2d07
Rollup merge of #33430 - phil-opp:patch-1, r=alexcrichton
steveklabnik May 5, 2016
e1ce889
Rollup merge of #33437 - brson:trips, r=Manishearth
steveklabnik May 5, 2016
cb9238a
Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnik
steveklabnik May 5, 2016
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
Prev Previous commit
Next Next commit
Doc improvement on std::fmt module
  • Loading branch information
GuillaumeGomez committed May 1, 2016
commit 2d156908569728151acdc8c9683e915d1f56f1ea
12 changes: 12 additions & 0 deletions src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,24 @@ use string;
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::fmt;
///
/// let s = fmt::format(format_args!("Hello, {}!", "world"));
/// assert_eq!(s, "Hello, world!".to_string());
/// ```
///
/// Please note that using `[format!]` might be preferrable.
/// Example:
///
/// ```
/// let s = format!("Hello, {}!", "world");
/// assert_eq!(s, "Hello, world!".to_string());
/// ```
///
/// [format!]: ../std/macro.format!.html
#[stable(feature = "rust1", since = "1.0.0")]
pub fn format(args: Arguments) -> string::String {
let mut output = string::String::new();
Expand Down
26 changes: 26 additions & 0 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,32 @@ pub trait UpperExp {
///
/// * output - the buffer to write output to
/// * args - the precompiled arguments generated by `format_args!`
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use std::fmt;
///
/// let mut output = String::new();
/// fmt::write(&mut output, format_args!("Hello {}!", "world"))
/// .expect("Error occurred while trying to write in String");
/// assert_eq!(output, "Hello world!");
/// ```
///
/// Please note that using [write!][write_macro] might be preferrable. Example:
///
/// ```
/// use std::fmt::Write;
///
/// let mut output = String::new();
/// write!(&mut output, "Hello {}!", "world")
/// .expect("Error occurred while trying to write in String");
/// assert_eq!(output, "Hello world!");
/// ```
///
/// [write_macro]: ../std/macro.write!.html
#[stable(feature = "rust1", since = "1.0.0")]
pub fn write(output: &mut Write, args: Arguments) -> Result {
let mut formatter = Formatter {
Expand Down