summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2014-01-03librustc: De-`@mut` the parse sessionPatrick Walton-14/+13
2014-01-03auto merge of #11149 : alexcrichton/rust/remove-either, r=brsonbors-24/+27
Had to change some stuff in typeck to bootstrap (getting methods in fmt off of Either), but other than that not so painful. Closes #9157
2014-01-03Remove std::eitherAlex Crichton-24/+27
2014-01-03auto merge of #11228 : sfackler/rust/syntaxenv, r=pcwaltonbors-247/+129
I'd really like to be able to do something like ```rust struct MapChain<'next, K, V> { info: BlockInfo, map: HashMap<K, V>, next: Option<&'next mut MapChain<'next, K, V> } ``` but I can't get the lifetimes to work out.
2014-01-02libsyntax: De-`@mut` `Parser::last_span`Patrick Walton-4/+4
2014-01-02libsyntax: De-`@mut` `Parser::span`Patrick Walton-3/+3
2014-01-02libsyntax: De-`@mut` `token` in the parserPatrick Walton-28/+30
2014-01-02libsyntax: De-`@mut` `quote_depth` in the parserPatrick Walton-3/+3
2014-01-02libsyntax: Make the parser mutablePatrick Walton-45/+59
2014-01-01syntax::codemap: Add static DUMMY_SPklutzy-12/+12
It replaces `dummy_sp()`.
2014-01-01syntax::diagnostic: Remove unnecessary traitsklutzy-4/+3
This removes trait `handler` and `span_handler`, and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.
2013-12-30Rewrite SyntaxEnvSteven Fackler-247/+129
I'd really like to be able to do something like struct MapChain<'next, K, V> { info: BlockInfo, map: HashMap<K, V>, next: Option<&'next mut MapChain<'next, K, V> } but I can't get the lifetimes to work out.
2013-12-29Remove @muts from ExtCtxtSteven Fackler-20/+20
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-48/+49
2013-12-29Make ast_fold take &mut selfSteven Fackler-37/+38
2013-12-28Stop passing duplicate parameters in expandSteven Fackler-128/+92
2013-12-28Remove unecessary extern "Rust" specifiersSteven Fackler-17/+8
2013-12-28Stop using @ExtCtxtSteven Fackler-138/+138
2013-12-24Test fixes and rebase problemsAlex Crichton-1/+0
Note that this removes a number of run-pass tests which are exercising behavior of the old runtime. This functionality no longer exists and is thoroughly tested inside of libgreen and libnative. There isn't really the notion of "starting the runtime" any more. The major notion now is "bootstrapping the initial task".
2013-12-24green: Rip the bandaid off, introduce libgreenAlex Crichton-2/+2
This extracts everything related to green scheduling from libstd and introduces a new libgreen crate. This mostly involves deleting most of std::rt and moving it to libgreen. Along with the movement of code, this commit rearchitects many functions in the scheduler in order to adapt to the fact that Local::take now *only* works on a Task, not a scheduler. This mostly just involved threading the current green task through in a few locations, but there were one or two spots where things got hairy. There are a few repercussions of this commit: * tube/rc have been removed (the runtime implementation of rc) * There is no longer a "single threaded" spawning mode for tasks. This is now encompassed by 1:1 scheduling + communication. Convenience methods have been introduced that are specific to libgreen to assist in the spawning of pools of schedulers.
2013-12-17Remove obsolete mutability from ast::TySeo Sanghyeon-2/+2
2013-12-13auto merge of #10698 : metajack/rust/dep-info, r=alexcrichtonbors-1/+15
This isn't super useful for libraries yet without #10593. Fixes #7633.
2013-12-11Make 'self lifetime illegal.Erik Price-53/+53
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-10Fix missing code map entry for uses of `include_str!`.Jack Moffitt-1/+15
2013-12-10Extend allocation lint for boxing expressionsSeo Sanghyeon-11/+11
2013-12-08Remove dead codesKiet Tran-16/+2
2013-12-08Add dead-code warning passKiet Tran-40/+9
2013-12-07syntax::deriving: indicate from which trait type errors (etc) ariseHuon Wilson-4/+22
using the expansion info. Previously something like struct NotEq; #[deriving(Eq)] struct Error { foo: NotEq } would just point to the `foo` field, with no mention of the `deriving(Eq)`. With this patch, the compiler creates a note saying "in expansion of #[deriving(Eq)]" pointing to the Eq.
2013-12-07syntax: print expansion info from #[attribute] macros in the correctHuon Wilson-1/+6
format. Previously, any attempt to use this information from inside something like #[deriving(Foo)] would result in it printing like `deriving(Foo)!`.
2013-12-07syntax::deriving: add the cx and span to the TraitDef to reduce duplication.Huon Wilson-226/+251
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-4/+4
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-02Add a macro to check if logging at a given label is enabledPhilipp Brüschweiler-0/+7
This is useful when the information that is needed to do useful logging is expensive to produce.
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-131/+113
critical enum sizes.
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-4/+4
2013-11-28Register new snapshotsAlex Crichton-34/+34
2013-11-27Freeze the AST by removing a couple of unused @mut ~[T] from token_tree.Eduard Burtescu-7/+6
2013-11-26Clean up SmallVector use a bitSteven Fackler-19/+7
2013-11-26Support multiple item macrosSteven Fackler-62/+68
Closes #4375
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-92/+98
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-16/+17
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-1/+1
2013-11-26rustc: Add lint for obsolete attributesklutzy-42/+1
This also moves `#[auto_{en,de}code]` checker from syntax to lint.
2013-11-26Take &Pat in visit_patSeo Sanghyeon-1/+1
2013-11-19libsyntax: Change all uses of `&fn` to `||`.Patrick Walton-24/+39
2013-11-19Mark some derived methods as #[inline].Huon Wilson-1/+27
ToStr, Encodable and Decodable are not marked as such, since they're already expensive, and lead to large methods, so inlining will bloat the metadata & the binaries. This means that something like #[deriving(Eq)] struct A { x: int } creates an instance like #[doc = "Automatically derived."] impl ::std::cmp::Eq for A { #[inline] fn eq(&self, __arg_0: &A) -> ::bool { match *__arg_0 { A{x: ref __self_1_0} => match *self { A{x: ref __self_0_0} => true && __self_0_0.eq(__self_1_0) } } } #[inline] fn ne(&self, __arg_0: &A) -> ::bool { match *__arg_0 { A{x: ref __self_1_0} => match *self { A{x: ref __self_0_0} => false || __self_0_0.ne(__self_1_0) } } } } (The change being the `#[inline]` attributes.)
2013-11-17Forbid privacy in inner functionsAlex Crichton-1/+1
Closes #10111
2013-11-11Move std::rt::io to std::ioAlex Crichton-5/+5
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-78/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-27/+29
2013-11-08syntax::ext: Make type errors in deriving point to the field itself.Huon Wilson-312/+327
This rearranges the deriving code so that #[deriving] a trait on a field that doesn't implement that trait will point to the field in question, e.g. struct NotEq; // doesn't implement Eq #[deriving(Eq)] struct Foo { ok: int, also_ok: ~str, bad: NotEq // error points here. } Unfortunately, this means the error is disconnected from the `deriving` itself but there's no current way to pass that information through to rustc except via the spans, at the moment. Fixes #7724.