Erick Tryzelaar
4d6dcefcbb
std: Decode::read_enum_variant should pass in the variant names
...
Because the json::Decoder uses the string variant name, we need a
way to correlate the string to the enum index. This passes in a
static &[&str] to read_enum_variant, which allows the json::Decoder
to know which branch it's trying to process.
2013-03-27 07:04:13 -07:00
Erick Tryzelaar
478e4498b7
std: add option type directly to serialize::{En,De}code
2013-03-27 07:04:12 -07:00
Erick Tryzelaar
4d995e66a2
std: change default json enum encoder to use strings or a flat vec
2013-03-27 07:04:12 -07:00
Erick Tryzelaar
b10b8c3ee4
std: Add tests for json decoding options
2013-03-27 07:04:11 -07:00
Erick Tryzelaar
c9188c8301
std: fix json PrettyEncoder and add tests
2013-03-27 07:04:10 -07:00
Erick Tryzelaar
6cf99fa54a
std: change fail_unless to assert_eq in json.rs
2013-03-27 07:04:09 -07:00
Erick Tryzelaar
b290863be6
std: clean json test imports
2013-03-27 07:01:50 -07:00
Patrick Walton
8b56a8380b
librustc: Modify all code to use new lifetime binder syntax
2013-03-26 21:30:17 -07:00
Alex Crichton
fa7772893a
Remove unused imports throughout
2013-03-26 19:20:02 -04:00
Marvin Löbel
b9de2b5787
Switched over a bunch of splitting funktions to non-allocating iterators
2013-03-26 14:59:17 +01:00
Andrew Paseltiner
45677eebf2
replace impls with deriving
where applicable
2013-03-23 06:57:30 -04:00
Patrick Walton
6d81307a9b
librustc: Add explicit lifetime binders and new lifetime notation in core/std/syntax/rustc
2013-03-22 22:24:35 -07:00
Patrick Walton
c1084091d4
libstd: Remove all uses of pure
from libstd. rs=depure
2013-03-22 10:29:17 -07:00
bors
ec8345b18a
auto merge of #5407 : jbclements/rust/add-assert-eq-macro, r=jbclements
...
Adds an assert_eq! macro that asserts that its two arguments are equal. Error messages can therefore be somewhat more informative than a simple assert, because the error message includes "expected" and "given" values.
2013-03-21 15:24:54 -07:00
John Clements
3cd65c233d
change some uses of fail_unless to assert_eq
2013-03-20 16:05:59 -07:00
Erick Tryzelaar
cefecd8601
core: add str::each{,i}_reverse
2013-03-20 07:53:23 -07:00
Patrick Walton
e78f2e2ac5
librustc: Make the compiler ignore purity.
...
For bootstrapping purposes, this commit does not remove all uses of
the keyword "pure" -- doing so would cause the compiler to no longer
bootstrap due to some syntax extensions ("deriving" in particular).
Instead, it makes the compiler ignore "pure". Post-snapshot, we can
remove "pure" from the language.
There are quite a few (~100) borrow check errors that were essentially
all the result of mutable fields or partial borrows of `@mut`. Per
discussions with Niko I think we want to allow partial borrows of
`@mut` but detect obvious footguns. We should also improve the error
message when `@mut` is erroneously reborrowed.
2013-03-18 17:21:16 -07:00
Patrick Walton
352c070365
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
2013-03-18 17:21:14 -07:00
Patrick Walton
b1c699815d
librustc: Don't accept as Trait
anymore; fix all occurrences of it.
2013-03-13 20:07:09 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Alex Crichton
62651df2b4
Fix dvec-related fallout in tests
2013-03-08 09:56:52 -05:00
Alex Crichton
87f864292d
std: Remove uses of DVec
2013-03-08 09:54:20 -05:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
Ben Striegel
0fed29cfb7
De-implicit-self libstd
2013-03-07 21:11:09 -05:00
Niko Matsakis
3168fe06ff
Add manual &self/ and &static/ and /&self declarations that
...
are currently inferred. New rules are coming that will require
them to be explicit. All add some explicit self declarations.
2013-03-06 15:12:57 -05:00
Erick Tryzelaar
743cfce703
core: convert vec::{last,last_opt} to return references
2013-03-05 19:39:18 -08:00
Alex Crichton
2df07ddc25
Fix implicit leaks of imports throughout libraries
...
Also touch up use of 'pub' and move some tests around so the tested functions
don't have to be 'pub'
2013-02-28 18:00:34 -05:00
Patrick Walton
07c3f5c0de
librustc: Forbid pub
or priv
before trait implementations
2013-02-27 09:40:16 -08:00
John Clements
27b06777e6
Cleanup, commenting, trivial renaming
2013-02-21 16:17:06 -08:00
Patrick Walton
bf2a225c0b
librustc: Separate most trait bounds with '+'. rs=plussing
2013-02-20 21:14:20 -08:00
Patrick Walton
bb833ca0f0
librustc: Stop parsing impl Type : Trait
and fix several declarations that slipped through. r=tjc
2013-02-15 16:59:56 -08:00
Luqman Aden
4cf51c2531
libstd: Get rid of move
.
2013-02-15 02:49:54 -08:00
bors
af2f0ef088
auto merge of #4927 : sanxiyn/rust/remove-dvec, r=catamorphism
2013-02-14 17:23:18 -08:00
bors
3c07d037cd
auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brson
...
review? @brson
Issue #4524
2013-02-14 15:37:48 -08:00
Patrick Walton
9143688197
librustc: Replace impl Type : Trait
with impl Trait for Type
. rs=implflipping
2013-02-14 14:44:12 -08:00
Nick Desaulniers
4699ac67c6
Remove all final references to die!
2013-02-14 13:09:09 -08:00
Seo Sanghyeon
9324f497b2
Remove DVec from json
2013-02-14 22:51:01 +09:00
Nick Desaulniers
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08:00
John Clements
c05954a76b
added issue for reference in FIXME
2013-02-10 11:25:46 -08:00
John Clements
7736ed6c62
json tidy
2013-02-09 13:37:05 -08:00
John Clements
c952c04462
re-special-case Option in JSON encoding
2013-02-09 13:37:05 -08:00
John Clements
f91160b687
json add enum encoder test case
2013-02-09 13:37:04 -08:00
John Clements
0e9495b980
json bugfix
2013-02-09 13:37:04 -08:00
John Clements
394f8eeb7e
tidy
2013-02-09 13:37:04 -08:00
John Clements
fe82374328
json bugfixes
2013-02-09 13:37:04 -08:00
John Clements
765961438d
fix typos in sample code, add enum to json encoder, add test case
2013-02-09 13:37:04 -08:00
bors
d90abd5879
auto merge of #4848 : nikomatsakis/rust/issue-4821-bad-kind-computation, r=catamorphism
...
...ear
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
r? @catamorphism
2013-02-09 10:20:55 -08:00
Niko Matsakis
a380df809c
Fix subtle error in caching during kind computation that could cause linear
...
values to be copied. Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.
Fixes #4821 .
2013-02-08 07:20:39 -08:00
Daniel Micay
9599cc86f0
implement BaseIter for LinearMap
2013-02-07 22:28:58 -05:00
Niko Matsakis
a32498d846
Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
...
correct handling of moves for struct-record update.
Part of #3678 . Fixes #2828 , #3904 , #4719 .
2013-02-07 05:53:30 -08:00