Commit Graph

20163 Commits

Author SHA1 Message Date
Daniel Micay
23da380291 force LLVM clean 2013-07-03 23:23:29 -04:00
Steven Fackler
1482cf5ded Base64 API changes
There's now an enum to pick the character set instead of a url_safe
bool.

from_base64 now returns a Result<~[u8], ~str> and returns an Err instead
of killing the task when it is called on invalid input.

Fixed documentation examples.
2013-07-03 22:45:39 -04:00
Steven Fackler
5a8a30f45b Added functionality to Base64 package
The Base64 package previously had extremely basic functionality. It only
suported the standard encoding character set, didn't support line breaks
and always padded output. This commit makes it significantly more
powerful.

The FromBase64 impl now supports all of the standard variants of Base64.
It ignores newlines,interprets '-' and '_' as well as '+' and '/' and
doesn't require padding. It isn't incredibly pedantic and will
successfully parse strings that are not strictly valid, but I don't
think the extra complexity required to make it accept _only_ valid
strings is worth it.

The ToBase64 trait has been modified such that to_base64 now takes a
base64::Config struct which contains the output format configuration.
This currently includes the selection of character set (standard or
url safe), whether or not to pad and an optional line break width. The
package comes with three static Config structs for the RFC 4648
standard, RFC 4648 url safe and RFC 2045 MIME formats.

The other option for configuring ToBase64 output would be to have one
method with the configuration flags passed and other traits with default
impls for the common cases, but I think that's a little messier.
2013-07-03 22:45:38 -04:00
Graydon Hoare
f80d6dc4c1 rustc: improve -Z trans-stats to report per-fn LLVM instruction counts and translation timing 2013-07-03 18:06:36 -07:00
bors
3c0a1621b5 auto merge of #7542 : alexcrichton/rust/patch-rusti, r=cmr
Doesn't disable it completely, also removes the bogus `rc` file.
2013-07-03 17:40:56 -07:00
Gareth Smith
908a22b626 Address @catamorphism's error message grammar nit. 2013-07-03 23:43:03 +01:00
bors
648c5e9c92 auto merge of #7534 : bblum/rust/soundness-messages, r=catamorphism 2013-07-03 15:25:55 -07:00
Brian Anderson
1098d6980b Merge remote-tracking branch 'mozilla/master'
Conflicts:
	src/libextra/test.rs
	src/libstd/at_vec.rs
	src/libstd/cleanup.rs
	src/libstd/rt/comm.rs
	src/libstd/rt/global_heap.rs
	src/libstd/task/spawn.rs
	src/libstd/unstable/lang.rs
	src/libstd/vec.rs
	src/rt/rustrt.def.in
	src/test/run-pass/extern-pub.rs
2013-07-03 14:49:13 -07:00
Gareth Smith
656c8f9143 Make the error messages that result from referencing
nonexistent traits consistent, and add a test.
2013-07-03 22:16:08 +01:00
Michael Sullivan
7238d5a141 Make privacy checking on default methods for cross crate structs not fail. Closes #7481.
It is unclear to me that the way method call privacy checking is done
makes any sense, though. It is only performed if the type is a
struct...
2013-07-03 09:59:45 -07:00
Michael Sullivan
419a14772a Fix make_mono_id to take into account self types. Closes #7536. 2013-07-03 09:59:45 -07:00
bors
0c6fc46c03 auto merge of #7566 : huonw/rust/vec-kill, r=cmr
The last remaining internal iterator in `vec` is `each_permutation`.
2013-07-03 08:16:54 -07:00
Huon Wilson
cdea73cf5b Convert vec::{as_imm_buf, as_mut_buf} to methods. 2013-07-04 00:46:50 +10:00
Huon Wilson
a732a2daff Convert vec::windowed to an external iterator, and add an n-at-a-time chunk iterator. 2013-07-04 00:46:50 +10:00
Huon Wilson
944d904ad4 Convert vec::{split, splitn, rsplit, rsplitn} to external iterators. 2013-07-04 00:46:50 +10:00
Huon Wilson
f19fb2459f Remove standalone comparison functions in vec, make the trait impls better. 2013-07-04 00:46:50 +10:00
Huon Wilson
9207802589 Remove vec::reversed, replaced by iterators. 2013-07-04 00:46:50 +10:00
Huon Wilson
de0d696561 Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by iterators. 2013-07-04 00:46:49 +10:00
Huon Wilson
eee6775642 Implement consuming iterators for ~[], remove vec::{consume, consume_reverse, map_consume}. 2013-07-04 00:46:49 +10:00
bors
1cee9d4c38 auto merge of #7531 : sankha93/rust/master, r=bblum
This pull request fixes #7118.
2013-07-03 06:34:56 -07:00
Philipp Brüschweiler
6ee8fee730 vec: Fix size_hint() of reverse iterators
Fixes #7558
2013-07-03 14:56:26 +02:00
bors
55f155521d auto merge of #7523 : huonw/rust/uppercase-statics-lint, r=cmr
Adds a lint for `static some_lowercase_name: uint = 1;`. Warning by default since it causes confusion, e.g. `static a: uint = 1; ... let a = 2;` => `error: only refutable patterns allowed here`.
2013-07-03 04:31:50 -07:00
bors
6caaa34ded auto merge of #7518 : graydon/rust/stats-improvements, r=catamorphism 2013-07-03 02:49:51 -07:00
bors
ea31b9cca1 auto merge of #7474 : Seldaek/rust/clean-iter, r=thestinger
I think it's WIP - but I wanted to ask for feedback (/cc @thestinger)

