Commit Graph

27799 Commits

Author SHA1 Message Date
Brian Anderson
c91ce02600 install: Extract function for creating absolute paths and reuse it 2014-03-28 15:50:35 -07:00
Brian Anderson
766a7c224b install: Fix string formatting in an error 2014-03-28 15:50:34 -07:00
Brian Anderson
2205c48ee4 install: Explicitly delete the manifest during uninstall. Misc cleanup 2014-03-28 15:50:34 -07:00
Brian Anderson
01d823b4de install: Verify that installed compiler runs
Another sanity check. Can be disabled in `install.sh` via `--disable-verify`
and `configure` with `--disable-verify-install`.
2014-03-28 15:50:32 -07:00
bors
cbfc0a5e33 auto merge of #13161 : FlaPer87/rust/master, r=alexcrichton 2014-03-28 14:06:41 -07:00
bors
42e1003e4a auto merge of #13158 : alexcrichton/rust/issue-13123, r=brson
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a
syscall by default. The native runtime doesn't install a SIGPIPE handler,
causing the program to die immediately in this case. This brings the behavior in
line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the
application in the form of an IoError.

Closes #13123
2014-03-28 12:46:44 -07:00
Alex Crichton
68c2706780 native: Ignore SIGPIPE by default
Some unix platforms will send a SIGPIPE signal instead of returning EPIPE from a
syscall by default. The native runtime doesn't install a SIGPIPE handler,
causing the program to die immediately in this case. This brings the behavior in
line with libgreen by ignoring SIGPIPE and propagating EPIPE upwards to the
application in the form of an IoError.

Closes #13123
2014-03-28 11:21:48 -07:00
bors
fd4f15ea6b auto merge of #13131 : alexcrichton/rust/issue-13124, r=brson
It turns out that on linux, and possibly other platforms, child processes will
continue to accept signals until they have been *reaped*. This means that once
the child has exited, it will succeed to receive signals until waitpid() has
been invoked on it.

This is unfortunate behavior, and differs from what is seen on OSX and windows.
This commit changes the behavior of Process::signal() to be the same across
platforms, and updates the documentation of Process::kill() to note that when
signaling a foreign process it may accept signals until reaped.

Implementation-wise, this invokes waitpid() with WNOHANG before each signal to
the child to ensure that if the child has exited that we will reap it. Other
possibilities include installing a SIGCHLD signal handler, but at this time I
believe that that's too complicated.

Closes #13124
2014-03-28 11:21:47 -07:00
Alex Crichton
0e190b9a4a native: Use WNOHANG before signaling
It turns out that on linux, and possibly other platforms, child processes will
continue to accept signals until they have been *reaped*. This means that once
the child has exited, it will succeed to receive signals until waitpid() has
been invoked on it.

This is unfortunate behavior, and differs from what is seen on OSX and windows.
This commit changes the behavior of Process::signal() to be the same across
platforms, and updates the documentation of Process::kill() to note that when
signaling a foreign process it may accept signals until reaped.

Implementation-wise, this invokes waitpid() with WNOHANG before each signal to
the child to ensure that if the child has exited that we will reap it. Other
possibilities include installing a SIGCHLD signal handler, but at this time I
believe that that's too complicated.

Closes #13124
2014-03-28 11:07:58 -07:00
Flavio Percoco
2e6607a1dd Remove Freeze and add Share in vim's syntax 2014-03-28 17:57:04 +01:00
Eduard Burtescu
b0e3cb5f32 Remove a RefCell from pprust::State. 2014-03-28 18:28:04 +02:00
Eduard Burtescu
f65638e669 De-@ IdentInterner. 2014-03-28 18:28:04 +02:00
Eduard Burtescu
83c4e25d93 De-@ NamedMatch. 2014-03-28 18:28:04 +02:00
Eduard Burtescu
8f226e5694 De-@ TokenTree. 2014-03-28 18:28:04 +02:00
Eduard Burtescu
7cf4d8bc44 Used inherited mutability in lexer::Reader. 2014-03-28 18:28:03 +02:00
Erick Tryzelaar
63b233c25d std and green: fix some warnings 2014-03-28 09:16:22 -07:00
Erick Tryzelaar
e0e8e957ea test: remove pure test, which is now redundant with inline tests 2014-03-28 09:13:19 -07:00
Erick Tryzelaar
a47d52c2f6 collections: remove List
It was decided in a meeting that this module wasn't needed,
and more thought should be put into a persistent collections
library.
2014-03-28 09:13:09 -07:00
bors
b8601a3d8b auto merge of #13160 : FlaPer87/rust/rename-pod, r=thestinger
So far, we've used the term POD "Plain Old Data" to refer to types that
can be safely copied. However, this term is not consistent with the
other built-in bounds that use verbs instead. This patch renames the `Pod`
kind into `Copy`.

