Commit Graph

36579 Commits

Author SHA1 Message Date
Jorge Aparicio
ed4bebda96 remove some slicing_syntax feature gates 2015-01-07 18:37:04 -05:00
Jorge Aparicio
8327bcc167 remove slicing_syntax feature gate 2015-01-07 18:37:04 -05:00
Jorge Aparicio
517f1cc63c use slicing sugar 2015-01-07 17:35:56 -05:00
Jorge Aparicio
6e2bfe4ae8 register new snapshots 2015-01-07 17:15:06 -05:00
bors
9f1ead8fad auto merge of #20655 : nikomatsakis/rust/carl-ice, r=aturon
Remember to check the name of the associated type being projected when searching the environment. Fixes #20651.
2015-01-07 17:45:11 +00:00
Niko Matsakis
ea441e16b4 Remember to check the name of the associated type being projected when searching the environment. Fixes #20651. 2015-01-07 11:24:50 -05:00
bors
2a8cb678e6 Merge pull request #20689 from huonw/editor-_size
Update editor syntax files for isize/usize.

Reviewed-by: nikomatsakis
2015-01-07 15:35:34 +00:00
bors
f7105bfade Merge pull request #20682 from sfackler/fix-impls
Fix JS error

Reviewed-by: alexcrichton
2015-01-07 15:35:33 +00:00
bors
847bb37515 Merge pull request #20679 from geekcraik/master
unused variable 'i'

Reviewed-by: sfackler
2015-01-07 15:35:31 +00:00
bors
eb02f2d7e5 Merge pull request #20675 from jbcrail/fix-test-comments
Fix misspelled comments in tests.

Reviewed-by: steveklabnik
2015-01-07 15:35:30 +00:00
bors
c0216c8945 Merge pull request #20674 from jbcrail/fix-misspelled-comments
Fix misspelled comments.

Reviewed-by: steveklabnik
2015-01-07 15:35:30 +00:00
bors
7377c0b1a9 Merge pull request #20672 from vrana/patch-3
Fix a typo in guide

Reviewed-by: steveklabnik
2015-01-07 15:35:28 +00:00
bors
5064c8d9dc Merge pull request #20670 from vrana/patch-2
Fix type annotation in guide

Reviewed-by: steveklabnik
2015-01-07 15:35:27 +00:00
bors
2e2a2cdb59 Merge pull request #20669 from vrana/patch-1
Use a better word in the guide

Reviewed-by: steveklabnik
2015-01-07 15:35:26 +00: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
Huon Wilson
6c7291ece4 Update editor syntax files for isize/usize.
Yay, syntax highlighting.
2015-01-07 20:19:58 +11: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
Steven Fackler
47c9cc44dc Fix JS error
ECMAScript 6 isn't really supported anywhere

Closes #20681
2015-01-06 20:51:38 -08:00
克雷
3ece657004 Update arc.rs 2015-01-07 11:16:41 +08:00
Brian Anderson
1b59406aec Use a better reference for unboxed closures 2015-01-06 18:18:56 -08:00
Joseph Crail
938a705ff1 Fix misspelled comments in tests.
I separated these changes out from the other commit to minimize issues
with tests.
2015-01-06 20:54:54 -05:00
Joseph Crail
e3b7fedc20 Fix misspelled comments.
I cleaned up comments prior to the 1.0 alpha release.
2015-01-06 20:53:18 -05:00
Jakub Vrána
83d01cc5ae Fix a typo in guide 2015-01-06 16:53:45 -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
Jakub Vrána
94c170e366 Fix type annotation in guide 2015-01-06 15:30:22 -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