Commit Graph

29276 Commits

Author SHA1 Message Date
bors
a6a1c9071a auto merge of #14477 : alexcrichton/rust/issue-14456, r=brson
When spawning a process, stdio file descriptors can be configured to be ignored,
which basically means that they'll be closed. Currently this is done by
literally closing the file descriptors in the child, but this can have adverse
side effects if the child process then opens a new file descriptor, assigning it
to a stdio number.

To work around the problems of the child, this commit alters the process
spawning code to map stdio fds to /dev/null on unix (and a similar equivalent on
windows) when they are specified as being ignored. This should allow spawned
programs to have more expected behavior when opening new files.

Closes #14456
2014-05-28 22:41:38 -07:00
bors
1489374750 auto merge of #14451 : alexcrichton/rust/issue-14442, r=brson
This avoids having to perform conversions from `*u8` to `&'static str` which can
suck in a good deal of code.

Closes #14442
2014-05-28 20:01:37 -07:00
bors
812785e01a auto merge of #14476 : luqmana/rust/docs, r=alexcrichton
We were still generating compiler docs even with --disable-docs passed.

cc @pnkfelix
2014-05-28 18:21:34 -07:00
bors
aa151956a7 auto merge of #14465 : Ryman/rust/patch-1, r=alexcrichton 2014-05-28 16:01:36 -07:00
bors
dc5ce0a970 auto merge of #14298 : kmcallister/rust/pattern-macros, r=huonw
First commit is an unrelated fix for a test suite warning I introduced last week.
2014-05-28 14:21:40 -07:00
Keegan McAllister
fd40d0cf5b Test pattern macros 2014-05-28 12:42:21 -07:00
Keegan McAllister
55776f2822 Parse macros in patterns
Fixes #6830.
2014-05-28 12:42:21 -07:00
Keegan McAllister
b2f6dd53c9 Expand macros in patterns 2014-05-28 12:42:21 -07:00
Keegan McAllister
00704ea33b Add patterns to MacResult 2014-05-28 12:42:21 -07:00
Keegan McAllister
5fdd0e4b05 Add AST node for pattern macros 2014-05-28 12:42:21 -07:00
Keegan McAllister
28a4ee5eeb Silence warning in RefCell test suite 2014-05-28 12:42:21 -07:00
bors
e865415c2f auto merge of #14464 : Sawyer47/rust/issue-12925, r=alexcrichton
This is an attempt of fixing #12925.

This PR moves almost all trait implementations for primitive types ((), bool, char, i*, u*, f*) near trait definitions. Only Float trait implementations weren't moved because they heavily rely on constants defined in f32.rs and f64.rs.

Some trait implementations had cfg(not(test)) attribute. I suspect it's because of issue 2912.
Still, someone who knows the problem better should probably check this code.

Closes #12925
2014-05-28 12:41:40 -07:00
bors
98c2b4b4ac auto merge of #13738 : buttslol/rust/armv7-support, r=alexcrichton
This was required to get ./configure to work on my armv7 test machine.

I haven't found anything sane to feature gate `hf` on that's pokable from the context of the configure script.