RFC: 0003-opt-in-builtin-traits

r? @nikomatsakis
2014-03-28 06:26:47 -07:00
bors
794ee03390 auto merge of #13154 : tomassedovic/rust/patch-1, r=alexcrichton
HashMap and HashSet require keys to implement TotalEq. This makes it possible to use TypeId as a HashMap key again.

Question for reviewers: assuming we want to support `HashMap<TypeId, whatever>`, would it make sense to add a relevant test? If so, should it go to libcollections or libstd?
2014-03-28 04:26:48 -07:00
Flavio Percoco
81ec1f3c18 Rename Pod into Copy
Summary:
So far, we've used the term POD "Plain Old Data" to refer to types that
can be safely copied. However, this term is not consistent with the
other built-in bounds that use verbs instead. This patch renames the Pod
kind into Copy.

RFC: 0003-opt-in-builtin-traits

Test Plan: make check

Reviewers: cmr

Differential Revision: http://phabricator.octayn.net/D3
2014-03-28 10:34:02 +01:00
bors
b6ea7962f7 auto merge of #13149 : brson/rust/rustdoclogo, r=alexcrichton 2014-03-28 02:16:49 -07:00
bors
ff64381c8b auto merge of #13107 : seanmonstar/rust/encoder-errors, r=erickt
All of Decoder and Encoder's methods now return a Result.

Encodable.encode() and Decodable.decode() return a Result as well.

fixes #12292
2014-03-28 00:26:52 -07:00
bors
5a68892507 auto merge of #13108 : pongad/rust/lintraw, r=huonw
Fixes #13032
2014-03-27 23:11:54 -07:00
bors
22a04ce286 auto merge of #13174 : brson/rust/dist, r=alexcrichton,huonw 2014-03-27 21:21:56 -07:00
Brian Anderson
476f0e36f0 mk: Fix syntax error in installation target 2014-03-27 20:21:57 -07:00
bors
7e987c3490 auto merge of #13173 : alexcrichton/rust/rustdoc-mods, r=huonw
... be stripped out"

This reverts commit 7180b5de44.

We don't particularly need this, I've never seen it clutter up the docs, it just seemed nice at the time. Sadly it caused a regression for reexported methods.

Closes #13091
2014-03-27 20:01:56 -07:00
gentlefolk
f4518cdba7 Initial support for emitting DWARF for static vars.
Only supports crate level statics. No debug info is generated for
function level statics. Closes #9227.
2014-03-27 21:03:44 -04:00
Sean McArthur
f1739b14a1 serialize: use Result
All of Decoder and Encoder's methods now return a Result.

Encodable.encode() and Decodable.decode() return a Result as well.

fixes #12292
2014-03-27 17:41:55 -07:00
bors
29436d54ee auto merge of #13142 : alexcrichton/rust/issue-13118, r=brson
The previous dependency calculation was based on an arbitrary set of asterisks
at an arbitrary depth, but using the recursive version should be much more
robust in figuring out what's dependent.
2014-03-27 17:11:58 -07:00
Alex Crichton
940bfb2ce0 Revert "Modules are either public, or private, so private modules should be stripped out"
This reverts commit 7180b5de44.
2014-03-27 16:00:14 -07:00
bors
13dafa09f1 auto merge of #13050 : alexcrichton/rust/no-send-default, r=huonw
See #10296 for the rationale, and commits for the implementation.
2014-03-27 14:32:02 -07:00
Brian Anderson
080d2104ff mk: Always touch libuv.a
libuv.a always looks out of date to the makefile, causing make to
always descend into the libuv makefile, even when there's nothing
to build.
2014-03-27 14:29:07 -07:00
bors
8eaada5d39 auto merge of #13151 : brson/rust/dist, r=alexcrichton,brson
A variety of stuff here, mostly aimed at making `make install` work correctly with `--libdir` and `--mandir`. `make install` again goes through `install.sh`.
2014-03-27 13:11:58 -07:00
Alex Crichton
8d0be731f5 doc: Update the tutorial about bounds for traits 2014-03-27 13:08:48 -07:00
Alex Crichton
bb9172d7b5 Fix fallout of removing default bounds
This is all purely fallout of getting the previous commit to compile.
2014-03-27 10:14:50 -07:00
Alex Crichton
bdd24b2a56 rustc: Stop adding the Send bound implicitly
This commit removes implicitly adding the Send bound to ~Trait objects and
procedure types. It will now be manually required to specify that a procedure
or trait must be send-able.

