about summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2014-05-04auto merge of #13898 : nikomatsakis/rust/type-bounds-b, r=acrichtobors-2/+4
This is needed to bootstrap fix for #5723.
2014-05-03Temporary patch to accept arbitrary lifetimes (behind feature gate) in bound ↵Niko Matsakis-2/+4
lists. This is needed to bootstrap fix for #5723.
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-1/+1
2014-05-02syntax: store char literals/tokens as `char`s rather than u32s.Huon Wilson-2/+1
Clearly storing them as `char` is semantically nicer, but this also fixes a bug whereby `quote_expr!(cx, 'a')` wasn't working, because the code created by quotation was not matching the actual AST definitions.
2014-04-26syntax: ViewItemUse no longer contains multiple view paths.Kang Seonghoon-7/+2
it reflected the obsolete syntax `use a, b, c;` and did not make past the parser (though it was a non-fatal error so we can continue). this legacy affected many portions of rustc and rustdoc as well, so this commit cleans them up altogether.
2014-04-24auto merge of #13713 : edwardw/rust/methodcall-span, r=alexcrichtonbors-1/+1
Specifically, the method parameter cardinality mismatch or missing method error message span now gets method itself exactly. It was the whole expression. Closes #9390 Closes #13684 Closes #13709
2014-04-23Allow attributes on match armsSteven Fackler-1/+6
RFC: 0008-match-arm-attributes
2014-04-24Calibrate span for method call error messagesEdward Wang-1/+1
Specifically, the method parameter cardinality mismatch or missing method error message span now gets method itself exactly. It was the whole expression. Closes #9390 Closes #13684 Closes #13709
2014-04-23Review changesNick Cameron-1/+2
2014-04-23Support unsized types with the `type` keywordNick Cameron-1/+7
2014-04-20Allow inheritance between structs.Nick Cameron-0/+10
No subtyping, no interaction with traits. Partially addresses #9912.
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-6/+6
2014-04-17Drive-by: `pprust::*_to_str` for TypeMethod, Method, and FnDecl.Felix S. Klock II-0/+12
2014-04-16auto merge of #13547 : alexcrichton/rust/remove-priv, r=huonwbors-2/+0
See [RFC 6](https://github.com/rust-lang/rfcs/blob/e0c741f1c6e372d0fd31c5978fcf8c7bd7c3e973/active/0006-remove-priv.md)
2014-04-16rustc: Remove private enum variantsAlex Crichton-2/+0
This removes the `priv` keyword from the language and removes private enum variants as a result. The remaining use cases of private enum variants were all updated to be a struct with one private field that is a private enum. RFC: 0006-remove-priv Closes #13535
2014-04-16pprust: Handle multi-stmt/no-expr `ExprFnBlock`klutzy-11/+14
Fixes #12685
2014-04-13auto merge of #13452 : Ryman/rust/fix_uint_as_u, r=alexcrichtonbors-2/+2
Fixes #13359.
2014-04-13libsyntax: update helper to stringify TyU* and TyI* to take into account ↵Kevin Butler-2/+2
having a value. Fixes #13359.
2014-04-11syntax: remove ast::Sigil.Eduard Burtescu-27/+21
2014-04-10auto merge of #13440 : huonw/rust/strbuf, r=alexcrichtonbors-8/+14
libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269
2014-04-10Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and ↵Kasey Carrothers-25/+25
updated associated variable and function names.
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-8/+14
port all code over to use it.
2014-04-06syntax: Tweak parsing lifetime bounds on closuresAlex Crichton-14/+21
In summary these are some example transitions this change makes: 'a || => ||: 'a proc:Send() => proc():Send The intended syntax for closures is to put the lifetime bound not at the front but rather in the list of bounds. Currently there is no official support in the AST for bounds that are not 'static, so this case is currently specially handled in the parser to desugar to what the AST is expecting. Additionally, this moves the bounds on procedures to the correct position, which is after the argument list. The current grammar for closures and procedures is: procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')' [ ':' bound-list ] [ '->' type ] closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|' [ ':' bound-list ] [ '->' type ] lifetime-list := lifetime | lifetime ',' lifetime-list arg-list := ident ':' type | ident ':' type ',' arg-list bound-list := bound | bound '+' bound-list bound := path | lifetime This does not currently handle the << ambiguity in `Option<<'a>||>`, I am deferring that to a later patch. Additionally, this removes the support for the obsolete syntaxes of ~fn and &fn. Closes #10553 Closes #10767 Closes #11209 Closes #11210 Closes #11211
2014-04-04Test fixes from rollupAlex Crichton-4/+4
2014-04-04syntax: remove obsolete mutability from ExprVec and ExprRepeat.Eduard Burtescu-10/+2
2014-04-03syntax: Remove AbiSet, use one AbiAlex Crichton-26/+27
This change removes the AbiSet from the AST, converting all usage to have just one Abi value. The current scheme selects a relevant ABI given a list of ABIs based on the target architecture and how relevant each ABI is to that architecture. Instead of this mildly complicated scheme, only one ABI will be allowed in abi strings, and pseudo-abis will be created for special cases as necessary. For example the "system" abi exists for stdcall on win32 and C on win64. Closes #10049
2014-03-31syntax: Switch field privacy as necessaryAlex Crichton-2/+2
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.