about summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-8/+8
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-5/+5
2015-01-02Merge remote-tracking branch 'origin/master' into rollupAlex Crichton-1/+1
Conflicts: src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
2015-01-02Make type in ast::Local optionalSeo Sanghyeon-6/+4
2015-01-02Accept `self` in place of `mod` in use itemsNick Cameron-1/+1
[breaking-change] `mod` is still accepted, but gives a deprecated warning
2014-12-30Fallout from stabilizationAaron Turon-3/+4
2014-12-29rollup merge of #20194: nick29581/dst-syntaxAlex Crichton-13/+18
Part of #19607. r? @nikomatsakis
2014-12-30Remove ExprSlice by hacking the compilerNick Cameron-19/+1
[breaking-change] The `mut` in slices is now redundant. Mutability is 'inferred' from position. This means that if mutability is only obvious from the type, you will need to use explicit calls to the slicing methods.
2014-12-30Add hypothetical support for ranges with only an upper boundNick Cameron-1/+3
Note that this doesn't add the surface syntax.
2014-12-29Slash the ast::Stmt type from 104 to 24 bytes.Huon Wilson-1/+1
(on platforms with 64-bit pointers.) The StmtMac variant is rather large and also fairly rare, so let's optimise the common case.
2014-12-26Changes to RustDocNick Cameron-7/+12
2014-12-26Accept `?Sized` as well as `Sized?`Nick Cameron-11/+11
Includes a bit of refactoring to store `?` unbounds as bounds with a modifier, rather than in their own world, in the AST at least.
2014-12-24Add syntax for rangesNick Cameron-0/+7
2014-12-22rollup merge of #20124: klutzy/pprust-asmAlex Crichton-5/+23
2014-12-21Fallout of std::str stabilizationAlex Crichton-131/+134
2014-12-22pprust: Fix asm optionsklutzy-5/+23
2014-12-21rollup merge of #20057: nick29581/array-syntaxAlex Crichton-3/+2
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported. Part of #19999 r? @nikomatsakis
2014-12-20Add support for multiple region bounds in where clausesJared Roesch-2/+9
2014-12-20Add parser support for generalized where clausesJared Roesch-2/+9
Implement support in the parser for generalized where clauses, as well as the conversion of ast::WherePredicates to ty::Predicate in `collect.rs`.
2014-12-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-3/+2
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
2014-12-19libsyntax: use `#[deriving(Copy)]`Jorge Aparicio-17/+7
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-13/+29
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-17rollup merge of #19918: pnkfelix/ast-refactor-make-place-in-exprbox-an-optionAlex Crichton-1/+1
This is to allow us to migrate away from UnUniq in a followup commit, and thus unify the code paths related to all forms of `box`.
2014-12-17rollup merge of #19831: luqmana/deriving-whereAlex Crichton-0/+1
Fixes #19358.
2014-12-16AST refactor: make the place in ExprBox an option.Felix S. Klock II-1/+1
This is to allow us to migrate away from UnUniq in a followup commit, and thus unify the code paths related to all forms of `box`.
2014-12-15Fix pretty printing of HRTB syntaxBrian Koropoff-0/+5
2014-12-14Parse `unsafe impl` but don't do anything particularly interesting with the ↵Niko Matsakis-3/+7
results.
2014-12-14Parse `unsafe trait` but do not do anything with it beyond parsing and ↵Niko Matsakis-3/+5
integrating into rustdoc etc.
2014-12-14Rename FnStyle trait to Unsafety.Niko Matsakis-24/+24
2014-12-14Remove `proc` types/expressions from the parser, compiler, andNiko Matsakis-47/+2
language. Recommend `move||` instead.
2014-12-14libsyntax: Output where clauses in pretty printer for structs.Luqman Aden-0/+1
2014-12-13libsyntax: use unboxed closuresJorge Aparicio-12/+18
2014-12-12Add support for equality constraints on associated typesNick Cameron-2/+26
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+14
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-06libsyntax: remove unnecessary `to_string()` callsJorge Aparicio-3/+3
2014-12-06libsyntax: remove unnecessary `as_slice()` callsJorge Aparicio-1/+1
2014-12-01auto merge of #19405 : jfager/rust/de-match-pyramid, r=bstriebors-27/+16
No semantic changes, no enabling `if let` where it wasn't already enabled.
2014-11-30syntax: Make `asm!` clobbers a proper vector.Kang Seonghoon-1/+5
Otherwise `--pretty expanded` diverges.
2014-11-29Replace some verbose match statements with their `if let` equivalent.jfager-27/+16
No semantic changes, no enabling `if let` where it wasn't already enabled.
2014-11-26rollup merge of #19326: huonw/safer-syntaxAlex Crichton-1/+1
This makes it correct (e.g. avoiding null pointers) and safe.
2014-11-26Rote changes due to the fact that ast paths no longer carry this extraneous ↵Niko Matsakis-20/+6
bounds.
2014-11-26Fixup various places that were doing `&T+'a` and do `&(T+'a)`Niko Matsakis-1/+1
2014-11-26Implement the new parsing rules for types in the parser, modifying the AST ↵Niko Matsakis-8/+16
appropriately.
2014-11-26Make syntax::owned_slice a Box<[T]> wrapper.Huon Wilson-1/+1
This makes it correct (e.g. avoiding null pointers) and safe.
2014-11-23rollup merge of #19215: aochagavia/prettyJakub Bukaj-21/+16
Closes https://github.com/rust-lang/rust/issues/19077 I would appreciate any guidance on how to write a test for this. I saw some examples in `test/pretty`, but there are different ways to test... With or without `.pp` files, with a `pp-exact` comment, etc.
2014-11-23Remove type parameters from ExprField and ExprTupFieldAdolfo Ochagavía-16/+2
2014-11-22Fix pretty printing unsafe match armsAdolfo Ochagavía-21/+16
2014-11-21core: Convert Char::escape_default, escape_unicode to iteratorsBrian Anderson-1/+3
[breaking-change]
2014-11-20auto merge of #19113 : nikomatsakis/rust/unboxed-boxed-closure-unification, ↵bors-43/+4
r=acrichto Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind). This supercedes PR #19089, which was already reviewed by @pcwalton.
2014-11-19rollup merge of #19103: huonw/literal-suffixesJakub Bukaj-12/+22
Futureproof Rust for fancier suffixed literals. The Rust compiler tokenises a literal followed immediately (no whitespace) by an identifier as a single token: (for example) the text sequences `"foo"bar`, `1baz` and `1u1024` are now a single token rather than the pairs `"foo"` `bar`, `1` `baz` and `1u` `1024` respectively. The compiler rejects all such suffixes in the parser, except for the 12 numeric suffixes we have now. I'm fairly sure this will affect very few programs, since it's not currently legal to have `<literal><identifier>` in a Rust program, except in a macro invocation. Any macro invocation relying on this behaviour can simply separate the two tokens with whitespace: `foo!("bar"baz)` becomes `foo!("bar" baz)`. This implements [RFC 463](https://github.com/rust-lang/rfcs/blob/master/text/0463-future-proof-literal-suffixes.md), and so closes https://github.com/rust-lang/rust/issues/19088.