Skip to content
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

Rollup of 23 pull requests #35747

Merged
merged 51 commits into from
Aug 17, 2016
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2ed052d
Clarify type declaration language
urschrei Aug 11, 2016
31da7f6
More clarification
urschrei Aug 11, 2016
91a2c25
Add note to docs for &str that example is to demo internals only
JessRudder Aug 11, 2016
d652639
run rustfmt on libsyntax_ext folder
srinivasreddy Jun 6, 2016
4e4d8ba
Add doc example for `std::ffi::CString::from_vec_unchecked`.
frewsxcv Aug 12, 2016
758aff7
Update note to include recommendation to use `.as_slice()`
JessRudder Aug 12, 2016
e173ead
provide additional justification for array interface design
matthew-piziak Aug 11, 2016
19a3337
Update E0207 label to report parameter type
terrynsun Aug 14, 2016
e586d21
Improve `No stdlib` and related Documentation
CryZe Aug 14, 2016
5286a5a
Update E0322 to new format
yossi-k Aug 14, 2016
a026e2c
Update error E0365 to new format
Xinayder Aug 14, 2016
6d998d6
Update E0392 to new error format
canova Aug 14, 2016
fa61f82
Update compiler error 0030 to use new error format.
silenuss Aug 15, 2016
9e39861
Fix spacing in code of closures.md
Rufflewind Jul 11, 2016
85bbbad
A disclaimer about keywords.
steveklabnik Jun 19, 2016
349f10a
update E0375 to new format
mikhail-m1 Aug 15, 2016
18edae4
expound on limitations of Rust's trait-based operator overloading
matthew-piziak Aug 15, 2016
c9f2055
accumulate into vector and assert, instead of printing
matthew-piziak Aug 15, 2016
2c9a1d9
remove `.take(10)` from `Range` example
matthew-piziak Aug 15, 2016
bc52bdc
Implement `Debug` for `std::vec::IntoIter`.
frewsxcv Aug 16, 2016
d52eb1a
RUST_NEW_ERROR_FORMAT is no more
sanxiyn Aug 16, 2016
3aa6340
Use UI test to test spans, instead of forced line break
sanxiyn Aug 16, 2016
16fc025
Bump version to 1.13
brson Aug 16, 2016
d2e7895
Updated E0422 to new error message
Aug 16, 2016
3caa451
Updated E0394 to new error message
Aug 16, 2016
193b9ae
update to new error format E0409
mikhail-m1 Aug 16, 2016
1fc18aa
Update E0005 to use a label
pythoneer Aug 16, 2016
4cfdf63
Update E0005 Unit-Test
pythoneer Aug 16, 2016
e83bff9
Rollup merge of #34370 - steveklabnik:keyword-ref-mention, r=Manishearth
Aug 17, 2016
d3f55e1
Rollup merge of #35415 - silenuss:e0030-formatting, r=jonathandturner
Aug 17, 2016
b8859f6
Rollup merge of #35595 - urschrei:associated_types_docfix, r=stevekla…
Aug 17, 2016
997a248
Rollup merge of #35610 - JessRudder:33637-doc-update-for-str-represen…
Aug 17, 2016
559bfd6
Rollup merge of #35613 - matthew-piziak:array-docs-trait-justificatio…
Aug 17, 2016
74549f8
Rollup merge of #35614 - srinivasreddy:syntax_ext_rustfmt, r=nikomats…
Aug 17, 2016
b444ac6
Rollup merge of #35621 - frewsxcv:cstring-from-vec-doc, r=peschkaj
Aug 17, 2016
a9e3cff
Rollup merge of #35660 - terrynsun:e0207, r=jonathandturner
Aug 17, 2016
ea09b7d
Rollup merge of #35663 - CryZe:no-stdlib, r=Manishearth
Aug 17, 2016
02a8e2c
Rollup merge of #35670 - RockyTV:e0365, r=jonathandturner
Aug 17, 2016
8ff8f77
Rollup merge of #35671 - canaltinova:E0392, r=jonathandturner
Aug 17, 2016
eac17f1
Rollup merge of #35672 - yossi-k:issue/35323, r=GuillaumeGomez
Aug 17, 2016
eb91d33
Rollup merge of #35681 - Rufflewind:patch-1, r=apasel422
Aug 17, 2016
f0f12d9
Rollup merge of #35686 - mikhail-m1:master, r=jonathandturner
Aug 17, 2016
49a2873
Rollup merge of #35690 - matthew-piziak:op-overloading-limited, r=ste…
Aug 17, 2016
c1e9ea0
Rollup merge of #35695 - matthew-piziak:vec-assert-over-println, r=Gu…
Aug 17, 2016
3dd060f
Rollup merge of #35707 - frewsxcv:vec-into-iter-debug, r=alexcrichton
Aug 17, 2016
6193b1f
Rollup merge of #35708 - sanxiyn:new-error-format, r=nikomatsakis
Aug 17, 2016
75454f7
Rollup merge of #35713 - sanxiyn:ui-test, r=nikomatsakis
Aug 17, 2016
5fc58dc
Rollup merge of #35722 - knight42:update-error-msg, r=jonathandturner
Aug 17, 2016
e20a7e3
Rollup merge of #35725 - brson:bump, r=alexcrichton
Aug 17, 2016
fbc62af
Rollup merge of #35726 - mikhail-m1:master2, r=jonathandturner
Aug 17, 2016
c216617
Rollup merge of #35731 - pythoneer:fix-35192, r=jonathandturner
Aug 17, 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
9 changes: 9 additions & 0 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
@@ -1713,6 +1713,15 @@ pub struct IntoIter<T> {
end: *const T,
}

#[stable(feature = "vec_intoiter_debug", since = "")]
impl<T: fmt::Debug> fmt::Debug for IntoIter<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("IntoIter")
.field(&self.as_slice())
.finish()
}
}

impl<T> IntoIter<T> {
/// Returns the remaining items of this iterator as a slice.
///
8 changes: 8 additions & 0 deletions src/libcollectionstest/vec.rs
Original file line number Diff line number Diff line change
@@ -501,6 +501,14 @@ fn test_into_iter_as_mut_slice() {
assert_eq!(into_iter.as_slice(), &['y', 'c']);
}

#[test]
fn test_into_iter_debug() {
let vec = vec!['a', 'b', 'c'];
let into_iter = vec.into_iter();
let debug = format!("{:?}", into_iter);
assert_eq!(debug, "IntoIter(['a', 'b', 'c'])");
}

#[test]
fn test_into_iter_count() {
assert_eq!(vec![1, 2, 3].into_iter().count(), 3);