It also seems that gcc doesn't work on armv7 by default (rust wants to pass it `-m32` which isn't supported), would it be preferential to make the default `--enable-clang` on arm, or remove the `-m32` flag on that platform?
2014-05-28 11:06:42 -07:00
bors
cd6fb59ee2 auto merge of #14437 : Sawyer47/rust/utf16-items, r=alexcrichton
According to Rust's style guide acronyms should be CamelCase.
2014-05-28 09:26:42 -07:00
Piotr Jawniak
dd0d495f50 Move trait impls for primitives near trait definition
Closes #12925
2014-05-28 17:15:35 +02:00
bors
9659a50957 auto merge of #14463 : SergioBenitez/rust/deprecation-fix, r=alexcrichton
The deprecation warning text for mem::move_val_init was incorrect. It should point users to `overwrite` instead of itself.
2014-05-28 07:46:45 -07:00
bors
24b1ce1daf auto merge of #14458 : huonw/rust/rustdoc-cross-crate-link-path, r=alexcrichton
Previously this was adding one-too-many `..`s to the path for the
`gotosrc=...` links for local crates. Also, the `root_path` already ends
in `/`s so a trailing / shouldn't be added after the root (some servers
treat `...//...` different to `.../...` including the one running
doc.rust-lang.org).
2014-05-28 06:06:47 -07:00
Huon Wilson
3482ab3699 rustdoc: cross-crate source links are one level lower.
Previously this was adding one-too-many `..`s to the path for the
`gotosrc=...` links for local crates. Also, the `root_path` already ends
in `/`s so a trailing / shouldn't be added after the root (some servers
treat `...//...` different to `.../...` including the one running
doc.rust-lang.org).
2014-05-28 22:02:14 +10:00
bors
bee42a9413 auto merge of #14459 : seanmonstar/rust/select-docs, r=alexcrichton 2014-05-28 04:21:42 -07:00
bors
0a092a8158 auto merge of #14455 : crabtw/rust/mips, r=alexcrichton
Because IPv4 address conversion doesn't consider big-endian target, I add functions to handle that.
These function names may need to be changed, but I can't come up with a good one.
2014-05-28 02:41:44 -07:00
Piotr Jawniak
8c5a8e10b2 Rename UTF16Item[s] to Utf16Item[s]
According to Rust's style guide acronyms should be CamelCase.

[breaking-change]
2014-05-28 11:31:21 +02:00
bors
a1838295eb auto merge of #14454 : omasanori/rust/cfg_cxx, r=alexcrichton 2014-05-28 01:06:45 -07:00
Richo Healey
b4e69d4529 configure: setup triples on hf arm platforms 2014-05-27 23:42:35 -07:00
Richo Healey
8e3d2c39a8 configure: Only use -m32 on x86-* 32 bit systems 2014-05-27 23:37:46 -07:00
Richo Healey
2a63e44f12 configure: Move clang's libcpp out into flag 2014-05-27 23:36:36 -07:00
bors
7e049fefc7 auto merge of #14452 : alexcrichton/rust/issue-14438, r=huonw
This commit alters rustdoc to keep a hash set of known inlined items which is a
whitelist for generating URLs to.

Closes #14438
2014-05-27 23:26:47 -07:00
bors
1dea8834cc auto merge of #14364 : alexcrichton/rust/libdebug, r=brson
This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.

This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add `extern crate debug;` to the top of the
crate. Any code relying on reflection will also need to do this.

Closes #12019

[breaking-change]
2014-05-27 21:46:46 -07:00
Alex Crichton
b53454e2e4 Move std::{reflect,repr,Poly} to a libdebug crate
This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.

This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add `extern crate debug;` to the top of the
crate. Any code relying on reflection will also need to do this.

Closes #12019

[breaking-change]
2014-05-27 21:44:51 -07:00
Alex Crichton
4ef535ebd0 rustdoc: Only link to local inlined foreign items
This commit alters rustdoc to keep a hash set of known inlined items which is a
whitelist for generating URLs to.

Closes #14438
2014-05-27 19:33:57 -07:00
bors
73dac7e4e6 auto merge of #14387 : alan-andrade/rust/remove_managed_boxes_and_gc, r=brson
My main goals were:
- be clear when we talk about "references" and "pointers"
- remove Managed boxes completely and the concept of GC.

https://github.com/mozilla/rust/issues/13987
2014-05-27 19:31:46 -07:00
Alex Crichton
034eb4e724 native: Ignore stdio fds with /dev/null
When spawning a process, stdio file descriptors can be configured to be ignored,
which basically means that they'll be closed. Currently this is done by
literally closing the file descriptors in the child, but this can have adverse
side effects if the child process then opens a new file descriptor, assigning it
to a stdio number.

