Commit Graph

15577 Commits

Author SHA1 Message Date
John Clements
9d962d8466 add test case 2013-02-13 15:08:27 -08:00
John Clements
ded95d2c28 deriving_eq for tokens and binops
Note that the replaced definition of equality on tokens
contains a *huge* shortcut on INTERPOLATED tokens (those
that contain ASTs), whereby any two INTERPOLATED tokens
are considered equal. This seems like a really broken
notion of equality, but it appears that the existing
test cases and the compiler don't depend on it. Niko
noticed this, BTW.

Replace long definition of Eq on tokens and binops
w
2013-02-13 15:08:27 -08:00
John Clements
16da4e15af use node_id for indexing in ast_to_ty_cache 2013-02-13 15:08:27 -08:00
John Clements
0419e36b76 finish deriving_eq in ast 2013-02-13 15:08:27 -08:00
John Clements
819c6d1c04 deriving-eq all over ast 2013-02-13 15:08:27 -08:00
John Clements
17d3a55362 @mut fix 2013-02-13 15:08:27 -08:00
John Clements
25c4676dfa Commenting, test cases, cleanup 2013-02-13 15:08:27 -08:00
John Clements
6d09fc2cd8 removed reference to crate file keywords 2013-02-13 15:08:26 -08:00
bors
5e6d7871c6 auto merge of #4840 : jbclements/rust/add-json-enum-encoding, r=catamorphism
r?

I added code to the JSON encoder to support the serialization of enums.  Before this, the JSON serializer only handled Option, and encoded None as 'null'. Following this change, all enums are encoded as arrays containing the enum name followed by the encoded fields. This appears consistent with the unstated invariant that the resulting output can be mapped back to the input *if* there's a decoder around that knows the types that were in existence when the serialization occurred.

