Commit Graph

18888 Commits

Author SHA1 Message Date
bors
de3000af8f auto merge of #6948 : huonw/rust/less-alloc, r=bstrie 2013-06-05 06:46:51 -07:00
bors
e2d0a30fa2 auto merge of #6947 : Blei/rust/fix-dup-freevars, r=bstrie 2013-06-05 05:19:41 -07:00
Huon Wilson
b871c46934 syntax: Remove an unnecessary allocation. 2013-06-05 21:57:24 +10:00
Philipp Brüschweiler
c08df70f2b rust::driver: remove accidental double freevar calculation 2013-06-05 13:31:19 +02:00
bors
de82bde00d auto merge of #6944 : pcwalton/rust/multiple-patterns-in-let, r=nikomatsakis
r? @nikomatsakis
2013-06-05 04:22:34 -07:00
Patrick Walton
8114d0e950 librustc: Disallow multiple patterns from appearing in a "let" declaration.
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04 21:45:42 -07:00
Patrick Walton
16086ecff7 libsyntax: Remove pub impl from the language 2013-06-04 21:45:42 -07:00
bors
9873f67e94 auto merge of #6942 : thestinger/rust/cleanup, r=catamorphism
borrowed pointers already implement Eq and Ord with deep comparisons
2013-06-04 17:55:34 -07:00
bors
cf2b00dc8b auto merge of #6941 : Thiez/rust/pub_atomics, r=thestinger
As the title suggests, this marks all the fns on the impls on the atomic types in std::unstable::atomics as pub, which makes them significantly more usable (they are rather unusable otherwise).
r?
2013-06-04 16:52:34 -07:00
Daniel Micay
5148e2f78b sys: get rid of shape functions
borrowed pointers already implement Eq and Ord with deep comparisons
2013-06-04 19:00:19 -04:00
bors
c75c11a061 auto merge of #6939 : thestinger/rust/clone, r=catamorphism
`@T` and `@mut T` for `T: Const` have `DeepClone`
2013-06-04 15:58:40 -07:00
Daniel Micay
61ac5fdab7 clone: fix docstring
@T and @mut T for T: Const have DeepClone
2013-06-04 18:40:50 -04:00
Matthijs Hofstra
979b037e5a Made fns in the impls for the Atomic structs pub 2013-06-05 00:37:52 +02:00
bors
69511c219c auto merge of #6928 : Blei/rust/fix-constructors, r=bstrie
As part of #3853
2013-06-04 09:37:41 -07:00
Philipp Brüschweiler
1eb3a35094 std::util: fix missed old constructor 2013-06-04 17:29:38 +02:00
Philipp Brüschweiler
3ce75e786d std::util: Modernize NonCopyable constructor
part of #3853
2013-06-04 14:08:25 +02:00
Philipp Brüschweiler
e1c1c059c6 std::io: Modernize some constructors
Part of #3853
2013-06-04 12:47:45 +02:00
Philipp Brüschweiler
34ee63e93b std::cell: Modernize constructors
Part of #3853
2013-06-04 12:03:58 +02:00
bors
b50030718c auto merge of #6927 : jld/rust/monomorphize-abi-alignment, r=sanxiyn 2013-06-04 02:10:33 -07:00
Jed Davis
0c9510ac38 Use ABI alignment, not "preferred" alignment, to unify monomorphizations.
See the comment in the added test case for details.
2013-06-04 00:18:48 -07:00
bors
133d451715 auto merge of #6886 : jld/rust/vec-each-ret-fix, r=sanxiyn 2013-06-03 18:55:29 -07:00
bors
af418f2fd5 auto merge of #6924 : msullivan/rust/incoming, r=pcwalton 2013-06-03 17:28:33 -07:00
Michael Sullivan
d85938f7c8 Make type_is_pod handle structs correctly. Closes #6868. 2013-06-03 17:16:12 -07:00
bors
13aa18891c auto merge of #6910 : Blei/rust/fix-6698, r=pcwalton
Fixes #6698
2013-06-03 15:40:29 -07:00
bors
846545a6e1 auto merge of #6907 : steveklabnik/rust/prelude_docs, r=graydon 2013-06-03 14:37:39 -07:00
bors
8a43b318bf auto merge of #6826 : cmr/rust/terminfo, r=thestinger
This will let *everyone* (non-windows, at least) who can see colors see the glorious colors rustc produces.
2013-06-03 13:34:56 -07:00
Corey Richardson
ae5f3de5f0 Ignore tests that cannot pass on buildbot 2013-06-03 16:05:46 -04:00
bors
c68c015798 auto merge of #6906 : catamorphism/rust/rustpkg-doc, r=graydon
r? @graydon
2013-06-03 12:32:05 -07:00
Steve Klabnik
fe70361bb6 Add better documentation for the Prelude. 2013-06-03 11:49:06 -07:00
bors
5ddbc881c5 auto merge of #6913 : thestinger/rust/ptr, r=graydon
Closes #6607

