summary refs log tree commit diff
path: root/src/librustc/front
AgeCommit message (Collapse)AuthorLines
2013-09-23librustc: Remove garbage collected functions from front/{config,test} and ↵Patrick Walton-59/+57
metadata/{tydecode,tyencode}
2013-09-23librustc: Change fold to use traits instead of `@fn`.Patrick Walton-199/+234
2013-09-21Update version numbers to 0.8Brian Anderson-2/+2
2013-09-18Register new snapshotsAlex Crichton-116/+0
2013-09-12std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}Erick Tryzelaar-2/+2
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-13/+31
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-19/+19
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-4/+4
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-6/+6
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-2/+2
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-27librustc: Add support for type parameters in the middle of paths.Patrick Walton-16/+32
For example, `foo::<T>::bar::<U>`. This doesn't enforce that the type parameters are in the right positions, however.
2013-08-18quote_*! macros take an ExtCtxSteven Fackler-0/+110
They previously required one called "ext_cx" to be in scope. Fixes part of #7727
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-5/+5
cc #5898
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-2/+2
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-3/+7
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-2/+2
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-03remove obsolete `foreach` keywordDaniel Micay-1/+1
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+1
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-1/+1
blk_check_mode, ty_field, ty_method}
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-29/+29
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-77/+35
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-2/+2
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-29/+34
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-5/+3
2013-07-17auto merge of #7844 : huonw/rust/no-implicit-prelude, r=alexcrichtonbors-1/+19
It disables the insertion of `use std::prelude::*;` into the top of all the modules below the item on which it is placed (including that item itself). (Similar to GHC's `-XNoImplicitPrelude`.)
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-4/+5
2013-07-17rustc: implement a `#[no_implicit_prelude]` attribute.Huon Wilson-1/+19
It disables the insertion of `use std::prelude::*;` into the top of all the modules below the item on which it is placed (including that item itself).
2013-07-08Bump version numbers to 0.8-preBrian Anderson-2/+2
2013-07-08Merge pull request #7595 from thestinger/iteratorDaniel Micay-1/+1
remove some method resolve workarounds
2013-07-07Fix a warning when generating testsAlex Crichton-2/+2
2013-07-07remove some method resolve workaroundsDaniel Micay-1/+1
2013-07-07De-share ast::TyJames Miller-2/+2
2013-07-07De-share trait_refJames Miller-2/+2
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-07-07De-managed ast::PathJames Miller-5/+5
2013-07-07Stop allocating view_items with @James Miller-14/+12
2013-07-05Do not rely on newtype enum dereferenceSeo Sanghyeon-3/+3
2013-07-04Remove vec::{filter, filtered, filter_map, filter_mapped}, replaced by ↵Huon Wilson-35/+35
iterators.
2013-06-30auto merge of #7487 : huonw/rust/vec-kill, r=cmrbors-2/+2
Continuation of #7430. I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
2013-06-30Bump version from 0.7-pre to 0.7Brian Anderson-2/+2
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-2/+2
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-7/+4
2013-06-27Remove many shared pointersPhilipp Brüschweiler-10/+9
Mostly just low-haning fruit, i.e. function arguments that were @ even though & would work just as well. Reduces librustc.so size by 200k when compiling without -O, by 100k when compiling with -O.
2013-06-23Remove intrinsic modulePhilipp Brüschweiler-195/+0
To achieve this, the following changes were made: * Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics * Convert TyDesc, TyVisitor and Opaque to lang items instead of specially handling the intrinsics module * Removed TypeDesc, FreeGlue and get_type_desc() from sys Fixes #3475.
2013-06-23Fix get_tydesc() return typePhilipp Brüschweiler-4/+12
This fixes part of #3730, but not all. Also changes the TyDesc struct to be equivalent with the generated code, with the hope that the above issue may one day be closed for good, i.e. that the TyDesc type can completely be specified in the Rust sources and not be generated.
2013-06-23vec: remove BaseIter implementationDaniel Micay-2/+2
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-21vec: rm old_iter implementations, except BaseIterDaniel Micay-4/+4
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-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-13/+13
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-08remove deprecated vec::{is_empty, len} functionsDaniel Micay-3/+2
2013-06-09remove unused import warningsHuon Wilson-1/+0
2013-06-05removed unused imports (and one unused argument)John Clements-6/+3