Skip to content

Commit 3c29d7a

Browse files
committed
---
yaml --- r: 232809 b: refs/heads/try c: e33650c h: refs/heads/master i: 232807: 0bd1d17 v: v3
1 parent de67e58 commit 3c29d7a

File tree

6 files changed

+28
-46
lines changed

6 files changed

+28
-46
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 5d955e17404778fb4db5fc33d732ac2738f76f34
4+
refs/heads/try: e33650c16fec1ed8dcdbfc0aa3eac33ceece34d3
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/doc/trpl/ffi.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,9 @@ strings are not terminated with `\0`. If you need a NUL-terminated string for
496496
interoperability with C, you should use the `CString` type in the `std::ffi`
497497
module.
498498

499-
The [`libc` crate on crates.io][libc] includes type aliases and function
500-
definitions for the C standard library in the `libc` module, and Rust links
501-
against `libc` and `libm` by default.
502-
503-
[libc]: https://crates.io/crates/libc
499+
The standard library includes type aliases and function definitions for the C
500+
standard library in the `libc` module, and Rust links against `libc` and `libm`
501+
by default.
504502

505503
# The "nullable pointer optimization"
506504

branches/try/src/libcollections/fmt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ pub use core::fmt::{LowerHex, UpperHex, Pointer};
481481
pub use core::fmt::{LowerExp, UpperExp};
482482
pub use core::fmt::Error;
483483
pub use core::fmt::{ArgumentV1, Arguments, write, radix, Radix, RadixFmt};
484-
pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
485484

486485
use string;
487486

branches/try/src/libcore/str/mod.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,18 @@ impl<'a> DoubleEndedIterator for Chars<'a> {
292292
}
293293
}
294294

295+
impl<'a> Chars<'a> {
296+
/// View the underlying data as a subslice of the original data.
297+
///
298+
/// This has the same lifetime as the original slice, and so the
299+
/// iterator can continue to be used while this exists.
300+
#[unstable(feature = "iter_to_slice", issue = "27775")]
301+
#[inline]
302+
pub fn as_str(&self) -> &'a str {
303+
unsafe { from_utf8_unchecked(self.iter.as_slice()) }
304+
}
305+
}
306+
295307
/// Iterator for a string's characters and their byte offsets.
296308
#[derive(Clone)]
297309
#[stable(feature = "rust1", since = "1.0.0")]
@@ -339,6 +351,18 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {
339351
}
340352
}
341353

354+
impl<'a> CharIndices<'a> {
355+
/// View the underlying data as a subslice of the original data.
356+
///
357+
/// This has the same lifetime as the original slice, and so the
358+
/// iterator can continue to be used while this exists.
359+
#[unstable(feature = "iter_to_slice", issue = "27775")]
360+
#[inline]
361+
pub fn as_str(&self) -> &'a str {
362+
self.iter.as_str()
363+
}
364+
}
365+
342366
/// External iterator for a string's bytes.
343367
/// Use with the `std::iter` module.
344368
///

branches/try/src/libstd/macros.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,6 @@ macro_rules! panic {
6767
/// Note that stdout is frequently line-buffered by default so it may be
6868
/// necessary to use `io::stdout().flush()` to ensure the output is emitted
6969
/// immediately.
70-
///
71-
/// # Examples
72-
///
73-
/// ```
74-
/// use std::io::{self, Write};
75-
///
76-
/// print!("this ");
77-
/// print!("will ");
78-
/// print!("be ");
79-
/// print!("on ");
80-
/// print!("the ");
81-
/// print!("same ");
82-
/// print!("line ");
83-
///
84-
/// io::stdout().flush().unwrap();
85-
///
86-
/// print!("this string has a newline, why not choose println! instead?\n");
87-
///
88-
/// io::stdout().flush().unwrap();
89-
/// ```
9070
#[macro_export]
9171
#[stable(feature = "rust1", since = "1.0.0")]
9272
#[allow_internal_unstable]

branches/try/src/test/run-pass/issue-20803.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)