Commit Graph

26046 Commits

Author SHA1 Message Date
Corey Richardson
25fe2cadb1 Remove rustpkg.
I'm sorry :'(

Closes #11859
2014-02-02 03:08:56 -05:00
bors
dce61c980e auto merge of #11948 : huonw/rust/show, r=alexcrichton
- renames `Default` to `Show`
- introduces some hidden `std::fmt::secret_...` functions, designed to work-around the lack of UFCS (with UFCS they can be replaced by referencing the trait methods directly) because I'm going to convert the traits to have methods rather than static functions, since `#[deriving]` works much better with true methods.

I'm blocked on a snapshot after this. (I could probably do a large number of `#[cfg]`s, but I can work on other things in the meantime.)
2014-02-01 22:31:26 -08:00
Huon Wilson
c19a7b6857 Remove the SNAP line to work around #11985. 2014-02-02 16:22:54 +11:00
Huon Wilson
d8b6919d4f std::fmt: prepare to convert the formatting traits to methods, and work
around the lack of UFCS.

The further work is pending a snapshot, to avoid putting #[cfg(stage0)]
attributes on all the traits and duplicating them.
2014-02-02 14:19:05 +11:00
bors
16f1a72f0a auto merge of #11975 : jfager/rust/r8498, r=alexcrichton
Closes #8498
2014-02-01 19:16:26 -08:00
Huon Wilson
003ce50235 std: rename fmt::Default to Show.
This is a better name with which to have a #[deriving] mode.

Decision in:
https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-01-28
2014-02-02 12:55:15 +11:00
bors
3e39e3e80d auto merge of #11959 : omasanori/rust/update-zsh, r=brson
Updating the list of options and sorting it.
2014-02-01 17:26:24 -08:00
bors
a72ab2d31c auto merge of #11840 : cmr/rust/cstr, r=kballard 2014-02-01 15:46:25 -08:00
Corey Richardson
a7f0ecf562 impl Eq for CString 2014-02-01 18:24:44 -05:00
Corey Richardson
73024e4b85 impl Clone for CString
Clone tests
2014-02-01 18:24:44 -05:00
bors
2bcd951749 auto merge of #11974 : huonw/rust/no-at-vec, r=pcwalton
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find.

I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship.

Closes #11967
2014-02-01 11:16:24 -08:00
bors
60ffbeb2a4 auto merge of #11973 : dotdash/rust/u64_to_bytes, r=huonw
LLVM fails to properly optimize the shifts used to convert the source
value to the right endianess. The resulting assembly copies the value
to the stack one byte at a time even when there's no conversion required
(e.g. u64_to_le_bytes on a little endian machine).

Instead of doing the conversion ourselves using shifts, we can use the
existing intrinsics to perform the endianess conversion and then
transmute the value to get a fixed vector of its bytes.

Before:
````
test be_i8  ... bench:     21442 ns/iter (+/- 70)
test be_i16 ... bench:     21447 ns/iter (+/- 45)
test be_i32 ... bench:     23832 ns/iter (+/- 63)
test be_i64 ... bench:     26887 ns/iter (+/- 267)

test le_i8  ... bench:     21442 ns/iter (+/- 56)
test le_i16 ... bench:     21448 ns/iter (+/- 36)
test le_i32 ... bench:     23825 ns/iter (+/- 153)
test le_i64 ... bench:     26271 ns/iter (+/- 138)
````
After:
````
test be_i8  ... bench:     21438 ns/iter (+/- 10)
test be_i16 ... bench:     21441 ns/iter (+/- 15)
test be_i32 ... bench:     19057 ns/iter (+/- 6)
test be_i64 ... bench:     21439 ns/iter (+/- 34)

test le_i8  ... bench:     21438 ns/iter (+/- 19)
test le_i16 ... bench:     21439 ns/iter (+/- 8)
test le_i32 ... bench:     21439 ns/iter (+/- 19)
test le_i64 ... bench:     21438 ns/iter (+/- 22)
````
2014-02-01 10:01:25 -08:00
Jason Fager
e704561003 un-xfail test for #8498 and replace prints w/ asserts 2014-02-01 12:36:59 -05:00
Huon Wilson
212507413a rustc: update docs & propagate @[]/@str removal more.
Various functions can now be made specific to ~[], or just non-managed
vectors.
2014-02-02 02:59:04 +11:00
Huon Wilson
c8947c14c3 syntax: remove the unused Vstore enum.
Seems to have been replaced by ExprVstore.
2014-02-02 02:59:04 +11:00
Huon Wilson
ec4b456b26 rustc: Remove the vstore handling of @str and @[]. 2014-02-02 02:59:04 +11:00
Huon Wilson
e39cd20a43 syntax: remove the handling of @str and @[] from the parser completely. 2014-02-02 02:59:04 +11:00
Huon Wilson
aadcf29766 syntax: add an obsolete syntax warning for @[]. 2014-02-02 02:59:04 +11:00
Huon Wilson
f8734df515 rustc: remove use of @[]. 2014-02-02 02:59:03 +11:00
Huon Wilson
891ada9be1 syntax: convert LitBinary from @[u8] to Rc<~[u8]>. 2014-02-02 02:59:03 +11:00
Huon Wilson
b972cadf61 Update/delete tests using @[]. 2014-02-02 02:59:03 +11:00
Huon Wilson
f63c3fba4c arena: stop using @[]. 2014-02-02 02:59:03 +11:00
Huon Wilson
2ed980fe25 std,extra: remove use of & support for @[]. 2014-02-02 02:59:03 +11:00
Huon Wilson
e0c1707560 Changes from the review of the @str PR. 2014-02-02 02:59:03 +11:00
Huon Wilson
f502576fc7 Fix @str removal tests. 2014-02-02 02:58:57 +11:00
bors
df044ea4ac auto merge of #11944 : nathanielherman/rust/vec_opt, r=alexcrichton
Closes #11733
2014-02-01 07:21:23 -08:00
Patrick Walton
c594e675eb librustc: Remove @str from the language 2014-02-02 01:44:50 +11:00
Patrick Walton
449a7a817f libextra: Remove @str from all the libraries 2014-02-02 01:44:50 +11:00
Patrick Walton
4dbcf800d5 doc: Remove references to @str from the documentation 2014-02-02 01:44:50 +11:00
Patrick Walton
8b8419293c libsyntax: Remove @str from the interner 2014-02-02 01:44:49 +11:00
Patrick Walton
7a80fa647a test: Remove @str from the test suite 2014-02-02 01:44:49 +11:00
Patrick Walton
17b01041c2 librustc: Remove one more @str from librustc 2014-02-02 01:44:49 +11:00
Patrick Walton
4018d77f22 libsyntax: Remove an @str in pretty printing 2014-02-02 01:44:49 +11:00
Patrick Walton
e5dc347ccf libsyntax: Remove the interner_get function and all uses 2014-02-02 01:44:49 +11:00
Patrick Walton
a695b62118 librustc: Remove uses of interner_get in librustc 2014-02-02 01:44:49 +11:00
Patrick Walton
0d0a3dad68 libsyntax: Remove uses of token::ident_to_str() 2014-02-02 01:44:49 +11:00
Patrick Walton
875c9ce30b libsyntax: Remove many uses of token::ident_to_str 2014-02-02 01:44:49 +11:00
Patrick Walton
e534b565e6 librustc: Remove uses of token::ident_to_str() from librustc 2014-02-02 01:44:49 +11:00
Patrick Walton
344040d470 librustc: Get rid of ident_to_str calls in resolve 2014-02-02 01:44:49 +11:00
Patrick Walton
64a3a4169c librustc: Get rid of calls to token::ident_to_str in debug info 2014-02-02 01:44:49 +11:00
Patrick Walton
21f86855dd librustc: De-@str ident() and str_of() 2014-02-02 01:44:49 +11:00
Patrick Walton
19d4ea1cba librustc: De-@str the LLVM symbol list 2014-02-02 01:44:49 +11:00
Patrick Walton
0f3a4e13f9 librustc: De-@str type short names 2014-02-02 01:44:49 +11:00
Patrick Walton
e9ce855beb librustc: De-@str liveness 2014-02-02 01:44:49 +11:00
Patrick Walton
b265dd4156 librustc: De-@str symbol hashing 2014-02-02 01:44:49 +11:00
Patrick Walton
1e0c07d011 librustc: De-@str debuginfo 2014-02-02 01:44:49 +11:00
Patrick Walton
daf5e6f6f4 librustc: De-@str resolve 2014-02-02 01:44:49 +11:00
Patrick Walton
9869374256 librustc: Remove a bunch of @str from the compiler around metadata
handling
2014-02-02 01:44:48 +11:00
Patrick Walton
b890237e79 libsyntax: Fix tests. 2014-02-02 01:44:48 +11:00
Patrick Walton
52eeed2f73 libsyntax: De-@str MacroDef 2014-02-02 01:44:48 +11:00