Commit Graph

36563 Commits

Author SHA1 Message Date
Niko Matsakis
18f426e647 Update compile-fail test with new message that is generated as a
result of using `ty::type_is_sized`
2015-01-07 20:26:20 -05:00
Niko Matsakis
55c6a68f11 Add rather involved run-pass test case. 2015-01-07 20:26:20 -05:00
Niko Matsakis
4dd368b90a Normalize associated types in with_field_tys 2015-01-07 20:26:20 -05:00
Niko Matsakis
9e4e8823c7 Use ty::type_is_sized() so that we handle projection types properly. 2015-01-07 20:26:19 -05:00
Niko Matsakis
6300a97216 Remove assertion that substitutions are erased. It'd be nice if they
always were but it's dang annoying to weed out all the places that
fail to meet the assertion, and it doesn't really hurt things if we don't
always get it right.
2015-01-07 13:59:02 -05:00
Niko Matsakis
064cf553c7 Normalize associated types in various parts of adt 2015-01-07 13:58:27 -05:00
bors
dfd557bd73 auto merge of #20606 : alexcrichton/rust/stabilize-libc, r=brson
This commit prepares the liblibc library to be moved to crates.io. Unlike the
log, serialize, term, etc crates, the source for this crate will *not* be
duplicated out-of-tree. Instead a new rust-lang/libc repository will be created
with a submodule to this repository and it will use the source directly.

In order to compile within the stable ecosystem of Rust, this crate cannot link
to libcore, and it also needs some tweaks for the other attributes that it has.
As a result this commit tweaks the source of the crate to link to libcore when
built in tree but link to libstd when built via cargo.

Note that the rust-lang/libc crate isn't quite prepared just yet, there's a
Cargo bug or two that I'd like to iron out before publishing it. This is simply
preparing the in-tree source.
2015-01-07 12:25:15 +00:00
Alex Crichton
01ce6efd85 libc: Prepare for movement to crates.io
This commit prepares the liblibc library to be moved to crates.io. Unlike the
log, serialize, term, etc crates, the source for this crate will *not* be
duplicated out-of-tree. Instead a new rust-lang/libc repository will be created
with a submodule to this repository and it will use the source directly.

In order to compile within the stable ecosystem of Rust, this crate cannot link
to libcore, and it also needs some tweaks for the other attributes that it has.
As a result this commit tweaks the source of the crate to link to libcore when
built in tree but link to libstd when built via cargo.

Note that the rust-lang/libc crate isn't quite prepared just yet, there's a
Cargo bug or two that I'd like to iron out before publishing it. This is simply
preparing the in-tree source.
2015-01-07 00:43:49 -08:00
bors
a3a16e9610 auto merge of #20620 : brson/rust/relnotes, r=huonw
A whole lot happened this cycle. I tried to highlight the best stuff. Please review and note important stuff I'm missing or foolish mistakes.
2015-01-07 08:32:46 +00:00
Brian Anderson
9d8de1f42c Sync -> Send 2015-01-06 22:16:34 -08:00
Brian Anderson
ef6126a495 Merge pull request #25 from aturon/relnotes-updates
Add int discussion, tweak wording
2015-01-06 22:15:10 -08:00
bors
9e4e524e0e auto merge of #20677 : alexcrichton/rust/rollup, r=alexcrichton 2015-01-07 05:31:23 +00:00
Alex Crichton
a64000820f More test fixes 2015-01-06 21:26:48 -08:00
Aaron Turon
a63bb9ba7f Add int discussion, tweak wording 2015-01-06 20:53:55 -08:00
Brian Anderson
1b59406aec Use a better reference for unboxed closures 2015-01-06 18:18:56 -08:00
Brian Anderson
01fabcbe47 Soften pre-1.0 API stability commitment in relnotes 2015-01-06 16:50:54 -08:00
Brian Anderson
0cddbd6e77 Little more relnotes 2015-01-06 16:44:17 -08:00
Brian Anderson
9d073134c9 Add new authors, more relnotes 2015-01-06 16:37:38 -08:00
Alex Crichton
24ccb34266 Revert "Remove the unneeded Sized bound on TypeId creation"
This reverts commit 2404232369.

