about summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2013-07-10Change the assert_eq message to be more verbose.Corey Richardson-1/+2
Closes #6221
2013-07-08Correct merge errorsNiko Matsakis-5/+5
2013-07-08syntax: Patch up code that was using irrefutable patterns incorrectlyNiko Matsakis-12/+20
2013-07-07remove some method resolve workaroundsDaniel Micay-1/+1
2013-07-07De-share ast::TyJames Miller-78/+77
2013-07-07De-manage OptVec<TyParamBounds>James Miller-33/+27
2013-07-07De-share trait_refJames Miller-5/+5
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-07-07De-manage LifetimeJames Miller-10/+9
2013-07-07De-managed ast::PathJames Miller-49/+49
2013-07-07Stop allocating view_items with @James Miller-11/+11
2013-07-05Do not rely on newtype enum dereferenceSeo Sanghyeon-26/+23
2013-07-04Implement consuming iterators for ~[], remove vec::{consume, ↵Huon Wilson-2/+1
consume_reverse, map_consume}.
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-0/+2
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-23/+20
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29Remove mutability from unique boxes in the ASTAlex Crichton-1/+1
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-5/+11
for making them noncopyable.
2013-06-28librustc: Fix merge fallout.Patrick Walton-1/+1
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-30/+30
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-28librustc: Change "Owned" to "Send" everywherePatrick Walton-4/+4
2013-06-27Remove many shared pointersPhilipp Brüschweiler-4/+2
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
2013-06-26Infer default static/Owned bounds for unbounded heap fns/traits (#7264)Ben Blum-20/+19
2013-06-25auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatchbors-106/+39
Sets the stage for further cleanup (especially mass-slaughter of `@`)
2013-06-25remove the redundant `each` method from OptVecDaniel Micay-4/+4
2013-06-25great renaming propagation: syntaxCorey Richardson-106/+39
2013-06-24remove old_iterDaniel Micay-2/+2
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and written in an ancient dialect of Rust so I've just removed it this also removes `to_vec` from DList because it's provided by `std::iter::to_vec` an Iterator implementation is added for OptVec but some transitional internal iterator methods are still left
2013-06-23Parse and typecheck (not kindcheck) bounds on trait paths.Ben Blum-19/+27
2013-06-22auto merge of #7274 : thestinger/rust/size_hint, r=huonwbors-18/+18
I ran into a weird lifetime bug blocking updating the `collect` method to use `FromIterator`, but everything here works fine.
2013-06-23vec: remove BaseIter implementationDaniel Micay-18/+18
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22auto merge of #7204 : alexcrichton/rust/deriving-to-string, r=pcwaltonbors-11/+64
Closes #7180 and #7179. Before, the `deriving(ToStr)` attribute was essentially `fmt!("%?")`. This changes it to recursively invoke `to_str()` on fields instead of relying on `fmt!`-style things. This seems more natural to me and what should actually be expected.
2013-06-22Fix compiling empty fmt! stringsAlex Crichton-0/+5
2013-06-22Expand the deriving(ToStr) implementationAlex Crichton-11/+64
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-28/+28
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-5/+5
2013-06-16auto merge of #7142 : alexcrichton/rust/deriving-zero, r=pcwaltonbors-0/+98
This allows mass-initialization of large structs without having to specify all the fields. I'm a bit hesitant, but I wanted to get this out there. I don't really like using the `Zero` trait, because it doesn't really make sense for a type like `HashMap` to use `Zero` as the 'blank allocation' trait. In theory there'd be a new trait, but then that's adding cruft to the language which may not necessarily need to be there. I do think that this can be useful, but I only implemented `Zero` on the basic types where I thought it made sense, so it may not be all that usable yet. (opinions?)
2013-06-16remove unused importsHuon Wilson-2/+0
2013-06-14auto merge of #7121 : huonw/rust/rand-call, r=pnkfelixbors-3/+4
r? @pnkfelix
2013-06-14auto merge of #7110 : thestinger/rust/iterator, r=brsonbors-8/+0
2013-06-14add IteratorUtil to the preludeDaniel Micay-8/+0
2013-06-14auto merge of #7116 : thestinger/rust/whitespace, r=luqmanabors-1/+0
2013-06-14Implement a deriving(Zero) attributeAlex Crichton-0/+98
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-7/+15
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-14syntax: revert the uint -> u32 "fix"; make the names/comment match.Huon Wilson-4/+4
2013-06-14syntax: correct the Rand::rand call to select enum variants in ↵Huon Wilson-4/+5
#[deriving(Rand)]. Previously, this was not a global call, and so when `#[deriving(Rand)]` was in any module other than the top-level one, it failed (unless there was a `use std;` in scope). Also, fix a minor inconsistency between uints and u32s for this piece of code.
2013-06-13automated whitespace fixesDaniel Micay-1/+0
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-221/+219
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-12Fix a test-predicated use of the visit.rs api.Felix S. Klock II-1/+1
2013-06-12Fix linebreak and whitespace issues to placate make tidy.Felix S. Klock II-1/+2
2013-06-12Visitor refactoring: Step 1, couple (Env, vt<Env>) together in a tuple.Felix S. Klock II-3/+3
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-9/+0
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-10/+8