about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-06-25remove the redundant `each` method from OptVecDaniel Micay-16/+9
2013-06-25Rename all files with the 'rc' extensionAlex Crichton-0/+0
2013-06-25auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmrbors-105/+99
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475. Update: this now also removes the unused shape fields in tydescs.
2013-06-25auto merge of #7291 : alexcrichton/rust/static-mut, r=huonwbors-16/+24
This adds both `static mut` items and `static mut` foreign items. This involved changing far less code than I thought it was going to, but the tests seem to pass and the variables seem functional. I'm more than willing to write more tests, so suggestions are welcome! Closes #553
2013-06-25Warning policeJames Miller-1/+1
2013-06-24remove old_iterDaniel Micay-81/+40
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-23Support foreign 'static mut' variables as wellAlex Crichton-7/+11
2013-06-23Add 'static mut' items to the languageAlex Crichton-9/+13
2013-06-23Parse and typecheck (not kindcheck) bounds on trait paths.Ben Blum-60/+93
2013-06-23syntax: Remove unused tokensPhilipp Brüschweiler-105/+99
TyDesc, TyVisitor and intrinsic are not used anymore.
2013-06-22auto merge of #7274 : thestinger/rust/size_hint, r=huonwbors-104/+106
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-104/+106
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-22Merge pull request #7227 from alexcrichton/issue-7218Daniel Micay-0/+5
Fix compiling empty fmt! strings
2013-06-22Merge pull request #7230 from Blei/green-squiggleDaniel Micay-13/+20
syntax::diagnostics: Color the ^~~~ in green for better visibility
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-35/+35
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-21libsyntax: cleanup warningsJames Miller-3/+1
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-175/+0
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-20libsyntax: Remove `drop` as a keyword.Luqman Aden-35/+202
2013-06-19syntax::diagnostics: Color the ^~~~ in green for better visibilityPhilipp Brüschweiler-13/+20
Fixes #7164.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-22/+22
2013-06-16Do not strip leading whitespace when parsing doc comments.SiegeLord-23/+65
This change prevents the indentation in code blocks inside the /// doc comments from being eaten. The indentation that is the same across the consecutive doc comments is removed by the uindent_pass in librustdoc.
2013-06-16Add copies to type params with Copy boundNiko Matsakis-135/+149
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-16auto merge of #7123 : huonw/rust/more-str, r=thestingerbors-11/+7
Moves all the remaining functions that could reasonably be methods to be methods, except for some FFI ones (which I believe @erickt is working on, possibly) and `each_split_within`, since I'm not really sure the details of it (I believe @kimundi wrote the current implementation, so maybe he could convert it to an external iterator method on `StrSlice`, e.g. `word_wrap_iter(&self) -> WordWrapIterator<'self>`, where `WordWrapIterator` impls `Iterator<&'self str>`. It probably won't be too hard, since it's already a state machine.) This also cleans up the comparison impls for the string types, except I'm not sure how the lang items `eq_str` and `eq_str_uniq` need to be handled, so they (`eq_slice` and `eq`) remain stand-alone functions.
2013-06-15auto merge of #7149 : thestinger/rust/vec, r=graydonbors-7/+0
2013-06-15auto merge of #7114 : pnkfelix/rust/issue3961-fix-whitespace-detection, r=brsonbors-14/+23
r? (yes, the review request is back, now that I got it building against incom... I mean master!) (Attempting to port from orphaned pull-request #6764 ) Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.) Before applying this change set: -- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect. -- compare B and D do not match A and C. (To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)
2013-06-16remove unused importsHuon Wilson-3/+1
2013-06-15rm CopyableOrderedIterDaniel Micay-7/+0
replaced with OrdIterator
2013-06-16std: convert str::{map,levdistance,subslice_offset} to methods.Huon Wilson-8/+6
The first two become map_chars and lev_distance. Also, remove a few allocations in rustdoc.
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-18/+0
2013-06-14add IteratorUtil to the preludeDaniel Micay-18/+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-14fixed code to placate new restrictions on form of function/method invocations.Felix S. Klock II-1/+1
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-8/+16
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-13Fix #3961 : use char range methods instead of byte offsets to detect whitespace.Felix S. Klock II-14/+23
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-451/+432
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-337/+323
2013-06-12libsyntax: Remove duplicate methods.Luqman Aden-7/+0
2013-06-12std: convert str::escape_* to methods.Huon Wilson-3/+2
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).