Commit Graph

27537 Commits

Author SHA1 Message Date
Michael Darakananda
092eefcfb2 configure uses command -v instead of which #13147 2014-03-29 00:16:58 -04:00
bors
b334f7c3cc auto merge of #13157 : pnkfelix/rust/fsk-iss13140, r=nikomatsakis
r? @nikomatsakis

Fix #13140

Includes two fixes, and a semi-thorough regression test.

(There is another set of tests that I linked from #5121, but those are sort of all over the place, while the ones I've included here are more directly focused on the issues at hand.)
2014-03-28 19:01:48 -07:00
bors
ff733c767a auto merge of #13162 : alexcrichton/rust/attr-syntax, r=brson
This is the rebasing of #13068 with a fix for #13067 as the first commit.
2014-03-28 17:16:48 -07:00
Brian Anderson
451e8c1c61 Convert most code to new inner attribute syntax.
Closes #2569
2014-03-28 17:12:21 -07:00
Alex Crichton
c6bbb95ce2 syntax: Accept meta matchers in macros
This removes the `attr` matcher and adds a `meta` matcher. The previous `attr`
matcher is now ambiguous because it doesn't disambiguate whether it means inner
attribute or outer attribute.

The new behavior can still be achieved by taking an argument of the form
`#[$foo:meta]` (the brackets are part of the macro pattern).

Closes #13067
2014-03-28 16:37:45 -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
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
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
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
bors
c329a17461 auto merge of #13079 : alexcrichton/rust/colons, r=cmr
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little
ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather
than `Foo: (Bound) <trait-parameters>`

This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be
clear where the trait parameters are going.

Closes #9265
2014-03-26 19:32:01 -07:00
Brian Anderson
545f012527 rustc: Fix detection of lib64 directory
Instead of just looking for its presence we need to see if it actually
contains rust stuffs.
2014-03-26 19:21:23 -07:00
Brian Anderson
c060e2e515 install: Don't allow installation over the install files 2014-03-26 18:52:23 -07:00
bors
c83994e0f4 auto merge of #13145 : alexcrichton/rust/flip-some-defaults, r=brson
This change prepares `rustc` to accept private fields by default. These changes will have to go through a snapshot before the rest of the changes can happen.
2014-03-26 16:37:03 -07:00
Brian Anderson
92d0ec2ec7 install: name the bundled manifest 'manifest.in'. Cleanup
The installed manifest is a different file, so they should have
different names. This should prevent various wierd conflicts in the future.
2014-03-26 14:59:08 -07:00
Alex Crichton
8118406ecf syntax: Tweak parsing bounds on generics paths
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little
ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather
than `Foo: (Bound) <trait-parameters>`

This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be
clear where the trait parameters are going.

Closes #9265
2014-03-26 14:51:41 -07:00
bors
533a526327 auto merge of #13152 : huonw/rust/wtf-are-things-in-spans, r=alexcrichton
Add some docs to ExpnInfo. Add a single overlooked `new_span` call to the folder (I'm pretty sure nothing reads this span, though, so it's probably pointless).
2014-03-26 13:36:52 -07:00
bors
2c71cdf64b auto merge of #13071 : ktt3ja/rust/deterministic-lifetime-suggestion, r=cmr
Close #13057
2014-03-26 10:26:55 -07:00
Alex Crichton
7de48419ee syntax: Permit visibility on tuple fields
This change is in preparation for #8122. Nothing is currently done with these
visibility qualifiers, they are just parsed and accepted by the compiler.

RFC: 0004-private-fields
2014-03-26 10:20:15 -07:00
Alex Crichton
104aaa44e8 rustc: Relax restriction on privacy for fields
This is a necessary change in preparation for switching the defaults as part
of #8122.

RFC: 0004-private-fields
2014-03-26 10:20:12 -07:00
Felix S. Klock II
0cbb1ceaa9 Add test using early-bound lifetimes in trait generic parameters. 2014-03-26 17:57:02 +01:00