I had to move the impl of FromIter for vec into extra::iter because I don't think std can depend on extra, but that's a bit messed up. Similarly some FromIter uses are gone now, not sure if this is fixable or if I made a complete mess here..
2013-07-03 01:07:55 -07:00
bors
025dc6e64e auto merge of #7510 : Dretch/rust/missing-trait-message, r=catamorphism 2013-07-02 22:40:56 -07:00
bors
fc02d69e96 auto merge of #7498 : luqmana/rust/cow, r=catamorphism
Either one works and wget is easier to setup on windows.
2013-07-02 20:58:57 -07:00
Eric Reed
b60cf0c5b0 converted TODOs into XXXs 2013-07-02 17:27:46 -07:00
Eric Reed
6a1a7819c9 Merge remote-tracking branch 'upstream/io' into io
Conflicts:
	src/libstd/rt/test.rs
	src/rt/rustrt.def.in
2013-07-02 16:55:56 -07:00
Eric Reed
e6c57793be IPv6 support for UDP and TCP. 2013-07-02 16:40:57 -07:00
Brian Anderson
f8a4d09f7e std: Use the same task failure message as C++ rt 2013-07-02 16:04:45 -07:00
Brian Anderson
75a913fa03 Merge remote-tracking branch 'toddaaro/niots'
Conflicts:
	src/libstd/rt/sched.rs
2013-07-02 15:50:41 -07:00
Michael Woerister
866a5b1c78 Added support for struct-like enum variants in middle::ty::enum_variants(). 2013-07-02 23:35:36 +02:00
Daniel Micay
ab34864a30 Merge pull request #7187 from nikomatsakis/issue-3238-defer-reasoning-about-regions
Defer reasoning about regions until after regionck
2013-07-02 14:32:21 -07:00
toddaaro
0607178280 A missing ! made it so that the testcase schedule_home_states was throwing spurious assert failures. Why this did not result in the test case failing previously is beyond me. 2013-07-02 11:44:51 -07:00
Brian Anderson
6fd15ffbf9 std::rt: Ignore homed task tests 2013-07-02 11:15:56 -07:00
Steven Fackler
c63b3f8e28 Removing the rename warning
Now that the finalize->drop rename has happened, this hopefully
shouldn't end up changing again.
2013-07-02 09:58:24 -07:00
Steven Fackler
863e75f0a1 Fixed documentation for finalize->drop change 2013-07-02 09:58:18 -07:00
Jed Davis
2f27d43166 GC static_size_of_enum, which was unused 2013-07-02 09:27:11 -07:00
Brian Anderson
a2db7c15ce doc: Update links to 0.7 2013-07-02 09:25:44 -07:00
Alex Crichton
c842f1335d Completely disable rusti on 32-bit hosts 2013-07-02 08:20:12 -07:00
Steven Fackler
3e265e7842 Small documentation changes
I'm leaving the Sized kind undocumented since it isn't fully implemented
yet.
2013-07-01 23:37:11 -07:00
Brian Anderson
451c94343f Ignore all rusti tests harder. #7541 2013-07-01 21:23:36 -07:00
Alex Crichton
87b61296a5 Compare values in TreeMap's 'lt' function
Closes #5194
2013-07-01 19:41:11 -07:00
Brian Anderson
77b98247a2 Ignore all rusti tests. #7541 2013-07-01 18:33:45 -07:00
Niko Matsakis
ef5c439fb0 Correct merge errors, broken tests 2013-07-01 20:43:55 -04:00
Niko Matsakis
4a0469e3d7 Add copyright notice and kill broken test 2013-07-01 20:43:55 -04:00
Niko Matsakis
e416c9fa17 Adjust documentation to describe how closures and closure bounds
affect things.
2013-07-01 20:43:54 -04:00
Niko Matsakis
d7522fec15 Move existing docs into doc.rs 2013-07-01 20:43:54 -04:00
Niko Matsakis
9d48a7d550 convert region_inference into a module, so I can attach docs 2013-07-01 20:43:54 -04:00
Niko Matsakis
79ea26630d move docs into doc.rs 2013-07-01 20:43:54 -04:00