about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-236/+239
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-4/+3
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-27/+27
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-12libsyntax: Tighten up expressions in patterns to only allow identifiers or ↵Patrick Walton-3/+30
literals (possibly with a minus). This had very minimal fallout.
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-82/+76
2013-05-12libsyntax: Remove `extern mod foo { ... }` from the language.Patrick Walton-6/+17
2013-05-11clean up the last bit of warningsCorey Richardson-1/+0
2013-05-11Warning policeTim Chevalier-11/+8
2013-05-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-9/+9
Fix for #3356
2013-05-10Remove the '<->' operator from the languageAlex Crichton-18/+11
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-23/+197
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10renamed str::from_slice to str::to_ownedYoungsoo Son-1/+1
2013-05-10auto merge of #6329 : sonwow/rust/issue-6306, r=ILyoanbors-4/+4
Fix for #6306
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-8/+8
2013-05-10auto merge of #6356 : dotdash/rust/strinterner, r=pcwaltonbors-319/+374
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-10Fix deriving(IterBytes) to use the new for-loop protocolAlex Crichton-11/+15
2013-05-10syntax: Use the new `for` protocolAlex Crichton-12/+182
2013-05-10Move core::task::local_data to core::local_dataYoungsoo Son-4/+4
2013-05-09back-ticksLenny222-1/+1
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-319/+374
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-09auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiynbors-1/+1
Hi there, Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes. Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`. Thanks! Sean
2013-05-09libsyntax: rename vec::each(var) to var.eachYoungmin Yoo-1/+1
2013-05-08libcore: Fix more merge fallout.Patrick Walton-5/+29
2013-05-08librustc: Fix merge fallout.Patrick Walton-8/+4
2013-05-08librustc: Stop parsing modes and remove them entirely from the languagePatrick Walton-10/+7
2013-05-08test: Fix tests and the pipe compilerPatrick Walton-4/+5
2013-05-08librustc: Remove mutable fields from the language.Patrick Walton-36/+40
They're still parsed though, to get through bootstrapping.
2013-05-09Fix typosSean Moon-1/+1
2013-05-08auto merge of #6267 : huonw/rust/syntax-deriving-generaliseder, r=nikomatsakisbors-777/+1193
This "finishes" the generic deriving code (which I started in #5640), in the sense it supports everything that I can think of being useful. (Including lifetimes and type parameters on methods and traits, arguments and return values of (almost) any type, static methods.) It closes #6149, but met with #6257, so the following doesn't work: ```rust #[deriving(TotalEq)] struct Foo<'self>(&'self int); ``` (It only fails for `TotalOrd`, `TotalEq` and `Clone`, since they are the only ones that call a method directly on sub-elements of the type, which means that the auto-deref interferes with the pointer.) It also makes `Rand` (chooses a random variant, fills the fields with random values, including recursively for recursive types) and `ToStr` (`x.to_str()` is the same as `fmt!("%?", x)`) derivable, as well as converting IterBytes to the generic code (which made the code 2.5x shorter, more robust and added support for tuple structs). ({En,De}codable are trickier, so I'll convert them over later.)
2013-05-07auto merge of #6271 : pnkfelix/rust/issue6009-condition-pub-priv-variants, ↵bors-0/+15
r=graydon @brson: r? [please ignore the other one that was accidentally based off master due to back-button-bugs in github.com] My goal is to resolve the question of whether we want to encourage (by example) consistent use of pub to make identifiers publicly-accessible, even in syntax extensions. (If people don't want that, then we can just let this pull request die.) This is part one of two. Part two, whose contents should be clear from the FIXME's in this commit, would land after this gets incorporated into a snapshot. (The eventual goal is to address issue #6009 , which was implied by my choice of branch name, but not mentioned in the pull request, so github did not notice it.)
2013-05-07auto merge of #6245 : youknowone/rust/match-range-static, r=graydonbors-2/+8
Fix unintended error problem of: ```` static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } } ````
2013-05-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-0/+36
2013-05-06Step one for 'proper' pub condition: support pub keyword in form.Felix S. Klock II-0/+15
2013-05-07libsyntax: add #[deriving(Rand, ToStr)].Huon Wilson-0/+196
The former fills each field of a struct or enum variant with a random value (and picks a random enum variant). The latter makes the .to_str method have the same output as fmt!("%?", ..).
2013-05-07libsyntax: convert #[deriving(IterBytes)] to generic derivingHuon Wilson-223/+61
2013-05-07libsyntax: extend generic deriving code to handle almost all possible traits.Huon Wilson-554/+936
This adds support for static methods, and arguments of most types, traits with type parameters, methods with type parameters (and lifetimes for both), as well as making the code more robust to support deriving on types with lifetimes (i.e. 'self).
2013-05-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-6/+6
2013-05-06refinement to technique used to not run regionckNiko Matsakis-1/+7
2013-05-06Add assert_approx_eq! macroBrendan Zabarauskas-0/+36
2013-05-05Fix two more write guard failuresNiko Matsakis-1/+1
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-708/+456
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-05auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiynbors-6/+6
2013-05-06Fix span testsSeo Sanghyeon-2/+2
2013-05-05Allow non-literal static range pattern for match armsJeong YunWon-2/+8
Fix unintended error problem of: static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } }
2013-05-04Register snapshotsBrian Anderson-66/+0
2013-05-04auto merge of #6230 : thestinger/rust/whitespace, r=catamorphismbors-7/+0
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).
2013-05-03auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphismbors-4/+3
2013-05-03auto merge of #6219 : dotdash/rust/fmt, r=graydonbors-4/+2
Only the first portion has to be owned, as it acts as the buffer for the constructed string. The remaining strings can be static.
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-7/+0
2013-05-03syntax: Warning policeTim Chevalier-4/+3