Conflicts:
	src/libcore/intrinsics.rs
2015-01-06 16:12:28 -08:00
Alex Crichton
56a9e2fcd5 Test fixes and rebase conflicts 2015-01-06 16:10:37 -08:00
Brian Anderson
7a346a356a Address feedback 2015-01-06 15:58:23 -08:00
Brian Anderson
db8d960c38 1.0.0-alpha release notes 2015-01-06 15:58:23 -08:00
Brian Anderson
93190b364b Bump some version numbers 2015-01-06 15:58:23 -08:00
Alex Crichton
26cd8eae48 rollup merge of #20563: cmr/macro-input-future-proofing 2015-01-06 15:49:15 -08:00
Corey Richardson
e9cbdd866d serialize macro fix 2015-01-06 18:47:49 -05:00
Corey Richardson
bd4119f965 Minor fallout/update FOLLOW sets 2015-01-06 18:46:37 -05:00
Alex Crichton
34a63d3364 rollup merge of #20656: japaric/at-clean 2015-01-06 15:41:13 -08:00
Alex Crichton
7840499a75 rollup merge of #20662: reem/unsized-typeid
This bound is probably unintentional and is unnecessarily
constricting.
2015-01-06 15:39:09 -08:00
Alex Crichton
0393a1602f rollup merge of #20650: klutzy/omg-windows-error-mode
Believe or not, `CreateProcess()` is racy if several threads create
child processes: [0], [1], [2].

This caused some tests show crash dialogs during
`make check-stage#-rpass`.

More explanation:

On Windows, `SetErrorMode()` controls display of error dialogs: it
accepts new error mode and returns old error mode.
The error mode is process-global and automatically inherited to child
process when created.

MSYS2 bash shell internally sets it to not show error dialogs, therefore
`make check-stage#-rpass` should not show them either.

However, [1] says that `CreateProcess()` internally invokes
`SetErrorMode()` twice: at first it sets mode `0x8001` and saves
original mode, and at second it restores original mode.
So if two threads simultaneously call `CreateProcess()`, the first
thread sets error mode to `0x8001` then the second thread recognizes
that current error mode is `0x8001`. Therefore, The second thread will
create process with wrong error mode.

This really occurs inside `compiletest`: it creates several processes on
each thread, so some `run-pass` tests are invoked with wrong error mode
therefore show crash dialog.

This commit adds `StaticMutex` for `CreateProcess()` call. This seems
to fix the "dialog annoyance" issue.

[0]: http://support.microsoft.com/kb/315939
[1]: https://code.google.com/p/nativeclient/issues/detail?id=2968
[2]: https://ghc.haskell.org/trac/ghc/ticket/2650
2015-01-06 15:38:56 -08:00
Alex Crichton
36f5d122b8 rollup merge of #20615: aturon/stab-2-thread
This commit takes a first pass at stabilizing `std::thread`:

* It removes the `detach` method in favor of two constructors -- `spawn`
  for detached threads, `scoped` for "scoped" (i.e., must-join)
  threads. This addresses some of the surprise/frustrating debug
  sessions with the previous API, in which `spawn` produced a guard that
  on destruction joined the thread (unless `detach` was called).

  The reason to have the division in part is that `Send` will soon not
  imply `'static`, which means that `scoped` thread creation can take a
  closure over *shared stack data* of the parent thread. On the other
  hand, this means that the parent must not pop the relevant stack
  frames while the child thread is running. The `JoinGuard` is used to
  prevent this from happening by joining on drop (if you have not
  already explicitly `join`ed.) The APIs around `scoped` are
  future-proofed for the `Send` changes by taking an additional lifetime
  parameter. With the current definition of `Send`, this is forced to be
  `'static`, but when `Send` changes these APIs will gain their full
  flexibility immediately.

  Threads that are `spawn`ed, on the other hand, are detached from the
  start and do not yield an RAII guard.

  The hope is that, by making `scoped` an explicit opt-in with a very
  suggestive name, it will be drastically less likely to be caught by a
  surprising deadlock due to an implicit join at the end of a scope.

