about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
AgeCommit message (Collapse)AuthorLines
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
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-15/+15
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: convert str::escape_* to methods.Huon Wilson-2/+1
2013-06-11option: remove redundant old_iter implsDaniel Micay-8/+9
2013-06-10clean-up unused import warningsHuon Wilson-1/+0
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-1/+1
2013-06-08remove deprecated vec::{is_empty, len} functionsDaniel Micay-2/+2
2013-06-06Deduplicate words in code commentsAlexei Sholik-2/+2
2013-06-05removed unused imports (and one unused argument)John Clements-1/+0
2013-06-05token_to_ident takes argument by referenceJohn Clements-1/+1
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-8/+7
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-5/+4
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".