Commit Graph

40423 Commits

Author SHA1 Message Date
bors
c5370be36e Auto merge of #23816 - frewsxcv:fromiterator-example, r=Manishearth 2015-03-29 16:54:40 +00:00
Corey Farwell
8fe7f1fa97 Add an example for FromIterator::from_iter 2015-03-29 10:32:53 -04:00
bors
b27ba527c5 Auto merge of #23831 - Manishearth:rollup, r=Manishearth
- Successful merges: #23811, #23814, #23817, #23821, #23829
- Failed merges:
2015-03-29 14:02:28 +00:00
Manish Goregaokar
9147463678 Rollup merge of #23829 - huachaohuang:master, r=Manishearth 2015-03-29 18:22:16 +05:30
Manish Goregaokar
963bf1db61 Rollup merge of #23821 - nicholasbishop:bishop-slice-iter-typo-fix, r=alexcrichton 2015-03-29 18:22:16 +05:30
Manish Goregaokar
a96ee9d962 Rollup merge of #23817 - phildawes:master, r=alexcrichton
Hello! I noticed that the email address in AUTHORS.txt doesn't point to my home email. Could somebody merge this patch to correct it please?

Thanks very much!
2015-03-29 18:22:16 +05:30
Manish Goregaokar
5daab4a25b Rollup merge of #23814 - steveklabnik:gh23320, r=alexcrichton
Fixes #23320
2015-03-29 18:22:15 +05:30
Manish Goregaokar
ef94b8a9d3 Rollup merge of #23811 - alexcrichton:libc-stable, r=Manishearth
Right now the `std::isize::BYTES` typedef is `#[unstable]`, but liblibc is using
this, preventing it from compiling on stable Rust.
2015-03-29 18:22:15 +05:30
bors
ea03ad9616 Auto merge of #23809 - cmr:issue-21310, r=Manishearth
This isn't really possible to test in an automatic way, since the only traits
you can negative impl are `Send` and `Sync`, and the implementors page for
those only exists in libstd.

Closes #21310
2015-03-29 11:12:26 +00:00
Huachao Huang
58c7d6f3e1 Fix typo 2015-03-29 18:22:01 +08:00
bors
fa3d778626 Auto merge of #23787 - steveklabnik:gh23760, r=alexcrichton
This was originally used to set up the guessing game, but that no longer
exists. This version uses `old_io`, and updating it involves talking
about `&mut` and such, which we haven't covered yet. So, for now, let's
just remove it.

Fixes #23760
2015-03-29 08:14:30 +00:00
bors
227b46bded Auto merge of #23810 - sfackler:debug-collections, r=alexcrichton
The collections debug helpers no longer prefix output with the
collection name, in line with the current conventions for Debug
implementations. Implementations that want to preserve the current
behavior can simply add a `try!(write!(fmt, "TypeName "));` at the
beginning of the `fmt` method.

[breaking-change]
2015-03-29 05:21:29 +00:00
Steven Fackler
3c0c8fc43a Oops fix output examples 2015-03-28 21:59:23 -07:00
bors
27af78c6dd Auto merge of #23819 - pnkfelix:kill-unsafe-dtor, r=pnkfelix
Port of pcwalton removal of `#[unsafe_destructor]` check.

Earlier commits impose rules on lifetimes that make generic destructors safe; thus we no longer need the `#[unsafe_destructor]` attribute nor its associated check.

----

So remove the check for the unsafe_destructor attribute.

And remove outdated compile-fail tests from when lifetime-parameteric dtors were disallowed/unsafe.

In addition, when one uses the attribute without the associated feature, report that the attribute is deprecated.

However, I do not think this is a breaking-change, because the attribute and feature are still currently accepted by the compiler. (After the next snapshot that has this commit, we can remove the feature itself and the attribute as well.)

----

I consider this to:

Fix #22196

(technically there is still the post snapshot work of removing the last remnants of the feature and the attribute, but the ticket can still be closed in my opinion).
2015-03-29 02:33:27 +00:00
Nicholas Bishop
256e78a39c Fix typo in docstring for slice 2015-03-28 22:06:42 -04:00
Felix S. Klock II
64c48f390c Port of pcwalton removal of #[unsafe_destructor] check.
Earlier commits impose rules on lifetimes that make generic
destructors safe; thus we no longer need the `#[unsafe_destructor]`
attribute nor its associated check.

----

So remove the check for the unsafe_destructor attribute.

And remove outdated compile-fail tests from when lifetime-parameteric
dtors were disallowed/unsafe.

