summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2014-03-28Remove a RefCell from pprust::State.Eduard Burtescu-10/+9
2014-03-28De-@ IdentInterner.Eduard Burtescu-2/+2
2014-03-26auto merge of #13079 : alexcrichton/rust/colons, r=cmrbors-10/+6
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather than `Foo: (Bound) <trait-parameters>` This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be clear where the trait parameters are going. Closes #9265
2014-03-26syntax: Tweak parsing bounds on generics pathsAlex Crichton-10/+6
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather than `Foo: (Bound) <trait-parameters>` This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be clear where the trait parameters are going. Closes #9265
2014-03-26syntax: Permit visibility on tuple fieldsAlex Crichton-2/+3
This change is in preparation for #8122. Nothing is currently done with these visibility qualifiers, they are just parsed and accepted by the compiler. RFC: 0004-private-fields
2014-03-22syntax: Fix fallout of removing get()Alex Crichton-6/+6
2014-03-22Migrate all users of opt_vec to owned_slice, delete opt_vec.Huon Wilson-9/+8
syntax::opt_vec is now entirely unused, and so can go.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-4/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-3/+3
Closes #12771
2014-03-18syntax: Don't parameterize the the pretty printerAlex Crichton-18/+19
The pretty printer constitues an enormous amount of code, there's no reason for it to be generic. This just least to a huge amount of metadata which isn't necessary. Instead, this change migrates the pretty printer to using a trait object instead. Closes #12985
2014-03-17Refactor pprust a bit.Eduard Burtescu-2107/+1963
2014-03-15rustc: Remove compiler support for __log_level()Alex Crichton-5/+0
This commit removes all internal support for the previously used __log_level() expression. The logging subsystem was previously modified to not rely on this magical expression. This also removes the only other function to use the module_data map in trans, decl_gc_metadata. It appears that this is an ancient function from a GC only used long ago. This does not remove the crate map entirely, as libgreen still uses it to hook in to the event loop provided by libgreen.
2014-03-14Added support for type placeholders (explicit requested typeMarvin Löbel-1/+1
inference in a type with `_` ). This enables partial type inference.
2014-03-13Remove Rc's borrow method to avoid conflicts with RefCell's borrow in ↵Eduard Burtescu-1/+1
Rc<RefCell<T>>.
2014-03-12alpha-rename .ident to .name in Lifetime, including in rustdoc.Felix S. Klock II-1/+1
2014-03-07rename ast::ViewItemExternMod to ast::ViewItemExternCrate, and ↵Liigo Zhuang-1/+1
clean::ExternMod to clean::ExternCrate
2014-03-04Rename all variables that have uppercase characters in their names to use ↵Palmer Cox-14/+14
only lowercase characters
2014-03-03syntax: make match arms store the expr directly.Huon Wilson-30/+14
Previously `ast::Arm` was always storing a single `ast::Expr` wrapped in an `ast::Block` (for historical reasons, AIUI), so we might as just store that expr directly. Closes #3085.
2014-03-02Make visible types public in rustcSteven Fackler-3/+3
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-78/+115
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-18/+18
2014-02-26Replace callee_id with information stored in method_map.Eduard Burtescu-5/+5
2014-02-23Make break and continue hygienicEdward Wang-2/+2
Makes labelled loops hygiene by performing renaming of the labels defined in e.g. `'x: loop { ... }` and then used in break and continue statements within loop body so that they act hygienically when used with macros. Closes #12262.
2014-02-22auto merge of #12451 : edwardw/rust/ident-2-name, r=cmrbors-1/+1
Closes #7743.
2014-02-22Represent lifetimes as Names instead of IdentsEdward Wang-1/+1
Closes #7743.
2014-02-22Reduce reliance on `to_str_radix`Brendan Zabarauskas-18/+3
This is in preparation to remove the implementations of ToStrRadix in integers, and to remove the associated logic from `std::num::strconv`. The parts that still need to be liberated are: - `std::fmt::Formatter::runplural` - `num::{bigint, complex, rational}`
2014-02-20Mass rename if_ok! to try!Alex Crichton-713/+713
This "bubble up an error" macro was originally named if_ok! in order to get it landed, but after the fact it was discovered that this name is not exactly desirable. The name `if_ok!` isn't immediately clear that is has much to do with error handling, and it doesn't look fantastic in all contexts (if if_ok!(...) {}). In general, the agreed opinion about `if_ok!` is that is came in as subpar. The name `try!` is more invocative of error handling, it's shorter by 2 letters, and it looks fitting in almost all circumstances. One concern about the word `try!` is that it's too invocative of exceptions, but the belief is that this will be overcome with documentation and examples. Close #12037
2014-02-14extern mod => extern crateAlex Crichton-1/+1
This was previously implemented, and it just needed a snapshot to go through
2014-02-14Removed the obsolete ast::CallSugar (previously used by `do`).Eduard Burtescu-35/+9
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-61/+51
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-4/+4
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-07Removed @self and @Trait.Eduard Burtescu-19/+16
2014-02-03Fixing remaining warnings and errors throughoutAlex Crichton-188/+97
2014-02-03std: Fixing all documentationAlex Crichton-10/+6
* Stop referencing io_error * Start changing "Failure" sections to "Error" sections * Update all doc examples to work.
2014-02-03syntax: Remove io_error usageAlex Crichton-989/+1272
2014-02-02syntax: remove the unused Vstore enum.Huon Wilson-13/+0
Seems to have been replaced by ExprVstore.
2014-02-02syntax: remove the handling of @str and @[] from the parser completely.Huon Wilson-1/+0
2014-02-02syntax: convert LitBinary from @[u8] to Rc<~[u8]>.Huon Wilson-2/+2
2014-02-02libsyntax: Remove an `@str` in pretty printingPatrick Walton-18/+21
2014-02-02libsyntax: Remove the `interner_get` function and all usesPatrick Walton-2/+3
2014-02-02libsyntax: Remove many uses of `token::ident_to_str`Patrick Walton-2/+3
2014-02-02libsyntax: Remove all `@str` from the ASTPatrick Walton-7/+7
2014-02-02libsyntax: Make float literals not use `@str`Patrick Walton-3/+3
2014-02-02libsyntax: De-`@str` pathnamesPatrick Walton-1/+1
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-4/+4
2014-02-02libsyntax: Introduce an `InternedString` type to reduce `@str` in thePatrick Walton-5/+5
compiler and use it for attributes
2014-01-30Implement default type parameters in generics.Eduard Burtescu-0/+8
2014-01-30auto merge of #11911 : kballard/rust/empty-functional-update, r=pcwaltonbors-2/+4
Fixes #8972
2014-01-29Allow empty functional updating of structsKevin Ballard-2/+4
Fixes #8972
2014-01-29Removing support for the do syntax from libsyntax and librustc.Scott Lawrence-20/+2
Fixes #10815.