Skip to content

Commit

Permalink
Auto merge of #33272 - Manishearth:rollup, r=Manishearth
Browse files Browse the repository at this point in the history
Rollup of 4 pull requests

- Successful merges: #33239, #33248, #33253, #33258
- Failed merges:
  • Loading branch information
bors committed Apr 29, 2016
2 parents c0c08e2 + f30058f commit e07e34c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
22 changes: 20 additions & 2 deletions src/doc/style/style/comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Comments [FIXME: needs RFC]
% Comments [RFC #505]

### Avoid block comments.

Expand Down Expand Up @@ -74,7 +74,25 @@ For example:

### Code snippets

> **[FIXME]**
Only use inner doc comments `//!` to write crate and module-level documentation,
nothing else. When using `mod` blocks, prefer `///` outside of the block:

```rust
/// This module contains tests
mod test {
// ...
}
```

over

```rust
mod test {
//! This module contains tests

// ...
}
```

### Avoid inner doc comments.

Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/style/features.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## `return` [FIXME: needs RFC]
## `return` [RFC #968]

Terminate `return` statements with semicolons:

Expand Down
15 changes: 13 additions & 2 deletions src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,19 @@
//! `0`.
//!
//! The value for the width can also be provided as a `usize` in the list of
//! parameters by using the `2$` syntax indicating that the second argument is a
//! `usize` specifying the width.
//! parameters by using the dollar syntax indicating that the second argument is
//! a `usize` specifying the width, for example:
//!
//! ```
//! // All of these print "Hello x !"
//! println!("Hello {:5}!", "x");
//! println!("Hello {:1$}!", "x", 5);
//! println!("Hello {1:0$}!", 5, "x");
//! ```
//!
//! Referring to an argument with the dollar syntax does not affect the "next
//! argument" counter, so it's usually a good idea to refer to all arguments by
//! their position explicitly.
//!
//! ## Precision
//!
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_save_analysis/dump_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,8 +1032,8 @@ impl<'v, 'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'v> for DumpVisitor<'l, 'tcx,
}

let sub_span = self.span
.sub_span_of_token(path.span, token::BinOp(token::Star));
if !self.span.filter_generated(sub_span, path.span) {
.sub_span_of_token(item.span, token::BinOp(token::Star));
if !self.span.filter_generated(sub_span, item.span) {
self.dumper.use_glob(UseGlobData {
span: sub_span.expect("No span found for use glob"),
id: item.id,
Expand Down

0 comments on commit e07e34c

Please sign in to comment.