Closes #10296
2014-03-27 10:14:50 -07:00
bors
3b04fba529 auto merge of #13136 : alexcrichton/rust/spawn-deadlock, r=brson
This bench is meant to exercise libgreen, not libnative. It recently caused the
auto-linux-32-nopt-t bot to fail as no output was produced for an hour.
2014-03-27 09:52:03 -07:00
bors
25e523833e auto merge of #13001 : cmr/rust/unnamed-lifetime-nocapture, r=nikomatsakis
Closes #6751
2014-03-27 06:37:00 -07:00
Corey Richardson
5258e13d0b test/run-pass/out-of-stack: prevent tco
We really do *not* want TCO to kick in. If it does, we'll never blow the
stack, and never trigger the condition the test is checking for. To that end,
do a meaningless alloc that serves only to get a destructor to run. The
addition of nocapture/noalias seems to have let LLVM do more TCO, which
hurt this testcase.
2014-03-27 08:10:47 -04:00
Jan Kobler
fdfb9ebcf6 verify-grammar llnextgen
When calling

    make verify-grammar

a lot of errors are reported by llnextgen.

Only simple errors like:

  missing semicolons,
  missing single quotes,
  usage of parentheses instead of squared brackets or
  usage of single quote instead of double quote

are fixed by this patch.

This can only be tested, when llnextgen is installed.

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-03-27 11:19:06 +01:00
Jan Kobler
2b05263bc3 verify-grammar keyword crate
When calling

   make verify-grammar

or when llnextgen is not installed:

   python2.7 src/etc/extract_grammar.py <src/doc/rust.md

an error is reported by extract_grammar.py that the

keyword "crate" is not defined.

This patch adds the keyword "crate" to the grammar in rust.md.

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-03-27 11:18:02 +01:00
Jan Kobler
e91115feed verify-grammar path to rust.md
When calling

   make verify-grammar

rust.md cannot be found, because the
path to rust.md is missing.

The path is set to:

   $(D)/rust.md

This can only be tested, when llnextgen is installed.

Signed-off-by: Jan Kobler <eng1@koblersystems.de>
2014-03-27 10:20:30 +01:00
bors
e560db7dab auto merge of #13034 : edwardw/rust/match, r=nikomatsakis
The `_match.rs` takes advantage of passes prior to `trans` and
aggressively prunes the sub-match tree based on exact equality. When it
comes to literal or range, the strategy may lead to wrong result if
there's guard function or multiple patterns inside tuple.

Closes #12582.
Closes #13027.
2014-03-27 02:17:02 -07:00
Corey Richardson
b8ed13686a Address review 2014-03-27 02:51:54 -04:00
Corey Richardson
7febdb7b15 rustc: mark references w/anonymous lifetime nocapture
Closes #6751
2014-03-27 02:48:08 -04:00
Edward Wang
4112941202 _match.rs: prune sub-match tree too aggressively
The `_match.rs` takes advantage of passes prior to `trans` and
aggressively prunes the sub-match tree based on exact equality. When it
comes to literal or range, the strategy may lead to wrong result if
there's guard function or multiple patterns inside tuple.

Closes #12582.
Closes #13027.
2014-03-27 14:41:10 +08:00
Michael Darakananda
5744556782 Added lint for #[deriving] structs and enums with unsafe pointers. #13032. 2014-03-27 01:15:14 -04:00
Brian Anderson
0f4f786b62 mk: Use 'find' invocation that works on mac 2014-03-26 21:28:56 -07:00
Brian Anderson
6f7ef1e293 rustc: Fix tests for sysroot changes 2014-03-26 20:53:01 -07:00