Also, added test cases.
2013-02-13 13:18:38 -08:00
Luqman Aden
2c198561dd rt: Fix alignment in debug_opaque 2013-02-13 15:41:38 -05:00
Luqman Aden
c22d0af14c rt: take into account alignment for debug_opaque. Closes #2667 2013-02-13 15:41:38 -05:00
Luqman Aden
d67e144f68 rt: get rid of rust_fn and replace with fn_env_pair plus a little cleanup. 2013-02-13 15:41:38 -05:00
bors
7393fde763 auto merge of #4515 : graydon/rust/bench-harness, r=graydon
This is scaffolding for the new #[bench] attribute for marking unit tests as benchmarks. They are run with the --bench flag that the test runner now accepts. The runner automatically calibrates a test loop to an appropriate count to get a good per-iteration measurement.
2013-02-13 12:40:54 -08:00
Graydon Hoare
e5aa399e0d rustc and std: teach about #[bench], modernize to use quote_expr! some. 2013-02-13 11:46:25 -08:00
Graydon Hoare
ebe99637fd std: add stats. 2013-02-13 11:46:25 -08:00
Graydon Hoare
73280b0472 core: add abs to num. 2013-02-13 11:46:25 -08:00
Graydon Hoare
389125aeb8 core: add min and max to cmp, re-export various places. 2013-02-13 11:46:25 -08:00
John Clements
9df11ae83f retabbing 2013-02-13 10:49:36 -08:00
bors
d06e6e758a auto merge of #4892 : pcwalton/rust/xc-newtype-structs, r=pcwalton
r? @brson
2013-02-13 10:22:42 -08:00
Tim Chevalier
e92e3e4578 Add forgotten authors Jesse Jones, Mark Vian, and Trinick 2013-02-13 09:59:57 -08:00
Tim Chevalier
c42a36776f Add Brendan Zabarauskas to AUTHORS 2013-02-13 09:53:10 -08:00
Ben Striegel
e6c82c0375 RIMOV core::vec
Also remove as many uses as possible of vec::cast_to_mut and
cast_from_mut
2013-02-13 12:48:24 -05:00
Ben Striegel
4de76aeb14 RIMOV core::hash 2013-02-13 12:47:44 -05:00
Ben Striegel
808ccd3349 RIMOV core::io 2013-02-13 12:47:44 -05:00
Ben Striegel
3a3f7b8e55 RIMOV core::rand 2013-02-13 12:47:44 -05:00
Ben Striegel
2d2ed075e3 RIMOV core::run 2013-02-13 12:47:43 -05:00
Ben Striegel
e58c812f77 Partially de-vec-mut librustc 2013-02-13 12:47:43 -05:00
Patrick Walton
e07623d70b librustc: Make monomorphic newtype structs work cross-crate 2013-02-13 09:47:20 -08:00
bors
6016214101 auto merge of #4900 : luqmana/rust/core_os_errors, r=graydon
Rewrote the last pull request (#4859) to not require on llvm for core.

Also fixes #2269.
2013-02-12 21:27:22 -08:00
bors
27b3e01377 auto merge of #4914 : nikomatsakis/rust/issue-4856, r=nikomatsakis
and then adjust code to match. rs=unsound (will review post-landing)

rs=unsound
2013-02-12 20:40:19 -08:00
Niko Matsakis
ab2534974c Adjust borrow checker algorithm to address #4856 unsoundness,
and then adjust code to match. rs=unsound (will review post-landing)
2013-02-12 20:10:50 -08:00
Kang Seonghoon
6d98ca94cc libsyntax: don't parse ////, /***/ as doc comments 2013-02-13 11:39:13 +09:00
bors
1a394e57f7 auto merge of #4896 : pcwalton/rust/move-speedup, r=pcwalton
r? @nikomatsakis 

When you made the change to fix kinds in recursion, you stopped looking in the master cache. This patch fixes it.
2013-02-12 17:32:29 -08:00
John Clements
46d2be1bd4 added rather elaborate test framework 2013-02-12 17:18:29 -08:00
bors
6727c6fb56 auto merge of #4881 : bjz/rust/incoming, r=catamorphism 2013-02-12 16:22:58 -08:00
Patrick Walton
a165f88272 librustc: Speed up moves a lot. r=nmatsakis 2013-02-12 16:16:23 -08:00
bors
91c59f5c9a auto merge of #4880 : erickt/rust/hashmap-cleanup, r=catamorphism 2013-02-12 15:24:42 -08:00
bors
bc2d147847 auto merge of #4858 : z0w0/rust/rm_weak_task_count, r=graydon 2013-02-12 14:36:33 -08:00
bors
21a0d52a85 auto merge of #4876 : brson/rust/debuginfo, r=brson
Update of #4862
2013-02-12 13:30:07 -08:00
bors
210fa2d017 auto merge of #4874 : thestinger/rust/option, r=catamorphism 2013-02-12 10:35:12 -08:00
bors
1c487b18f3 auto merge of #4867 : z0w0/rust/pruneprelude, r=catamorphism 2013-02-12 09:37:41 -08:00
Graydon Hoare
1d82d8dd5d Revert "librustc: Make monomorphic newtype structs work cross-crate"
This reverts commit a8f039a085.
2013-02-12 09:02:17 -08:00
Luqman Aden
2180fe2552 rt: remove last_os_error from rustrt.def.in 2013-02-12 00:22:58 -05:00
Luqman Aden
44b80ed0d6 Long lines. 2013-02-11 23:49:49 -05:00
Luqman Aden
70185fdcc2 rt: remove last_os_error and adjust tests. 2013-02-11 23:49:49 -05:00
Luqman Aden
625fac3c7e core: Rewrite last_os_error in Rust for windows as well. 2013-02-11 23:49:49 -05:00
Luqman Aden
9877d98b8f core: Rewrite last_os_error in Rust for unix and provide access to errno (unix) and GetLastError (windows). 2013-02-11 23:49:49 -05:00
Patrick Walton
a8f039a085 librustc: Make monomorphic newtype structs work cross-crate 2013-02-11 20:09:11 -08:00
Brian Anderson
9701517703 std: Fix uv_tcp_t size on i686-apple-darwin 2013-02-11 19:24:35 -08:00
Zack Corr
0db527e2f8 core: Fix dec/inc_kernel_live_count mixup 2013-02-12 12:27:19 +10:00