Skip to content

Commit

Permalink
Auto merge of #26272 - Manishearth:rollup, r=Manishearth
Browse files Browse the repository at this point in the history
- Successful merges: #26255, #26256, #26257, #26259, #26260
- Failed merges:
  • Loading branch information
bors committed Jun 13, 2015
2 parents a279826 + 023f661 commit b850046
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/doc/trpl/associated-types.md
Expand Up @@ -43,7 +43,7 @@ trait Graph {
Now, our clients can be abstract over a given `Graph`:

```rust,ignore
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> usize { ... }
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> u32 { ... }
```

No need to deal with the `E`dge type here!
Expand Down
11 changes: 5 additions & 6 deletions src/doc/trpl/iterators.md
Expand Up @@ -285,8 +285,7 @@ has no side effect on the original iterator. Let's try it out with our infinite
iterator from before:

```rust
# #![feature(step_by)]
for i in (1..).step_by(5).take(5) {
for i in (1..).take(5) {
println!("{}", i);
}
```
Expand All @@ -295,10 +294,10 @@ This will print

```text
1
6
11
16
21
2
3
4
5
```

`filter()` is an adapter that takes a closure as an argument. This closure
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/lifetimes.md
Expand Up @@ -305,7 +305,7 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
fn get_str() -> &str; // ILLEGAL, no inputs
fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is ambiguous
fn get_mut(&mut self) -> &mut T; // elided
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
Expand Down
26 changes: 16 additions & 10 deletions src/librustc_unicode/char.rs
Expand Up @@ -187,22 +187,16 @@ impl char {
/// # Examples
///
/// ```
/// for i in '❤'.escape_unicode() {
/// println!("{}", i);
/// for c in '❤'.escape_unicode() {
/// print!("{}", c);
/// }
/// println!("");
/// ```
///
/// This prints:
///
/// ```text
/// \
/// u
/// {
/// 2
/// 7
/// 6
/// 4
/// }
/// \u{2764}
/// ```
///
/// Collecting into a `String`:
Expand Down Expand Up @@ -467,6 +461,12 @@ impl char {
/// Returns an iterator which yields the characters corresponding to the
/// lowercase equivalent of the character. If no conversion is possible then
/// an iterator with just the input character is returned.
///
/// # Examples
///
/// ```
/// assert_eq!(Some('c'), 'C'.to_lowercase().next());
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn to_lowercase(self) -> ToLowercase {
Expand Down Expand Up @@ -515,6 +515,12 @@ impl char {
/// [`SpecialCasing.txt`]: ftp://ftp.unicode.org/Public/UNIDATA/SpecialCasing.txt
///
/// [2]: http://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992
///
/// # Examples
///
/// ```
/// assert_eq!(Some('C'), 'c'.to_uppercase().next());
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
pub fn to_uppercase(self) -> ToUppercase {
Expand Down

0 comments on commit b850046

Please sign in to comment.