Patrick Walton
c7522417d4
libstd: Remove some residual mutable fields
2013-05-08 17:04:00 -07:00
bors
38a6a7a394
auto merge of #6276 : brson/rust/issue-6122, r=graydon
2013-05-07 06:06:42 -07:00
Brian Anderson
3cafe905a4
std: Workaround bustage on incoming. #6122
2013-05-06 12:28:51 -07:00
Niko Matsakis
4300d4d2fa
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
...
Conflicts:
src/libcore/core.rc
src/libcore/hashmap.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/num.rs
src/libcore/num/strconv.rs
src/libcore/num/uint-template.rs
src/libcore/ops.rs
src/libcore/os.rs
src/libcore/prelude.rs
src/libcore/rt/mod.rs
src/libcore/unstable/lang.rs
src/librustc/driver/session.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans.rs
src/librustc/middle/borrowck/loan.rs
src/librustc/middle/borrowck/preserve.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/region.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/inline.rs
src/librustc/middle/trans/reachable.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/util/ppaux.rs
src/libstd/arena.rs
src/libstd/ebml.rs
src/libstd/json.rs
src/libstd/serialize.rs
src/libstd/std.rc
src/libsyntax/ast_map.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail/borrowck-uniq-via-box.rs
src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs
src/test/run-pass/borrowck-nested-calls.rs
2013-05-05 15:11:04 -04:00
Brian Anderson
8081e8debf
Register snapshots
2013-05-04 15:43:51 -07:00
Patrick Walton
dc5df61bc1
librustc: Update the serializer to work properly with INHTWAMA, removing mutable fields in the process
2013-05-02 17:00:51 -07:00
Niko Matsakis
418f991118
allover: numerous unused muts etc
2013-04-30 14:10:21 -04:00
Niko Matsakis
202b8dcdc4
adapt to snapshot
2013-04-30 06:43:02 -04:00
Daniel Micay
f792baba42
only use #[no_core] in libcore
2013-04-27 21:34:24 -04:00
Patrick Walton
2dbe20a561
libstd: Micro-optimize vuint_at
2013-04-19 11:53:34 -07:00
Erick Tryzelaar
f3ab67ec5f
syntax: add {read,emit}_enum_struct_variant{,_field}
2013-04-10 16:32:09 -07:00
Erick Tryzelaar
e31f7b7c74
std: add serialize {read,emit}_tuple{,_arg,_struct,_struct_arg}
2013-04-10 16:32:09 -07:00
Erick Tryzelaar
419f6acf0e
std: rename {read,emit}_field to {read,emit}_struct_field
2013-04-10 16:08:22 -07:00
Erick Tryzelaar
97cc571358
std: clean up the order of {De,En}codable methods
2013-04-10 16:08:22 -07:00
Erick Tryzelaar
0de7635f53
Merge remote-tracking branch 'remotes/origin/incoming' into serial
2013-03-29 17:48:44 -07:00
Erick Tryzelaar
529ae38605
Merge remote-tracking branch 'remotes/origin/incoming' into serial
2013-03-29 17:41:32 -07:00
Patrick Walton
1e91595520
librustc: Remove fail_unless!
2013-03-29 16:39:08 -07:00
Brian Anderson
518c295a03
Register snapshots
2013-03-29 11:30:42 -07:00
Erick Tryzelaar
31563f53d9
Merge remote-tracking branch 'remotes/origin/incoming' into serial
2013-03-29 09:06:36 -07:00
Erick Tryzelaar
d1a83e6986
std: add Encoder::emit_map and Decoder::read_map
2013-03-29 09:04:35 -07:00
Erick Tryzelaar
90b3658cd6
std: remove Encoder::read_rec and Decoder::emit_rec
2013-03-29 07:05:54 -07:00
Erick Tryzelaar
e99cdcfba8
std: remove Encoder::emit_tup{,_elt} and Decoder::read_tup{,_elt}
2013-03-29 07:05:54 -07:00
Erick Tryzelaar
590bbcebe9
std: remove Encoder::emit_{owned,managed}_vec and Decoder::read_{owned,managed}_vec
2013-03-29 07:05:54 -07:00
Erick Tryzelaar
63fc88757f
std: remove Encoder::emit_{owned,managed} and Decoder::read_{owned,managed}
2013-03-29 07:05:54 -07:00
Erick Tryzelaar
8b43c620b9
std: remove Encoder::emit_{owned,managed}_str and Decoder::read_{owned,managed}_str
2013-03-29 07:05:54 -07:00
Alex Crichton
be57d745d2
Removing unused imports
2013-03-28 23:56:46 -04:00
Erick Tryzelaar
b05e148dc9
std: change Decoder::read_option to return a generic type
...
This allows read_option to be used with a custom option type instead
of just core::Option.
2013-03-28 20:34:33 -07:00
Erick Tryzelaar
aa779c1240
std: change Decoder::read_option to return a generic type
...
This allows read_option to be used with a custom option type instead
of just core::Option.
2013-03-28 13:11:24 -07:00
bors
b1c0a6628b
auto merge of #5595 : catamorphism/rust/demoding, r=catamorphism
2013-03-28 04:54:45 -07:00
bors
84ddff3909
auto merge of #5578 : erickt/rust/incoming, r=jbclements,erickt
...
Hey folks,
This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code:
```
enum A {
B,
C(~str, uint)
}
```
and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html ). I've added tests to make sure all this work.
In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing.
I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572 ), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27 21:51:53 -07:00
Tim Chevalier
31f8093037
core: Remove unused import
2013-03-27 17:14:06 -07:00
Niko Matsakis
069529bc5c
Autoref the argument to the index operator ( #4920 )
2013-03-27 13:04:03 -04:00
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
Patrick Walton
85c9fc6f8f
librustc: Remove the const
declaration form everywhere
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
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
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
Alex Crichton
dfb5c10dea
Remove unused imports throughout src/
2013-03-04 12:27:01 -05:00
Jihyun Yu
95bc9ea26d
Remove REC, change related tests/docs
2013-03-02 12:57:05 +09:00
Patrick Walton
107bf96ff0
librustc: Mark all type implementations public. rs=impl-publicity
2013-02-28 11:32:24 -08:00
bors
566bcf2225
auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brson
...
Issue #3869
review? @nikomatsakis
Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
Fix windows build error. `buf` is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 13:54:49 -08:00
Luqman Aden
4cf51c2531
libstd: Get rid of move
.
2013-02-15 02:49:54 -08:00
Nick Desaulniers
5d62a4a52e
Convert all uses of vec::slice to vec::view Issue #3869
...
Rename const_view to const_slice
Renamed mut_view to mut_slice
2013-02-14 16:14:32 -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
4445b38df2
Remove die!, raplace invocations with fail! Issue #4524 pt 3
2013-02-13 17:01:32 -08: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
Tim Chevalier
73a7672b8d
std: Stamp out structural records
...
See #4665
2013-02-04 16:48:52 -08:00