Commit Graph

36085 Commits

Author SHA1 Message Date
Jorge Aparicio
bcc2120c21 rustc_borrowck: unbox closures used in function arguments 2014-12-31 22:50:26 -05:00
Jorge Aparicio
24b49228f0 rustc_trans: unbox closures used in function arguments 2014-12-31 22:50:26 -05:00
Jorge Aparicio
5de9f47e49 rustc: unbox closures used in function arguments 2014-12-31 22:50:26 -05:00
Jorge Aparicio
70ce68eed4 syntax: unbox closures used in function arguments 2014-12-31 22:50:26 -05:00
Jorge Aparicio
371f04d433 std: unbox closures used in function arguments 2014-12-31 22:50:25 -05:00
bors
7d4f4876d6 auto merge of #20374 : nikomatsakis/rust/assoc-types, r=nikomatsakis
These mostly derive from problems that @japaric encountered.

r? @pcwalton
2015-01-01 01:20:56 +00:00
Jorge Aparicio
a17c2b60e1 collections: fix fallout 2014-12-31 19:14:44 -05:00
Jorge Aparicio
ea94a90488 unicode: unbox closures used in function arguments 2014-12-31 19:14:44 -05:00
Alex Crichton
a6f5b980cc rustc: Re-jigger -L and -l for MSYS compatibility
As discovered in #20376, the MSYS shell will silently rewrite arguemnts that
look like unix paths into their windows path counterparts for compatibility, but
the recently added `:kind` syntax added to the `-L` flag does not allow for this
form of rewriting. This means that the syntax can be difficult to use at an MSYS
prompt, as well as causing tests to fail when run manuall right now.

This commit takes the other option presented in the original issue to prefix the
path with `kind=` instead of suffixing it with `:kind`. For consistence, the
`-l` flag is also now migrating to `kind=name`.

This is a breaking change due to the *removal* of behavior with `-L`. All code
using `:kind` should now pass `kind=` for `-L` arguments. This is not currently,
but will become, a breaking change for `-l` flags. The old `name:kind` syntax is
still accepted, but all code should update to `kind=name`.

[breaking-change]
Closes #20376
2014-12-31 16:05:00 -08:00
Alexis Beingessner
8dbaa7105e stabilize more of collections 2014-12-31 18:54:08 -05:00
Alex Crichton
be11aa6d70 std: Second pass stabilization for thread_local
This commit performs a second pass over the `std::thread_local` module. Most of
the functionality remains explicitly unstable, but the specific actions taken
were:

* `thread_local` is now stable
* `thread_local!` is now stable
* `thread_local::Key` is now stable
* `thread_local::Key::with` is now stable
* `thread_local::Key::destroyed` is deprecated in favor of a more general
  `state` function
* `thread_local::Key::state` was added to query the three states that a key can
  be in: uninitialized, valid, or destroyed. This function, and the
  corresponding `State` enum, are both marked unstable as we may wish to expand
  it later on.
* `thread_local::scoped` is entirely unstable. There hasn't been a whole lot of
  usage of this module in the standard distribution, so it remains unstable at
  this time.

Note that while the structure `Key` is marked stable, it is currently forced to
expose all of its implementation details due to the use of
construction-via-macro. The use of construction-via-macro is currently required
in order to place the `#[thread_local]` attribute on static in a
platform-specific manner. These stability attributes were assigned assuming that
it will be acceptable to tweak the implementation of `Key` in the future.
2014-12-31 15:50:28 -08:00
Niko Matsakis
004a567de3 Convert TODO to FIXME for now 2014-12-31 16:23:49 -05:00
Niko Matsakis
7ae1c6bc26 Remove a TODO now that we handle normalization-derived bounds properly. 2014-12-31 16:02:58 -05:00
bors
10d99a9734 auto merge of #20360 : alexcrichton/rust/rollup, r=alexcrichton 2014-12-31 21:01:42 +00:00
Niko Matsakis
cadd4335b4 Fix whitespace. 2014-12-31 15:05:46 -05:00
Niko Matsakis
0a2d531b94 Teach trans to drain fulfillment context. japaric encountered problems
due to this but we were not able to isolate a smaller test case.
2014-12-31 14:42:06 -05:00
Niko Matsakis
67dab2af81 Include projection bounds in superpredicates.
Fixes #19451.
Fixes #20345.
2014-12-31 14:41:39 -05:00
Alex Crichton
139f44bae8 rollup merge of #20375: brson/windistfix 2014-12-31 11:13:37 -08:00
Alex Crichton
aec67c2ee0 Revert "std: Re-enable at_exit()"
This reverts commit 9e224c2bf1.

Conflicts:
	src/libstd/sys/windows/os.rs