* The module itself is marked stable.

* Existing methods other than `spawn` and `scoped` are marked stable.

The migration path is:

```rust
Thread::spawn(f).detached()
```

becomes

```rust
Thread::spawn(f)
```

while

```rust
let res = Thread::spawn(f);
res.join()
```

becomes

```rust
let res = Thread::scoped(f);
res.join()
```

[breaking-change]
2015-01-06 15:38:38 -08:00
Alex Crichton
0631b466c2 rollup merge of #19430: pczarn/interp_tt-cleanup
Conflicts:
	src/libsyntax/parse/parser.rs
2015-01-06 15:38:10 -08:00
Alex Crichton
771fe9026a rollup merge of #20607: nrc/kinds
Conflicts:
	src/libcore/array.rs
	src/libcore/cell.rs
	src/libcore/prelude.rs
	src/libstd/path/posix.rs
	src/libstd/prelude/v1.rs
	src/test/compile-fail/dst-sized-trait-param.rs
2015-01-06 15:34:10 -08:00
Alex Crichton
3892dd1eaa rollup merge of #20593: nikomatsakis/unused-tps-in-impl
Conflicts:
	src/libcollections/lib.rs
	src/librustc/lib.rs
	src/libserialize/lib.rs
	src/libstd/lib.rs
2015-01-06 15:31:39 -08:00
Alex Crichton
e3f047c8c5 rollup merge of #20653: alexcrichton/entry-unstable
There's been some debate over the precise form that these APIs should take, and
they've undergone some changes recently, so these APIs are going to be left
unstable for now to be fleshed out during the next release cycle.
2015-01-06 15:29:18 -08:00
Alex Crichton
ed61bd8693 rollup merge of #20652: vhbit/thread-key-type
This is a manual merge of #20627 and #20634 to avoid conflicts in rollup and also avoid one roundtrip. I've leave copyright to original author.  If this one is moved to rollup original PR could be closed. cc @mneumann

@alexcrichton r?

Both FreeBSD and DragonFly define pthread_key_t as int, while Linux
defines it as uint. As pthread_key_t is used as an opaque type and
storage size of both int and uint are the same, this is rather a
cosmetic change.

iOS uses ulong (as OS X) so difference is critical on 64bit platforms.
2015-01-06 15:29:17 -08:00
Alex Crichton
acc5d7914a rollup merge of #20647: aturon/stab-2-error
This commit is a first past stabilization of `std::error`:

* The module is stable.
* The `FromError` trait and impls are stable
* The `Error` trait itself is left unstable, pending current APIs and
  possible revisions during the alpha cycle.
2015-01-06 15:29:15 -08:00
Alex Crichton
0b3b957554 rollup merge of #20645: nikomatsakis/rustbook-ice
Conflicts:
	src/librustc/middle/mem_categorization.rs
	src/librustc/middle/ty.rs
	src/librustc_trans/trans/base.rs
	src/librustc_trans/trans/expr.rs
	src/librustc_trans/trans/foreign.rs
	src/librustc_typeck/check/mod.rs
2015-01-06 15:29:09 -08:00
Alex Crichton
e0f546a07e rollup merge of #20643: scialex/update-zsh 2015-01-06 15:25:02 -08:00
Alex Crichton
0f1bd6f105 rollup merge of #20623: jroesch/reject-non-param-bounds
This closes #20019, and should reject any where clauses placed on types not involving type parameters.