In addition, when one uses the attribute without the associated
feature, report that the attribute is deprecated.

However, I do not think this is a breaking-change, because the
attribute and feature are still currently accepted by the compiler.
(After the next snapshot that has this commit, we can remove the
feature itself and the attribute as well.)

----

I consider this to:

Fix #22196

(techincally there is still the post snapshot work of removing the
last remants of the feature and the attribute, but the ticket can
still be closed in my opinion).
2015-03-29 00:19:19 +01:00
Steven Fackler
842e6cf63e Fold in debug builder doc examples 2015-03-28 15:51:57 -07:00
Phil Dawes
80c188e3c0 Correct Phil Dawes email address 2015-03-28 22:26:00 +00:00
bors
c89de2c56b Auto merge of #23300 - sfackler:rm-iterator-ext, r=alexcrichton
All methods are inlined into Iterator with `Self: Sized` bounds to make
sure Iterator is still object safe.

[breaking-change]

This is blocked on ICEs: https://gist.github.com/sfackler/5aff7c57cf8d896e2c6f
Seem to be similar to #23281.
2015-03-28 22:11:49 +00:00
Steven Fackler
d502f4221f Remove IteratorExt
All methods are inlined into Iterator with `Self: Sized` bounds to make
sure Iterator is still object safe.

[breaking-change]
2015-03-28 13:53:45 -07:00
Steve Klabnik
f6c234fb45 Document properties for Eq + Hash
Fixes #23320
2015-03-28 16:06:37 -04:00
Steve Klabnik
9fb54f87cc Remove standard io chapter from the book
This was originally used to set up the guessing game, but that no longer
exists. This version uses `old_io`, and updating it involves talking
about `&mut` and such, which we haven't covered yet. So, for now, let's
just remove it.

Fixes #23760
2015-03-28 14:29:29 -04:00
Steven Fackler
b82bcec7ce Fold collections debug impls
Also convert [T]'s Debug impl. The behavior of the alternate flag here's
changing.
2015-03-28 11:24:26 -07:00
Alex Crichton
bd66f57e46 libc: Don't use unstable apis
Right now the `std::isize::BYTES` typedef is `#[unstable]`, but liblibc is using
this, preventing it from compiling on stable Rust.
2015-03-28 10:49:45 -07:00
Steven Fackler
4037f2a368 Update debug helpers and add list builder
The collections debug helpers no longer prefix output with the
collection name, in line with the current conventions for Debug
implementations. Implementations that want to preserve the current
behavior can simply add a `try!(write!(fmt, "TypeName "));` at the
beginning of the `fmt` method.

[breaking-change]
2015-03-28 10:33:51 -07:00
bors
01f2c67c96 Auto merge of #23807 - vhbit:ios-int-drop, r=alexcrichton
None
2015-03-28 17:14:44 +00:00
Valerii Hiora
6b7c5b9f08 iOS: int/uint fallout 2015-03-28 17:18:03 +02:00
bors
3e7385aae9 Auto merge of #23806 - Manishearth:rollup, r=Manishearth
- Successful merges: #23332, #23751, #23788, #23803, #23804
- Failed merges:
2015-03-28 12:42:45 +00:00
Manish Goregaokar
95f4061c49 Rollup merge of #23804 - dnwade:patch-1, r=Manishearth
r? @steveklabnik
2015-03-28 18:12:06 +05:30
Manish Goregaokar
5eb4be4c56 Rollup merge of #23803 - richo:unused-braces, r=Manishearth
Pretty much what it says on the tin.
2015-03-28 18:12:06 +05:30
Manish Goregaokar
4aa17c80e6 Rollup merge of #23788 - steveklabnik:gh23748, r=alexcrichton
Fixes #23748
2015-03-28 18:12:04 +05:30
Manish Goregaokar
5299d36c52 Rollup merge of #23751 - tshepang:do-not-hardcode-the-growth, r=Manishearth
I found the arbitrary `10` surprising. A better method name, in such a case, would be `grow_by_10` :)
2015-03-28 18:12:04 +05:30
Manish Goregaokar
474062da5d Rollup merge of #23332 - jakub-:rustup-curl-silent-flag, r=brson
curl's progress meter would otherwise interfere with sudo's password prompt.

In addition, add the -f flag to make sure 4xx status codes are treated as errors.