2014-12-31 10:20:31 -08:00
Brian Anderson
7608dbad65 mk: Fix the location of a temp dir when building installer on win 2014-12-31 10:06:21 -08:00
Niko Matsakis
9675488ef9 Add tests for two random issues that seem to be fixed on this branch.
Fixes #20346.
Fixes #20371.
2014-12-31 12:52:16 -05:00
Niko Matsakis
6cb425d964 Rework normalization so that it works recursively, since the types extracted from an impl are potentially in need of normalization. This also lays groundwork for further cleanup in other areas by disconnecting normalization from the fulfillment context. 2014-12-31 12:50:30 -05:00
Alex Crichton
582cba183f Test fixes and rebase conflicts 2014-12-31 08:33:13 -08:00
Niko Matsakis
0aa7ba9f5e Normalize bounds also in the UFCS cases (and get more systematic about it) 2014-12-31 11:16:28 -05:00
Niko Matsakis
90252b8ddb Add ignore pretty. 2014-12-31 11:15:42 -05:00
Niko Matsakis
23eec0c955 Incorporate fix from japaric for cross-crate ICE 2014-12-31 11:15:42 -05:00
Niko Matsakis
4f05ec7d2c Patch projection to not be so eager to unify type variables. This code
is still probably wrong since it fails to incorporate the ambiguity
resolution measures that `select` uses. Also, made more complicated by
the fact that trait object types do not impl their own traits yet.
2014-12-31 11:15:42 -05:00
Alex Crichton
67d13883f8 rollup merge of #20061: aturon/stab-2-vec-slice
Conflicts:
	src/libcollections/slice.rs
	src/libcollections/vec.rs
	src/libstd/sys/windows/os.rs
2014-12-30 18:51:51 -08:00
Aaron Turon
6abfac083f Fallout from stabilization 2014-12-30 17:06:08 -08:00
Alex Crichton
dd0f29ad0f rollup merge of #20353: alexcrichton/snapshots 2014-12-30 16:26:24 -08:00
Alex Crichton
49f14d36e1 rollup merge of #20350: fhahn/issue-20340-rustdoc-version
Patch for #20340. `rustdoc --version` panics because it uses `rustc_driver::version`, which in turn checks the `verbose` flag, which was not defined for rustdoc.  In this patch I have added a verbose flag to rustdoc, because I think it should be useful for other things besides --version.

Another possible fix would be to check if a verbose option was defined in `rustc_driver` or add an extra `version` function for rustdoc.
2014-12-30 16:26:24 -08:00
Alex Crichton
38f9805f11 rollup merge of #20348: frewsxcv/rm-reexports
Part of #19253

[breaking-change]
2014-12-30 16:26:22 -08:00
Alex Crichton
04f42212a3 rollup merge of #20344: brson/srctarballs
Easier for scripts to figure out which artifact is the source code.
2014-12-30 16:26:21 -08:00
Alex Crichton
86a03b8685 rollup merge of #20332: js-ojus/master
In the context of explaining the declaration of mutable bindings, using 'intended' probably conveys the meaning better than 'cared'.
2014-12-30 16:26:20 -08:00
Alex Crichton
fa130ae6ff rollup merge of #20330: fhahn/issue-15877-model-lexer-range-2
This patch resolves the second problem mentioned in #15877: function calls to integers, e.g. `3.b()`.

 It does so, by checking whether the character following the first dot of a FLOAT_LIT is a character or an underscore (these should denote a valid identifier). This does not look like a particularly, but it seems like a lookahead of 1 is needed for this distinction.

Another interesting aspect are ranges that start with a integer constant, but end with a function call, e.g. `1..b()`. Rust treats this as a range from 1 to `b()`, but given that `1.` is a valid FLOAT_LIT, `1..b()` could be a function call to a float as well.

cc @cmr
2014-12-30 16:26:18 -08:00
Alex Crichton
ecf48fb469 rollup merge of #20329: vhbit/ios-rand-fix 2014-12-30 16:26:16 -08:00
Alex Crichton
a8820f7a2d rollup merge of #20328: huonw/attack-of-the-clones
It's useful to be able to save state.
2014-12-30 16:26:15 -08:00
Alex Crichton
899eb65b29 rollup merge of #20326: rohitjoshi/master
fixes #20322
2014-12-30 16:26:13 -08:00
Alex Crichton
d058520f06 rollup merge of #20325: nick29581/obj-safety-static
Closes #19949 and rust-lang/rfcs#428

[breaking change]

If you have traits used with objects with static methods, you'll need to move
the static methods to a different trait.

r? @cmr
2014-12-30 16:26:11 -08:00
Alex Crichton
a239d71729 rollup merge of #20323: brson/beta
Adds a new 'beta cycle' variable that can be appended to the '-beta' version label, e.g. '-beta1'. Changes the version label for the beta channel temporarily to 'alpha'. Changes the artifact name of the beta channel to contain the version number instead of just being called 'beta'. The beta cycle number is currently set to 1.

The impact of this is that the first alphas will be called '1.0.0-alpha1' and the artifacts will also be called '1.0.0-alpha1-*.tar.gz'. We could alternately leave out the cycle number if we are confident there will be only one alpha cycle.

r? @alexcrichton cc @nikomatsakis @huonw
2014-12-30 16:26:09 -08:00
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