r? @nikomatsakis
2015-01-06 15:25:00 -08:00
Alex Crichton
6ccfd3f2c8 rollup merge of #20612: retep998/winsize
This calculates the width and height using the bounding box of the window in the buffer. Bounding box coordinates are inclusive so I have to add 1 to both dimensions.
2015-01-06 15:24:58 -08:00
Alex Crichton
cc20935ad8 rollup merge of #20570: sanxiyn/no-analysis 2015-01-06 15:24:55 -08:00
Alex Crichton
f358dbf1e7 rollup merge of #20557: cactorium/prettyprinters
As per https://github.com/rust-lang/rust/issues/20405. To be more precise, the changes just the processing of enums when the name is "RUST$ENCODED$ENUM$..." so it correctly parses when there is more than one number encoding the location of the field it's looking for to determine state of the enum
2015-01-06 15:24:52 -08:00
Piotr Czarnecki
d85c017f92 Cleanup and followup to PR #17830: parsing changes
Prevents breaking down `$name` tokens into separate `$` and `name`.
Reports unknown macro variables.

Fixes #18775
Fixes #18839
Fixes #15640
2015-01-07 00:24:48 +01:00
Alex Crichton
e2f97f51ad Register new snapshots
Conflicts:
	src/librbml/lib.rs
	src/libserialize/json_stage0.rs
	src/libserialize/serialize_stage0.rs
	src/libsyntax/ast.rs
	src/libsyntax/ext/deriving/generic/mod.rs
	src/libsyntax/parse/token.rs
2015-01-06 15:24:24 -08:00
Alex Crichton
5c3ddcb15d rollup merge of #20481: seanmonstar/fmt-show-string
Conflicts:
	src/compiletest/runtest.rs
	src/libcore/fmt/mod.rs
	src/libfmt_macros/lib.rs
	src/libregex/parse.rs
	src/librustc/middle/cfg/construct.rs
	src/librustc/middle/dataflow.rs
	src/librustc/middle/infer/higher_ranked/mod.rs
	src/librustc/middle/ty.rs
	src/librustc_back/archive.rs
	src/librustc_borrowck/borrowck/fragments.rs
	src/librustc_borrowck/borrowck/gather_loans/mod.rs
	src/librustc_resolve/lib.rs
	src/librustc_trans/back/link.rs
	src/librustc_trans/save/mod.rs
	src/librustc_trans/trans/base.rs
	src/librustc_trans/trans/callee.rs
	src/librustc_trans/trans/common.rs
	src/librustc_trans/trans/consts.rs
	src/librustc_trans/trans/controlflow.rs
	src/librustc_trans/trans/debuginfo.rs
	src/librustc_trans/trans/expr.rs
	src/librustc_trans/trans/monomorphize.rs
	src/librustc_typeck/astconv.rs
	src/librustc_typeck/check/method/mod.rs
	src/librustc_typeck/check/mod.rs
	src/librustc_typeck/check/regionck.rs
	src/librustc_typeck/collect.rs
	src/libsyntax/ext/format.rs
	src/libsyntax/ext/source_util.rs
	src/libsyntax/ext/tt/transcribe.rs
	src/libsyntax/parse/mod.rs
	src/libsyntax/parse/token.rs
	src/test/run-pass/issue-8898.rs
2015-01-06 15:22:24 -08:00
Nick Cameron
9f07d055f7 markers -> marker 2015-01-07 12:10:31 +13:00
Alex Crichton
5f27b50080 rollup merge of #20609: cmr/mem 2015-01-06 15:07:48 -08:00
Alex Crichton
1afe8a4fb8 rollup merge of #20562: nick29581/arrays-3 2015-01-06 15:05:53 -08:00
Nick Cameron
0c7f7a5fb8 fallout 2015-01-07 12:02:52 +13:00
Corey Richardson
ac8e10519a Stricter rules surrounding adjacent nonterminals and sequences 2015-01-06 18:02:00 -05:00