Commit Graph

36197 Commits

Author SHA1 Message Date
Alex Crichton
d1a19e8303 rollup merge of #20321: epall/patch-1
In f436f9ca2, the Send and Sync traits became `unsafe`. They were updated for `target_arch = x86` and others, but `mips` was missed.
2014-12-30 16:26:08 -08:00
Alex Crichton
360c3cf558 rollup merge of #20316: seanmonstar/patch-1
Adds back Send and Sync to BTreeMap and Set.
2014-12-30 16:26:06 -08:00
Alex Crichton
b936fb3d16 rollup merge of #20286: murarth/get-address-name 2014-12-30 16:26:02 -08:00
Alex Crichton
2dd519230f rollup merge of #20247: steveklabnik/gh20088
Fixes #20088
2014-12-30 16:26:00 -08:00
Alex Crichton
520cdcb79a rollup merge of #20217: luqmana/pc 2014-12-30 16:25:58 -08:00
Alex Crichton
0362b40e44 rollup merge of #20115: gereeter/split-module-building
This also gets rid of a bunch of unnecessary `.clone`s.

cc @eddyb
2014-12-30 16:25:48 -08:00
Alex Crichton
836bcb6ef4 rollup merge of #20065: aturon/stab-2-cmp
This patch marks `PartialEq`, `Eq`, `PartialOrd`, and `Ord` as
`#[stable]`, as well as the majorify of manual implementaitons of these
traits. The traits match the [reform RFC](https://github.com/rust-lang/rfcs/pull/439).

In the future, many of the impls should be generalized; see #20063.
However, there is no problem stabilizing the less general impls, since
generalizing later is not a breaking change.

r? @alexcrichton
2014-12-30 16:25:47 -08:00
Alex Crichton
3c5fd402cf rollup merge of #20045: alexcrichton/issue-20012
The new semantics of this function are that the callbacks are run when the *main
thread* exits, not when all threads have exited. This implies that other threads
may still be running when the `at_exit` callbacks are invoked and users need to
be prepared for this situation.

Users in the standard library have been audited in accordance to these new rules
as well.

Closes #20012
2014-12-30 16:25:45 -08:00
Alex Crichton
fe64ff1104 rollup merge of #19954: michaelwoerister/rust-gdb
This pull request adds the `rust-gdb` shell script which starts GDB with Rust pretty printers enabled. The PR also makes `rustc` add a special `.debug_gdb_scripts` ELF section on Linux which tells GDB that the produced binary should use the Rust pretty printers.

Note that at the moment this script will only work and be installed on Linux. On Mac OS X there's `rust-lldb` which works much better there. On Windows I had too many problems making this stable. I'll give it another try soonish.

You can use this script just like you would use GDB from the command line. It will use the pretty printers from the Rust "installation" found first in PATH. E.g. if you have `~/rust/x86_64-linux-gnu/stage1/bin` in your path, it will use the pretty printer scripts in `~/rust/x86_64-linux-gnu/stage1/lib/rustlib/etc`.
2014-12-30 16:25:44 -08:00
Alex Crichton
262c1efe63 Register new snapshots 2014-12-30 15:04:43 -08:00
Aaron Turon
b94bcbf56e Stabilize cmp
This patch marks `PartialEq`, `Eq`, `PartialOrd`, and `Ord` as
`#[stable]`, as well as the majorify of manual implementaitons of these
traits. The traits match the [reform
RFC](https://github.com/rust-lang/rfcs/pull/439).

Along the way, two changes are made:

* The recently-added type parameters for `Ord` and `Eq` are
  removed. These were mistakenly added while adding them to `PartialOrd`
  and `PartialEq`, but they don't make sense given the laws that are
  required for (and use cases for) `Ord` and `Eq`.

* More explicit laws are added for `PartialEq` and `PartialOrd`,
  connecting them to their associated mathematical concepts.

In the future, many of the impls should be generalized; see
since generalizing later is not a breaking change.

[breaking-change]
2014-12-30 14:44:26 -08:00
Alex Crichton
9e224c2bf1 std: Re-enable at_exit()
The new semantics of this function are that the callbacks are run when the *main
thread* exits, not when all threads have exited. This implies that other threads
may still be running when the `at_exit` callbacks are invoked and users need to
be prepared for this situation.

Users in the standard library have been audited in accordance to these new rules
as well.

Closes #20012
2014-12-30 14:33:59 -08:00
Florian Hahn
c11e1551d1 Add verbose option to rustdoc in order to fix problem with --version
closes #20340
2014-12-30 22:27:02 +01:00
Aaron Turon
6e1879eaf1 Adjustments from review 2014-12-30 12:02:22 -08:00
Aaron Turon
e91d810b9b Libs: Unify concat and concat_vec
We've long had traits `StrVector` and `VectorVector` providing
`concat`/`connect` and `concat_vec`/`connect_vec` respectively. The
reason for the distinction is that coherence rules did not used to be
robust enough to allow impls on e.g. `Vec<String>` versus `Vec<&[T]>`.

This commit consolidates the traits into a single `SliceConcatExt` trait
provided by `slice` and the preldue (where it replaces `StrVector`,
which is removed.)

[breaking-change]
2014-12-30 12:02:22 -08:00
Aaron Turon
4f863a338e Second pass stabilization: slice
This commit takes a second pass through the `slice` module to
stabilize its API. The changes are as follows:

**Stable**:

* `as_mut_slice`
* `as_ptr`, `as_mut_ptr`
* `binary_search_by` (was: `binary_search`)
* `binary_search` (was: `binary_search_elem`)
* `chunks`, `chunks_mut`
* `contains`
* `ends_with`
* `first`, `first_mut` (was: `head`)
* `get_unchecked`, `get_unchecked_mut` (was: `unsafe_get`)
* `get`
* `is_empty`
* `iter`, `iter_mut`
* `len`
* `reverse`
* `sort_by`
* `sort`
* `split_at`, `split_at_mut`
* `split_mut`, `splitn_mut`, `rsplitn_mut`
* `split`, `splitn`, `rsplitn`
* `starts_with`
* `swap`
* `to_vec`
* `windows`

**Deprecated**:

* `head`, `head_mut` (renamed as above)
* `unsafe_get`, `unsafe_mut` (renamed as above)
* `binary_search_elem` (renamed as above)
* `partitioned`, deprecated in favor of a new, more
  general iterator consumer called `partition`.
* `BinarySearchResult`, deprecated in favor of `Result<uint, uint>`

[breaking-change]
2014-12-30 12:02:22 -08:00
Aaron Turon
9d919d2302 Second pass stabilization: vec
This commit takes a second pass through the `vec` module to
stabilize its API. The changes are as follows:

**Stable**:

* `dedup`
* `from_raw_parts`
* `insert`
* `into_iter`
* `is_empty`
* `remove`
* `reserve_exact`
* `reserve`
* `retain`
* `swap_remove`
* `truncate`

**Deprecated**:

* `from_fn`, `from_elem`, `grow_fn` and `grow`, all deprecated in
  favor of iterators. See https://github.com/rust-lang/rfcs/pull/509

* `partition`, `partitioned`, deprecated in favor of a new, more
  general iterator consumer called `partition`.

* `unzip`, deprecated in favor of a new, more general iterator
  consumer called `unzip`.

A few remaining methods are left at experimental status.

[breaking-change]
2014-12-30 12:02:22 -08:00
Aaron Turon
8a5057af2e std::iter: Add partition and unzip methods to iterators 2014-12-30 12:02:21 -08:00
Brian Anderson
1131acbc8e mk: Append -src to source tarballs for easier identification 2014-12-30 11:47:12 -08:00
Corey Farwell
1d26fb9e07 Remove core::atomic::Ordering::* public reexport
Part of #19253

[breaking-change]
2014-12-30 11:43:51 -08:00
Jonathan S
c7a8240f02 Removed a bunch of unnecessary .clone()s from build_reduced_graph 2014-12-30 12:52:51 -06:00
Jonathan S
096df4e134 Purged ReducedGraphParent 2014-12-30 12:30:42 -06:00
Jonathan S
28659cf804 Cleanup unused imports resulting from move of reduced graph building 2014-12-30 12:19:24 -06:00
Brian Anderson
20fcece88b mk: The alpha will not have a cycle number 2014-12-30 10:18:54 -08:00
Jonathan S
be00b9dc40 Moved ReducedGraphParent building to a new module 2014-12-30 12:16:42 -06:00
bors
84f5ad8679 auto merge of #20307 : nikomatsakis/rust/assoc-types-normalization-extend-bound, r=nrc
Rewrite associated types to use projection rather than dummy type parameters. This closes almost every (major) open issue, but I'm holding off on that until the code has landed and baked a bit. Probably it should have more tests, as well, but I wanted to get this landed as fast as possible so that we can collaborate on improving it.

The commit history is a little messy, particularly the merge commit at the end. If I get some time, I might just "reset" to the beginning and try to carve up the final state into logical pieces. Let me know if it seems hard to follow. By far the most crucial commit is "Implement associated type projection and normalization."

r? @nick29581
2014-12-30 17:51:21 +00:00
Niko Matsakis
e186accbc4 Fix rebase conflicts 2014-12-30 12:09:21 -05:00
Michael Woerister
91a0e18866 debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
Florian Hahn
1e278c1cd1 Update src/grammar/README.md 2014-12-30 16:49:27 +01:00
Florian Hahn
f066acf645 src/grammar/check.sh now prints test summary 2014-12-30 16:46:07 +01:00
Niko Matsakis
919975d0a5 Address nits. 2014-12-30 09:36:23 -05:00
Niko Matsakis
518ec1259a Normalize associated types in bounds too. Also, make the workaround
for lack of impl-trait-for-trait just a bit more targeted (don't
substitute err, just drop the troublesome bound for now) -- otherwise
substituting false types leads us into trouble when we normalize etc.
2014-12-30 09:36:23 -05:00
Niko Matsakis
cdd5ff842d Add a test case using associated types cross crate. Fixes #18048. 2014-12-30 09:36:23 -05:00
Niko Matsakis
208d32d192 Encode the TypeScheme for associated types 2014-12-30 09:36:23 -05:00
Niko Matsakis
de8e0ae22c Remove the AssocSpace 2014-12-30 09:36:23 -05:00
Niko Matsakis
42e645ca9a Patch more metadata decoding problems. 2014-12-30 09:36:23 -05:00
Niko Matsakis
30e8ab0182 Encode the name for associated items on a trait. Fixes #18048. 2014-12-30 09:36:23 -05:00
Niko Matsakis
c1bc150bc4 Correct licenses. 2014-12-30 09:36:23 -05:00
Niko Matsakis
7ed0e23209 Resolve merge conflicts. This changes should really be integrated back to their respective
commits but oh dear what a pain.
2014-12-30 09:36:23 -05:00
Niko Matsakis
05eb2eeb61 Adjust tests for inferenceGet more conservative about inference for now. Seems better to err on the side of being more correct rather than less. Fix a bug in typing index expressions that was exposed as a result, and add one type annotation that is not required. Delete some random tests that were relying on old behavior and don't seem to add anything anymore. 2014-12-30 09:36:23 -05:00
Niko Matsakis
c197911c60 Add a FIXME relating to these type-testing traits 2014-12-30 09:36:23 -05:00
Niko Matsakis
f1c041a54d Patch long line. 2014-12-30 09:36:23 -05:00
Niko Matsakis
00cf176a5e Add FIXMEs relating to caching of projection results 2014-12-30 09:36:22 -05:00
Niko Matsakis
97d8a668f6 Add a FIXME relating to regions and projection types 2014-12-30 09:36:22 -05:00
Niko Matsakis
d62d4953d2 Add a FIXME to patch up rustdoc 2014-12-30 09:36:22 -05:00
Niko Matsakis
58467fab0f File a FIXME relating to using where clauses, not bounds 2014-12-30 09:36:22 -05:00
Niko Matsakis
df967306e3 Add a FIXME relating to Copy<T> not being checked 2014-12-30 09:36:22 -05:00
Niko Matsakis
adca15a151 Add a FIXME relating to using ast::Name 2014-12-30 09:36:22 -05:00
Niko Matsakis
7836c72eba Patch tests and create new tests related to projection from a HRTB. 2014-12-30 09:36:22 -05:00
Niko Matsakis
3657ae13f5 Don't normalize associated types when in region binders, wait until we instantiate
them. Also fix some assertions and handling of builtin bounds.
2014-12-30 09:36:22 -05:00