diff options
| author | bors <bors@rust-lang.org> | 2018-07-19 00:56:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-19 00:56:21 +0000 |
| commit | 629d891499bca79aeb8ea079f756c566fdabbd3e (patch) | |
| tree | 57437d0b26123c42852dd692743584fcb35a631d /src/libcore | |
| parent | 166795dda66ce8132e2686923704d6bdcb5c2bc3 (diff) | |
| parent | ae9c550415f639791e83b4b058c69f2842a4ff5c (diff) | |
| download | rust-629d891499bca79aeb8ea079f756c566fdabbd3e.tar.gz rust-629d891499bca79aeb8ea079f756c566fdabbd3e.zip | |
Auto merge of #52486 - kennytm:rollup, r=kennytm
Rollup of 13 pull requests Successful merges: - #51628 (use checked write in `LineWriter` example) - #52116 (Handle array manually in str case conversion methods) - #52218 (Amend option.take examples) - #52418 (Do not use desugared ident when suggesting adding a type) - #52439 (Revert some changes from #51917 to fix custom libdir) - #52455 (Fix doc comment: use `?` instead of `.unwrap()`) - #52458 (rustc: Fix a suggestion for the `proc_macro` feature) - #52464 (Allow clippy to be installed with make install) - #52472 (rustc: Enable `use_extern_macros` in 2018 edition) - #52477 (Clarify short-circuiting behvaior of Iterator::zip.) - #52480 (Cleanup #24958) - #52487 (Don't build twice the sanitizers on Linux) - #52510 (rustdoc: remove FIXME about macro redirects) Failed merges: r? @ghost
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter/iterator.rs | 4 | ||||
| -rw-r--r-- | src/libcore/option.rs | 6 | ||||
| -rw-r--r-- | src/libcore/unicode/mod.rs | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/libcore/iter/iterator.rs b/src/libcore/iter/iterator.rs index c0681619bf8..afc273d265b 100644 --- a/src/libcore/iter/iterator.rs +++ b/src/libcore/iter/iterator.rs @@ -384,7 +384,9 @@ pub trait Iterator { /// /// In other words, it zips two iterators together, into a single one. /// - /// If either iterator returns [`None`], [`next`] will return [`None`]. + /// If either iterator returns [`None`], [`next`] from the zipped iterator + /// will return [`None`]. If the first iterator returns [`None`], `zip` will + /// short-circuit and `next` will not be called on the second iterator. /// /// # Examples /// diff --git a/src/libcore/option.rs b/src/libcore/option.rs index f3e823670aa..9f9dbd0777a 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -833,12 +833,14 @@ impl<T> Option<T> { /// /// ``` /// let mut x = Some(2); - /// x.take(); + /// let y = x.take(); /// assert_eq!(x, None); + /// assert_eq!(y, Some(2)); /// /// let mut x: Option<u32> = None; - /// x.take(); + /// let y = x.take(); /// assert_eq!(x, None); + /// assert_eq!(y, None); /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libcore/unicode/mod.rs b/src/libcore/unicode/mod.rs index b6b033adc04..e5cda880f88 100644 --- a/src/libcore/unicode/mod.rs +++ b/src/libcore/unicode/mod.rs @@ -20,6 +20,9 @@ pub(crate) mod version; pub mod derived_property { pub use unicode::tables::derived_property::{Case_Ignorable, Cased}; } +pub mod conversions { + pub use unicode::tables::conversions::{to_lower, to_upper}; +} // For use in libsyntax pub mod property { |
