Commit Graph

30072 Commits

Author SHA1 Message Date
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
Alex Crichton
f786f9bb15 rustc: Accept PartialOrd/PartialOrdEq for Eq/Ord
This is a transitionary step towards completing #12517. This change modifies the
compiler to accept Partial{Ord,Eq} as deriving modes which will currently expand
to implementations of PartialOrd and PartialEq (synonyms for Eq/Ord).

After a snapshot, all of deriving(Eq, Ord) will be removed, and after a snapshot
of that, TotalEq/TotalOrd will be renamed to Eq/Ord.
2014-05-28 10:02:06 -07:00
Ariel Ben-Yehuda
2e8bc9924c Issue #13933: Remove transmute_mut from Arc
directly use the internal pointer instead.
2014-05-28 19:39:46 +03: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
Ariel Ben-Yehuda
def2232595 Issue #13933: Remove transmute_mut from IO
The IO libraries casted self to mut so they can pass it to seek(SEEK_CUR, 0).
Fix this by introducing a private seek function that takes &self
  - of course one should be careful with it if he lacks an
    exclusive reference to self.
2014-05-28 19:25:51 +03:00
Alex Crichton
42aed6bde2 std: Remove format_strbuf!()
This was only ever a transitionary macro.
2014-05-28 08:35:41 -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
Simon Sapin
17697c78c5 Doc: static mut is unsafe too
According to the corresponding section, accessing a mutable static variable requires `unsafe` too, and I believe it counts as as language level feature. Add it to the relevant list in the Unsafety section.
2014-05-28 14:19:25 +01: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
Ahmed Charles
4e3db5e0f4 Rename PatUniq to PatBox. Fixes part of #13910. 2014-05-27 22:19:29 -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
Huon Wilson
a167caf106 rustc: clarify warning about native deps for a staticlib.
This adjusts the "unlinked native library" warning one receives when
compiling with `crate_type="staticlib"`. The warning is just trying to
tell the user that they need to link against these libraries, but the
old text wasn't making this obvious; the new text says this explicitly.
2014-05-28 09:03:51 +10: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
Alex Crichton
5c1a70d498 rustc: Use rust strings for failure arguments
This avoids having to perform conversions from `*u8` to `&'static str` which can
suck in a good deal of code.

Closes #14442
2014-05-27 00:33:05 -07:00
Richo Healey
c7fe4ffe3d std: Remove String::from_owned_str as it's redundant
[breaking-change]
2014-05-26 19:06:13 -07:00
Huon Wilson
0df221e993 rustc: provide more precise information about refutable patterns.
The compiler now points exactly which part(s) of a pattern are
refutable, rather than just highlighting the whole pattern.
2014-05-27 09:24:37 +10:00
Huon Wilson
f2a137829e syntax: desugar a for loop to a let binding to get better error
messages when the pattern is refutable.

This means the compiler points directly to the pattern and said that the
problem is the pattern being refutable (rather than just saying that
some value isn't covered in the `match` as it did previously).

Fixes #14390.
2014-05-27 09:24:37 +10:00