I went with `RawPtr` instead of `UnsafePtr` because not all of these operations are `unsafe`, so to me it makes more sense to refer to it as a "raw" (not wrapped/abstracted) pointer. If we decide on something else in #6608 it can be renamed again.
2013-06-03 11:38:09 -07:00
Daniel Micay
e900dba28a rename the Ptr trait to RawPtr
Closes #6607
2013-06-03 13:50:29 -04:00
Philipp Brüschweiler
394ac1aae4 resolve: don't resolve paths that point to non-static methods
Fixes #6698
2013-06-03 13:31:43 +02:00
Philipp Brüschweiler
45441e046b Add test for issue #6698 2013-06-03 13:09:26 +02:00
bors
4f6285fbf9 auto merge of #6903 : dotdash/rust/self_by_value, r=catamorphism
For types that are passed by value, we can't just cast the value to a
pointer, but have to use an alloca and copy the value there. This
handling is already present for all other arguments, but was missing
for "self".

Fixes #6682 #4850 #4878
2013-06-02 22:31:36 -07:00
bors
9b60ecc30e auto merge of #6908 : bjz/rust/concat-connect, r=Aatch
This adds the following traits to `prelude`:

In `std::str`, impled on `&[~[T]]` and `&[&[T]]`:
~~~rust
pub trait StrVector {
    pub fn concat(&self) -> ~str;
    pub fn connect(&self, sep: &str) -> ~str;
}
~~~

In `std::vec`, impled on `&[~str]` and `&[&str]`:
~~~rust
pub trait VectorVector<T> {
    pub fn concat(&self) -> ~[T];
    pub fn connect(&self, sep: &T) -> ~[T];
}
~~~
2013-06-02 21:37:38 -07:00
Brendan Zabarauskas
dee7c5af69 Add traits for concat and connect methods 2013-06-03 13:19:37 +10:00
Tim Chevalier
5b09dca90b docs: Mention recently-added rustpkg features in the rustpkg manual 2013-06-02 17:21:01 -07:00
bors
c40baf68cb auto merge of #6905 : thestinger/rust/ptr, r=catamorphism
The ptr module is intended to be for raw pointers.

Closes #3111
2013-06-02 16:55:33 -07:00
Daniel Micay
454133127a ptr: split out borrowed pointer utilities
The ptr module is intended to be for raw pointers.

Closes #3111
2013-06-02 19:24:33 -04:00
bors
dad945646f auto merge of #6879 : yichoi/rust/arm-test, r=brson
Fix #6353 and better support for ARM Test
2013-06-02 15:49:30 -07:00
Björn Steinbrink
b51f44e21b Fix passing self by value for types passed by value
For types that are passed by value, we can't just cast the value to a
pointer, but have to use an alloca and copy the value there. This
handling is already present for all other arguments, but was missing
for "self".

Fixes #6682, #4850 and #4878
2013-06-03 00:06:09 +02:00
bors
63b11e48e5 auto merge of #6866 : pcwalton/rust/pub-extern, r=brson
r? @brson
2013-06-02 14:55:33 -07:00
bors
077ca79941 auto merge of #6867 : Dretch/rust/hashmap_get_mut, r=nikomatsakis 2013-06-02 09:16:40 -07:00
gareth
d443fc6d90 Add a get_mut method to accompany the get method. 2013-06-02 16:22:43 +01:00
bors
c354a0c7eb auto merge of #6896 : nickdesaulniers/rust/issue4501, r=brson
review? @brson
2013-06-01 22:37:35 -07:00
bors
14c331053e auto merge of #6815 : kballard/rust/hashmap-insert_or_modify_with, r=erickt
`std::hashmap::HashMap.insert_or_update_with()` is basically the opposite
of `find_or_insert_with()`. It inserts a given key-value pair if the key
does not already exist, or replaces the existing value with the output
of the passed function if it does.

This is useful because replicating this with existing functionality is awkward, especially with the current borrow-checker. In my own project I have code that looks like

	if match map.find_mut(&key) {
		None => { true }
		Some(x) => { *x += 1; false }
	} {
		map.insert(key, 0);
	}

and it took several iterations to make it look this good. The new function turns this into

    map.insert_or_update_with(key, 0, |_,x| *x += 1);
2013-06-01 21:31:36 -07:00
bors
96f6f29477 auto merge of #6891 : luqmana/rust/unit-struct-drop, r=catamorphism 2013-06-01 20:16:39 -07:00
Luqman Aden
101e3872fe Mark run-pass/unit-like-struct-drop-run.rs as xfast-fail. 2013-06-01 22:35:55 -04:00
bors
fc5debd8fd auto merge of #6807 : catamorphism/rust/rustpkg-extern-mod, r=catamorphism
r? @graydon Addresses #5681
2013-06-01 19:22:42 -07:00
Tim Chevalier
60126e9365 testsuite: Add an xfailed test case for the new extern mod syntax 2013-06-01 18:48:07 -07:00