To work around the problems of the child, this commit alters the process
spawning code to map stdio fds to /dev/null on unix (and a similar equivalent on
windows) when they are specified as being ignored. This should allow spawned
programs to have more expected behavior when opening new files.

Closes #14456
2014-05-27 17:49:31 -07:00
bors
911cc9c352 auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, r=alexcrichton
This should block on #14323
2014-05-27 17:46:48 -07:00
Luqman Aden
213d54e06c mk: Don't build any docs with --disable-docs. 2014-05-27 20:17:17 -04:00
bors
30bf73fd78 auto merge of #14447 : erickt/rust/show-treemap, r=kballard
This is a hodge podge of a couple small cleanup commits. It implements `Show` for `TreeMap` and `TreeSet`, and some removal of commented out code.
2014-05-27 16:11:39 -07:00
bors
1fc29ef0c8 auto merge of #14444 : huonw/rust/nice-for-errors, r=alexcrichton
Change `for` desugaring & make refutable pattern errors more precise

This changes for to desugar to the `let`-based pattern match as described in #14390, and adjusts the compiler to use this information for error messages that even mention that it's in a `for` loop.

Also, it makes the compiler record the exact positions of refutable parts of a pattern, to point to exactly them in error messages.
2014-05-27 14:36:40 -07:00
Ryman
ada85a202b rust manual: supertraits seperator is wrong 2014-05-27 21:40:50 +01:00
bors
1e2bb09bbb auto merge of #14435 : P1start/rust/str-docs-fix, r=sfackler
This tweaks the `std::str` docs to compensate for the recent shift from `~str` to `String`.
2014-05-27 13:01:40 -07:00
Richo Healey
c256dcf8b6 doc: Fix link to string
This was missed in 553074506e
2014-05-27 12:59:31 -07:00
Richo Healey
1f1b2e42d7 std: Rename strbuf operations to string
[breaking-change]
2014-05-27 12:59:31 -07:00
bors
5811d2bd96 auto merge of #14428 : alexcrichton/rust/issue-14422, r=pcwalton
This ensures that a public typedef to a private item is ensured to be public in
terms of linkage. This affects both the visibility of the library's symbols as
well as other lints based on privacy (dead_code for example).

Closes #14421
Closes #14422
2014-05-27 11:26:40 -07:00
Sergio Benitez
ac833da183 Fixed deprecation warning text for mem::move_val_init and its associated comment. 2014-05-27 14:15:34 -04:00
Richo Healey
4348e23b26 std: Remove String's to_owned 2014-05-27 11:11:15 -07:00
Erick Tryzelaar
926504c885 collections: implement Show for Tree{Map,Set} 2014-05-27 10:38:52 -07:00
Erick Tryzelaar
e9e799f750 collections: add Show impl test for HashMap 2014-05-27 10:20:02 -07:00
Erick Tryzelaar
85d9cfb809 serialize: Remove old commented out code 2014-05-27 10:20:02 -07:00
Jyun-Yan You
abc2a92d9c fix MIPS target 2014-05-28 01:15:24 +08:00
Alex Crichton
49a65815f1 rustc: Account for typedefs in privacy
This ensures that a public typedef to a private item is ensured to be public in
terms of linkage. This affects both the visibility of the library's symbols as
well as other lints based on privacy (dead_code for example).

Closes #14421
Closes #14422
2014-05-27 09:04:08 -07:00
Sean McArthur
c710023197 std: change select! docs from 'ports' to 'receivers' 2014-05-27 07:20:06 -07:00
OGINO Masanori
f36204c7e8 Use clang++ for CXX when --enable-clang.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-05-27 18:48:32 +09:00
bors
a01bedc2cd auto merge of #14429 : sanrodari/rust/patch-1, r=sfackler 2014-05-27 02:16:32 -07:00