summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
AgeCommit message (Collapse)AuthorLines
2013-09-24auto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphismbors-11/+5
Progress on #7981 This doesn't completely close the issue because `struct A;` is still allowed, and it's a much larger change to disallow that. I'm also not entirely sure that we want to disallow that. Regardless, punting that discussion to the issue instead.
2013-09-24Stop accepting 'impl ...;', require {} insteadAlex Crichton-11/+5
Progress on #7981
2013-09-23librustc: Remove `@fn` managed closures from the language.Patrick Walton-11/+0
2013-09-23librustc: Port the pretty printer annotation infrastructure to use traits ↵Patrick Walton-18/+29
instead of garbage collected functions.
2013-09-17pp: also print bounds in paths with no generic paramsBenjamin Herr-7/+7
Since 3b6314c3 the pretty printer seems to only print trait bounds for `ast::ty_path(...)`s that have a generics arguments list. That seems wrong, so let's always print them. Closes #9253, un-xfails test for #7673.
2013-09-11auto merge of #9061 : jakub-/rust/pretty-print-empty-impl, r=huonwbors-1/+3
2013-09-11Implement the notion of a "generated unsafe block"Alex Crichton-1/+1
This way syntax extensions can generate unsafe blocks without worrying about them generating unnecessary unsafe warnings. Perhaps a special keyword could be added to be used in macros, but I don't think that's the best solution.
2013-09-10change type of ExprLoop and ExprBreak elts from ident->name.John Clements-3/+7
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-6/+2
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-08Fix pretty-printing of empty impl itemsJakub-1/+3
2013-09-08syntax: implement labelled breaks for `for`.Huon Wilson-1/+6
`for` desugars to `loop` so it is trivial to just desugar to `loop` while retaining any label.
2013-09-06ident->nameJohn Clements-2/+2
2013-09-06remove unneeded imports, clean up unused var warningsJohn Clements-2/+4
2013-09-06add temporarily unused ctxt field to mac_invoc_ttJohn Clements-2/+2
2013-09-05Remove the __log function for __log_levelAlex Crichton-6/+2
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-04stop treating char as an integer typeDaniel Micay-2/+3
Closes #7609
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-101/+101
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-6/+6
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-11/+11
2013-08-28auto merge of #8718 : bblum/rust/typeof, r=pcwaltonbors-0/+5
r? anybody
2013-08-27librustc: Add support for type parameters in the middle of paths.Patrick Walton-21/+40
For example, `foo::<T>::bar::<U>`. This doesn't enforce that the type parameters are in the right positions, however.
2013-08-27librustc: Remove `&const` and `*const` from the language.Patrick Walton-3/+0
They are still present as part of the borrow check.
2013-08-23Parse and reserve typeof keyword. #3228Ben Blum-0/+5
2013-08-20rm obsolete integer to_str{,_radix} free functionsDaniel Micay-6/+5
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