Commit Graph

38701 Commits

Author SHA1 Message Date
bors
0b664bb843 Auto merge of #22517 - brson:relnotes, r=Gankro
p=1 please
2015-02-19 10:54:08 +00:00
bors
149f002437 Auto merge of #22497 - nikomatsakis:suffixes, r=alexcrichton
The old suffixes now issue warnings unless a feature-gate is given.

Fixes #22496.

r? @alexcrichton
2015-02-19 07:59:27 +00:00
Brian Anderson
c4bb064b3a Update AUTHORS.txt and RELEASES.md 2015-02-18 17:02:34 -08:00
bors
22992358bc Auto merge of #22436 - nikomatsakis:issue-22246-bound-lifetimes-of-assoc-types, r=nikomatsakis
Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.)

r? @pnkfelix (for now, anyway)
cc @aturon 

[implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
2015-02-18 23:58:38 +00:00
Niko Matsakis
9bb3b3772d Add rustc_attrs feature to test. 2015-02-18 15:24:20 -05:00
Niko Matsakis
a994a99ec4 Always prefer where-clauses over impls in trait selection. Fixes #22110. 2015-02-18 15:23:34 -05:00
Niko Matsakis
2939e483fd Extend the implicator so it produces general obligations and also so
that it produces "outlives" relations for associated types. Add
several tests relating to #22246.
2015-02-18 15:23:34 -05:00
Niko Matsakis
5511add742 traits: break apart the "full normalization" code used for normalizing
parameter environments so that it can be used elsewhere.
2015-02-18 15:23:34 -05:00
Niko Matsakis
7134ad4d64 Move tcx from Typer into ClosureTyper 2015-02-18 15:23:34 -05:00
Niko Matsakis
e84a719e37 Misc. cleanup in regionck: Remove a one-variant enum for some reason. 2015-02-18 15:23:34 -05:00
Niko Matsakis
48c70d6863 Replace assert_no_late_bound_regions with
`no_late_bound_regions().unwrap()`, which allows us to write code that
doesn't necessarily *fail* when there are higher-ranked trait bounds.
2015-02-18 15:23:34 -05:00
Niko Matsakis
92d65ab2e9 Rename various things to "implications" 2015-02-18 15:23:33 -05:00
Niko Matsakis
df92fe3c96 Rename regionmanip to implicator. 2015-02-18 15:23:33 -05:00
Niko Matsakis
811c48fe22 For now, accept the i, u, is, and us suffixes, but warn when
they are used without a feature-gate. This is both kinder to existing
code and should make it easier to land this PR, since we don't
have to catch EVERY SINGLE SUFFIX.
2015-02-18 15:08:40 -05:00
Niko Matsakis
362d713026 Fix remaining bench/debuginfo tests (and a few stragglers) 2015-02-18 09:11:02 -05:00
Niko Matsakis
72eb214ee4 Update suffixes en masse in tests using perl -p -i -e 2015-02-18 09:10:10 -05:00
Niko Matsakis
8c34b26606 Update docs by dropping suffixes except where they served to instruct. 2015-02-18 09:09:14 -05:00
Niko Matsakis
1f4ee20dda Tweak pretty printing. 2015-02-18 09:09:13 -05:00
Niko Matsakis
01615b04c6 Convert required suffixes into a use of as. 2015-02-18 09:09:13 -05:00
Niko Matsakis
2b5720a15f Remove i, is, u, or us suffixes that are not necessary. 2015-02-18 09:09:12 -05:00
Niko Matsakis
700c518f2a Modify parser to require isize/usize suffixes. 2015-02-18 09:07:56 -05:00
Huon Wilson
dfc5c0f1e8 Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
One windows bot failed spuriously.
2015-02-18 23:50:21 +11:00
Alex Crichton
47f91a9484 Register new snapshots 2015-02-17 22:04:31 -08:00
Alex Crichton
665ea963d3 Test fixes and rebase conflicts 2015-02-17 19:42:28 -08:00
Alex Crichton
ba8ce4c2c2 rollup merge of #22319: huonw/send-is-not-static
Conflicts:
	src/libstd/sync/task_pool.rs
	src/libstd/thread.rs
	src/libtest/lib.rs
	src/test/bench/shootout-reverse-complement.rs
	src/test/bench/shootout-spectralnorm.rs
2015-02-17 17:32:16 -08:00
Alex Crichton
6ac3799b75 Test fixes and rebase conflicts 2015-02-17 17:27:46 -08:00
Alex Crichton
b283881dcc rollup merge of #22394: alexcrichton/vec-from-iter-comment
Requested by Niko in #22200 (and is good to have anyway)
2015-02-17 17:27:46 -08:00
Alex Crichton
d8450d69bb rollup merge of #22435: aturon/final-stab-thread
Conflicts:
	src/test/bench/rt-messaging-ping-pong.rs
	src/test/bench/rt-parfib.rs
	src/test/bench/task-perf-spawnalot.rs
2015-02-17 17:27:44 -08:00
Alex Crichton
c14cf4dc86 rollup merge of #22460: ArtemGr/patch-1
An "immutable reference-counted pointer" is confusing, one might think that the `Rc` itself is immutable which isn't the case.
cf. http://www.reddit.com/r/rust/comments/2w75wr/how_do_i_read_immutable_vector_inside_a_spawned/coo6mm2
2015-02-17 17:27:01 -08:00
Alex Crichton
d8ba8b00a7 rollup merge of #22459: alexcrichton/feature-names
Conflicts:
	src/rustbook/main.rs
2015-02-17 17:26:59 -08:00
Alex Crichton
c166fd3041 rollup merge of #22457: steveklabnik/gh22361
FIxes #22361
2015-02-17 17:26:45 -08:00
Alex Crichton
fd5403a37a rollup merge of #22456: steveklabnik/fix_grammar
Noticed in #22429
2015-02-17 17:26:44 -08:00
Alex Crichton
6d7a5e7094 rollup merge of #22455: msiemens/add-vec-from_elem
Implement `Vec::from_elem` by making the `vec![element; len]` macro more powerful (see rust-lang/rfcs#832).

Closes #22414

r? @Gankro
2015-02-17 17:26:44 -08:00
Alex Crichton
f10f7f52b0 rollup merge of #22454: alexcrichton/stabilize-into-iterator
Now that the necessary associated types exist for the `IntoIterator` trait this
commit stabilizes the trait as-is as well as all existing implementations.
2015-02-17 17:26:44 -08:00
Alex Crichton
d25d044a01 rollup merge of #22441: msiemens/typo_fix 2015-02-17 17:26:44 -08:00
Alex Crichton
f807b6a61e rollup merge of #22440: semarie/openbsd-connect_error
The `connect_error` test check if connecting to "0.0.0.0:1" works (it
shouldn't). And in case of error, the test expects a `ConnectionRefused`
error.

Under OpenBSD, trying to connect to "0.0.0.0" isn't a `ConnectionRefused`:
it is an `InvalidInput` error.

The patch allow the error to be `ConnectionRefused` or `InvalidInput`.

Another possibility is to check connecting to "127.0.0.1:1" and expects only `ConnectionRefused` error.
2015-02-17 17:26:44 -08:00
Alex Crichton
02c276175a rollup merge of #22332: dotdash/llvmup_20150213
Fixes the crash blocking #21886.
2015-02-17 17:26:43 -08:00
Alex Crichton
25ccf3c0da rollup merge of #22331: steveklabnik/guidelines
Fixes #19315

r? @aturon
2015-02-17 17:26:43 -08:00
Huon Wilson
7a14f4994e Update tests for the Send - 'static change. 2015-02-18 11:27:51 +11:00
Alex Crichton
95a28c9bbd std: Add Vec::from_iter comment
Requested by Niko in #22200 (and is good to have anyway)
2015-02-17 15:23:41 -08:00
Aaron Turon
d0de2b46e9 Fallout from stabilization 2015-02-17 15:14:17 -08:00
Alex Crichton
eca2453a02 rollup merge of #22208: aturon/expose-more-path
This commit exposes the `is_sep` function and `MAIN_SEP` constant, as
well as Windows path prefixes. The path prefix enum is safely exposed on
all platforms, but it only yielded as a component for Windows.

Exposing the prefix enum as part of prefix components involved changing
the type from `OsStr` to the `Prefix` enum, which is a:

[breaking-change]
2015-02-17 15:13:53 -08:00
Alex Crichton
5be2b8964c rollup merge of #22191: nagisa/target-ptr-width-json
This aligns json target specification to match terminology used elsewhere in the code base.

[breaking-change] for custom target json users. Change all appearances of target-word-size
to target-pointer-width.
2015-02-17 15:13:46 -08:00
Alex Crichton
311fc36a57 rollup merge of #22123: steveklabnik/doc_where_clauses
Closes #21859.
2015-02-17 15:13:42 -08:00
Alex Crichton
f492095eb4 rollup merge of #22024: alexcrichton/ascii
* Move the type parameter on the `AsciiExt` trait to an associated type named
  `Owned`.
* Move `ascii::escape_default` to using an iterator.

This is a breaking change due to the removal of the type parameter on the
`AsciiExt` trait as well as the modifications to the `escape_default` function
to returning an iterator. Manual implementations of `AsciiExt` (or `AsciiExt`
bounds) should be adjusted to remove the type parameter and using the new
`escape_default` should be relatively straightforward.

[breaking-change]
2015-02-17 15:13:20 -08:00
Aaron Turon
d8f8f7a58c Revise std::thread semantics
This commit makes several changes to `std::thread` in preparation for
final stabilization:

* It removes the ability to handle panics from `scoped` children; see
  #20807 for discussion

* It adds a `JoinHandle` structure, now returned from `spawn`, which
  makes it possible to join on children that do not share data from
  their parent's stack. The child is automatically detached when the
  handle is dropped, and the handle cannot be copied due to Posix
  semantics.

* It moves all static methods from `std:🧵:Thread` to free
  functions in `std::thread`. This was done in part because, due to the
  above changes, there are effectively no direct `Thread` constructors,
  and the static methods have tended to feel a bit awkward.

* Adds an `io::Result` around the `Builder` methods `scoped` and
  `spawn`, making it possible to handle OS errors when creating
  threads. The convenience free functions entail an unwrap.

* Stabilizes the entire module. Despite the fact that the API is
  changing somewhat here, this is part of a long period of baking and
  the changes are addressing all known issues prior to alpha2. If
  absolutely necessary, further breaking changes can be made prior to beta.

Closes #20807

[breaking-change]
2015-02-17 14:33:29 -08:00
Alex Crichton
a2ebb24ee6 std: Rename io/path features with old_ prefix
This commit renames the features for the `std::old_io` and `std::old_path`
modules to `old_io` and `old_path` to help facilitate migration to the new APIs.

This is a breaking change as crates which mention the old feature names now need
to be renamed to use the new feature names.

[breaking-change]
2015-02-17 14:02:45 -08:00
Alex Crichton
235f35b0b7 std: Stabilize the ascii module
This commit performs a stabilization pass over the `std::ascii` module taking
the following actions:

* the module name is now stable
* `AsciiExt` is now stable after moving its type parameter to an `Owned`
  associated type
* `AsciiExt::is_ascii` is now stable
* `AsciiExt::to_ascii_uppercase` is now stable
* `AsciiExt::to_ascii_lowercase` is now stable
* `AsciiExt::eq_ignore_ascii_case` is now stable
* `AsciiExt::make_ascii_uppercase` is added to possibly replace
  `OwnedAsciiExt::into_ascii_uppercase` (similarly for lowercase variants).
* `escape_default` now returns an iterator and is stable
* `EscapeDefault` is now stable

Trait implementations are now also marked stable.

Primarily it is still unstable to *implement* the `AsciiExt` trait due to it
containing some unstable methods.

[breaking-change]
2015-02-17 13:58:34 -08:00
Alex Crichton
0cf2d00f0e rustc: Track stability of trait implementations
Previously an implementation of a stable trait allows implementations of
unstable methods. This updates the stability pass to ensure that all items of an
impl block of a trait are indeed stable on the trait itself.
2015-02-17 13:56:06 -08:00
Huon Wilson
adfcd93f0c Add missing marker to std:🧵:JoinGuard.
The lifetime was previously, incorrectly unconstrained.
2015-02-18 08:19:22 +11:00