about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
AgeCommit message (Collapse)AuthorLines
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-1/+1
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-1/+5
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-05Updated std::Option, std::Either and std::ResultMarvin Löbel-5/+5
- 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-04rm obsolete `for` support from the compilerDaniel Micay-4/+1
2013-08-03remove obsolete `foreach` keywordDaniel Micay-37/+37
this has been replaced by `for`
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-2/+2
2013-08-02replace `range` with an external iteratorDaniel Micay-2/+1
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-35/+35
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-2/+2
2013-07-30rustc: fix a pp bug.Graydon Hoare-0/+1
2013-07-30syntax: implement foreach .. in .. { .. } via desugaring.Graydon Hoare-0/+8
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-4/+4
blk_check_mode, ty_field, ty_method}
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-4/+4
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-20/+20
`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-21auto merge of #7938 : crabtw/rust/foreign-vis, r=huonwbors-2/+2
2013-07-21syntax: print visibilities of foreign itemsJyun-Yan You-2/+2
2013-07-20auto merge of #7902 : huonw/rust/attr++, r=cmr,pcwaltonbors-19/+18
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 spans, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-1/+1
Place `pub` or `priv` on individual items instead.
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-19/+18
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 `copy` expressions from the language.Patrick Walton-1/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-17/+25
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-3/+11
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-13/+13
2013-07-08Correct merge errorsNiko Matsakis-1/+1
2013-07-08Correct merge failuresNiko Matsakis-1/+6
2013-07-08Fix pretty printer, which was ignoring `ref` in irrefutable patternsNiko Matsakis-38/+23
2013-07-07Fix broken testsJames Miller-1/+1
2013-07-07De-share ast::TyJames Miller-20/+20
2013-07-07De-manage OptVec<TyParamBounds>James Miller-2/+2
2013-07-07De-share trait_refJames Miller-76/+75
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-manage LifetimeJames Miller-10/+10
2013-07-07De-managed ast::PathJames Miller-18/+18
2013-07-07Stop allocating view_items with @James Miller-4/+4
2013-06-30Change char::escape_{default,unicode} to take callbacks instead of allocatingAlex Crichton-2/+6
strings
2013-06-29Remove mutability from unique boxes in the ASTAlex Crichton-3/+1
2013-06-27auto merge of #7361 : brson/rust/incoming, r=brsonbors-11/+14
2013-06-26Fix pretty-printing for bounded closures. Close #7333.Ben Blum-6/+11
2013-06-26Infer default static/Owned bounds for unbounded heap fns/traits (#7264)Ben Blum-6/+6
2013-06-25Merge remote-tracking branch 'mozilla/master' into incomingBrian Anderson-3/+9
Conflicts: src/librustc/middle/astencode.rs src/librustc/middle/check_const.rs
2013-06-25auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatchbors-8/+4
Sets the stage for further cleanup (especially mass-slaughter of `@`)
2013-06-25remove the redundant `each` method from OptVecDaniel Micay-1/+1
2013-06-25great renaming propagation: syntaxCorey Richardson-8/+4
2013-06-24Merge remote-tracking branch 'cmr/various-cleanup' into incomingBrian Anderson-11/+14
2013-06-23Support foreign 'static mut' variables as wellAlex Crichton-1/+4
2013-06-23Add 'static mut' items to the languageAlex Crichton-1/+4
2013-06-23Parse and typecheck (not kindcheck) bounds on trait paths.Ben Blum-2/+15
2013-06-23vec: remove BaseIter implementationDaniel Micay-23/+23
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-21Remove `ast::pure_fn` and all concept of `pure` from the compilerCorey Richardson-11/+14
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-3/+3
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-16Add copies to type params with Copy boundNiko Matsakis-6/+6