about summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2013-05-22syntax/ext: collect the ast building traits into a single trait.Huon Wilson-493/+420
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-324/+323
2013-05-22syntax/ext: Remove the trait-object indirection of the ext_ctxt object.Huon Wilson-106/+82
2013-05-21syntax/ext: remove the ~str dependence of the deriving code.Huon Wilson-79/+81
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-45/+42
2013-05-20Implement a lint mode to detect unnecessary allocationsAlex Crichton-3/+3
2013-05-20getting rid of interner_key! macroJohn Clements-1/+1
2013-05-20hygiene infrastructure.John Clements-35/+58
- added a hash table to memoize rename and mark operations. - added rename, mark, and resolve fold fns
2013-05-19Register snapshotsBrian Anderson-15/+0
2013-05-18Made bytes!() accept a list of string, integer or char literalsMarvin Löbel-5/+50
2013-05-17Re-implement lint with less emphasis on item idsAlex Crichton-6/+7
This way it's much easier to add lints throughout compilation correctly, and functions on impls can alter the way lints are emitted.
2013-05-16auto merge of #6530 : huonw/rust/deriving-deepclone, r=bstriebors-7/+43
2013-05-16syntax: use fmt! over + in deriving/cloneHuon Wilson-6/+6
2013-05-16auto merge of #6531 : sammykim/rust/bytes, r=luqmanabors-0/+30
Fix #4334.
2013-05-16syntax: implement #[deriving(DeepClone)]. Fixes #6514.Huon Wilson-6/+42
2013-05-16Implement bytes! syntax extensionSangeun Kim-0/+30
2013-05-15auto merge of #6502 : huonw/rust/no-auto-code, r=graydonbors-1485/+629
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual auto_* code, leaving stubs to refer the user to the new syntax. Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
2013-05-15auto merge of #6500 : kud1ing/rust/cleanup, r=bstriebors-36/+0
Fixes #6445
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-1485/+629
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-15auto merge of #6499 : dotdash/rust/static_keywords, r=thestingerbors-2/+2
2013-05-15auto merge of #6487 : recrack/rust/vec_len, r=thestingerbors-3/+3
Rename vec::len(var) to var.len() ``` libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax test/auxiliary test/bench test/run-pass ```
2013-05-15remove deriving_eq, deriving_iter_bytes, deriving_clone (deprecated in 0.6)Lenny222-36/+0
2013-05-15Allow static strings to be used with keyword checksBjörn Steinbrink-2/+2
2013-05-14rustc: rename ast::self_ty and related fields to explicit_selfErick Tryzelaar-32/+31
2013-05-15Rename vec::len(var) to var.len()Youngmin Yoo-3/+3
2013-05-15Use parentheses for cond! macro instead of preceding pipesBrendan Zabarauskas-4/+4
This is temporary. Once the macro parser has improved or been re-written these can be removed.
2013-05-15Add Scheme-style `cond!` macro to syntax::ext::expandBrendan Zabarauskas-1/+35
Addresses issue #6037
2013-05-14Fix test fallout from removing vecs_implicitly_copyableAlex Crichton-12/+8
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-136/+137
2013-05-14Fix cosmetics for fail!() callsMarvin Löbel-1/+1
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-10/+10
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-12librustc: Make `self` and `static` into keywordsPatrick Walton-27/+24
2013-05-11Warning policeTim Chevalier-5/+3
2013-05-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-8/+8
Fix for #3356
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-23/+33
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-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-7/+7
2013-05-10auto merge of #6356 : dotdash/rust/strinterner, r=pcwaltonbors-247/+246
&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/+18
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-247/+246
&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-08libcore: Fix more merge fallout.Patrick Walton-5/+28
2013-05-08librustc: Fix merge fallout.Patrick Walton-8/+4
2013-05-08test: Fix tests and the pipe compilerPatrick Walton-4/+5
2013-05-08librustc: Remove mutable fields from the language.Patrick Walton-15/+9
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-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-0/+36