r? @brson
2015-03-28 18:12:04 +05:30
Dan W.
aaf74d1c1b book: Fix typo
r? @steveklabnik
2015-03-28 03:31:51 -07:00
Richo Healey
cbce6bfbdb cleanup: Remove unused braces in use statements 2015-03-28 02:23:20 -07:00
bors
f8b6e28e75 Auto merge of #23799 - reem:error-no-send, r=aturon
The Send bound is an unnecessary restriction, and though provided as a convenience, can't be removed by downstream code.

The removal of this bound is a [breaking-change] since it removes an implicit Send bound on all `E: Error` and all `Error` trait objects.

To migrate, consider if your code actually requires the Send bound and, if so, add it explicitly.

Fixes #23774

r? @aturon
2015-03-28 09:09:50 +00:00
bors
9f9e2516b4 Auto merge of #23798 - alexcrichton:issue-23781, r=aturon
Previously a panic was generated for recursive prints due to a double-borrow of
a `RefCell`. This was solved by the second borrow's output being directed
towards the global stdout instead of the per-thread stdout (still experimental
functionality).

After this functionality was altered, however, recursive prints still deadlocked
due to the overridden `write_fmt` method which locked itself first and then
wrote all the data. This was fixed by removing the override of the `write_fmt`
method. This means that unlocked usage of `write!` on a `Stdout`/`Stderr` may be
slower due to acquiring more locks, but it's easy to make more performant with a
call to `.lock()`.

Closes #23781
2015-03-28 05:43:12 +00:00
Alex Crichton
e2fd2dffde std: Don't deadlock/panic on recursive prints
Previously a panic was generated for recursive prints due to a double-borrow of
a `RefCell`. This was solved by the second borrow's output being directed
towards the global stdout instead of the per-thread stdout (still experimental
functionality).

After this functionality was altered, however, recursive prints still deadlocked
due to the overridden `write_fmt` method which locked itself first and then
wrote all the data. This was fixed by removing the override of the `write_fmt`
method. This means that unlocked usage of `write!` on a `Stdout`/`Stderr` may be
slower due to acquiring more locks, but it's easy to make more performant with a
call to `.lock()`.

Closes #23781
2015-03-27 19:03:18 -07:00
bors
e58f05717d Auto merge of #23789 - steveklabnik:gh22716, r=alexcrichton
Fixes #22716
2015-03-28 01:55:50 +00:00
Jonathan Reem
3feeea59db Make std::error::Error not inherit from Send
The Send bound is an unnecessary restriction, and though provided as a
convenience, can't be removed by downstream code.

The removal of this bound is a [breaking-change] since it
removes an implicit Send bound on all `E: Error` and all
`Error` trait objects.

To migrate, consider if your code actually requires the Send
bound and, if so, add it explicitly.

Fixes #23774
2015-03-27 16:35:16 -07:00
bors
552080181c Auto merge of #23796 - alexcrichton:rollup, r=alexcrichton 2015-03-27 23:11:21 +00:00
Alex Crichton
d3a4f362cb rollup merge of #23786: alexcrichton/less-quotes
Conflicts:
	src/test/auxiliary/static-function-pointer-aux.rs
	src/test/auxiliary/trait_default_method_xc_aux.rs
	src/test/run-pass/issue-4545.rs
2015-03-27 16:10:25 -07:00
Alex Crichton
1c0e1a80e5 rollup merge of #23763: brson/installer 2015-03-27 16:09:54 -07:00
Alex Crichton
7e3fd148b3 Test fixes and rebase conflicts, round 3 2015-03-27 16:09:54 -07:00
Alex Crichton
990202cd0e rollup merge of #23794: brson/slicegate
Conflicts:
	src/test/run-pass/issue-13027.rs
2015-03-27 16:09:52 -07:00
Steve Klabnik
59d417a64a Note that zip and enumerate are similar
Fixes #22716
2015-03-27 18:32:46 -04:00
Steve Klabnik
e604382ad2 Explain why &self is common
Fixes #23748
2015-03-27 18:31:44 -04:00
Corey Richardson
8d6fb44c99 rustdoc: show negative impls properly in the implementors page
This isn't really possible to test in an automatic way, since the only traits
you can negative impl are `Send` and `Sync`, and the implementors page for
those only exists in libstd.

Closes #21310
2015-03-27 17:29:07 -04:00
Alex Crichton
d65fee28d3 Test fixes and rebase conflicts, round 2 2015-03-27 13:43:42 -07:00
Alex Crichton
1c78478c12 rollup merge of #23793: steveklabnik/gh21668
Fixes #21668
2015-03-27 13:04:38 -07:00