summary refs log tree commit diff
path: root/src/libsyntax/ext/base.rs
AgeCommit message (Collapse)AuthorLines
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-1/+1
for making them noncopyable.
2013-06-25great renaming propagation: syntaxCorey Richardson-5/+3
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-1/+2
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-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-21/+21
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-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-1/+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-1/+1
2013-06-05add hygiene support functionsJohn Clements-0/+10
2013-06-05remove unused get_ident_interner'sJohn Clements-1/+1
2013-06-05token_to_ident takes argument by referenceJohn Clements-1/+1
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-3/+3
2013-06-05just use TLS internerJohn Clements-3/+3
2013-06-05change to newer macro escape mechanism, using uints in more placesJohn Clements-42/+83
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-25/+26
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+1
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-21/+20
2013-05-22syntax/ext: Remove the trait-object indirection of the ext_ctxt object.Huon Wilson-106/+82
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-2/+2
2013-05-16Implement bytes! syntax extensionSangeun Kim-0/+2
2013-05-15auto merge of #6500 : kud1ing/rust/cleanup, r=bstriebors-9/+0
Fixes #6445
2013-05-15remove deriving_eq, deriving_iter_bytes, deriving_clone (deprecated in 0.6)Lenny222-9/+0
2013-05-15Rename vec::len(var) to var.len()Youngmin Yoo-1/+1
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-2/+2
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-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-1/+1
Fix for #3356
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-1/+1
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-3/+3
&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-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-11/+1
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-04Register snapshotsBrian Anderson-11/+0
2013-05-03Use static stringsJeong YunWon-1/+1
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-10/+0
2013-04-30new borrow checker (mass squash)Niko Matsakis-51/+57
2013-04-30adapt to snapshotNiko Matsakis-11/+0
2013-04-28change stage1,stage2,stage2 into not(stage0)John Clements-3/+1
With luck, this will allow rust to compile itself without --cfg flags again...
2013-04-27only use #[no_core] in libcoreDaniel Micay-3/+0
2013-04-19syntax: de-mode and prepare for de-modeing rustcAlex Crichton-3/+3
2013-04-10Issue #5656: Make &self not mean "&'self self"Niko Matsakis-0/+13
Fixes #5656. Fixes #5541.
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-9/+9
2013-04-03hashmap: rm linear namespaceDaniel Micay-2/+2
2013-03-28Removing unused importsAlex Crichton-3/+3
2013-03-22librustc: Remove `pure` from libsyntax and librustc.Patrick Walton-5/+5
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-1/+1
2013-03-22syntax: make old `#[deriving_foo]` attribute obsoleteAndrew Paseltiner-3/+3
2013-03-20change some uses of fail_unless to assert_eqJohn Clements-13/+12
2013-03-19syntax: split deriving module into submodules for each traitAndrew Paseltiner-4/+4
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-2/+2
notation. rs=delifetiming
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-10/+10
2013-03-12auto merge of #5320 : apasel422/rust/metaderive, r=graydonbors-0/+3
This is the first in a series of patches I'm working on to clean up the code related to `deriving`. This patch allows ``` #[deriving_eq] #[deriving_iter_bytes] #[deriving_clone] struct Foo { bar: uint } ``` to be replaced with: ``` #[deriving(Eq, IterBytes, Clone)] struct Foo { bar: uint } ``` It leaves the old attributes alone for the time being. Eventually I'd like to incorporate the new closest-match-suggestion infrastructure for mistyped trait names, and also pass the sub-attributes to the deriving code, so that the following will be possible: ``` #[deriving(TotalOrd(qux, bar))] struct Foo { bar: uint, baz: char, qux: int } ``` This says to derive an `impl` in which the objects' `qux` fields are compared first, followed by `bar`, while `baz` is ignored in the comparison. If no fields are specified explicitly, all fields will be compared in the order they're defined in the `struct`. This might also be useful for `Eq`. Coming soon.
2013-03-12syntax: implement #[deriving] meta-attributeAndrew Paseltiner-0/+3
2013-03-12Create asm! syntax extension.Luqman Aden-0/+2
2013-03-05auto merge of #5179 : alexcrichton/rust/default-warn-unused-import, r=graydonbors-2/+0
I've found that unused imports can often start cluttering a project after a long time, and it's very useful to keep them under control. I don't like how Go forces a compiler error by default and it can't be changed, but I certainly want to know about them so I think that a warn is a good default. Now that the `unused_imports` lint option is a bit smarter, I think it's possible to change the default level to warn. This commit also removes all unused imports throughout the compiler and libraries (500+). The only odd things that I ran into were that some `use` statements had to have `#[cfg(notest)]` or `#[cfg(test)]` based on where they were. The ones with `notest` were mostly in core for modules like `cmp` whereas `cfg(test)` was for tests that weren't part of a normal `mod test` module.