about summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2015-01-24Auto merge of #21079 - huonw:chained-cmp-tweaks, r=pnkfelixbors-2/+2
First commit is mindless groundwork for the second one, to make the spans (arguably) nicer. ### before ``` require-parens-for-chained-comparison.rs:14:20: 14:22 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:14 false == false == false; ^~ require-parens-for-chained-comparison.rs:17:16: 17:17 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:17 false == 0 < 2; ^ require-parens-for-chained-comparison.rs:20:8: 20:9 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:20 f<X>(); ^ require-parens-for-chained-comparison.rs:20:8: 20:9 help: Use ::< instead of < if you meant to specify type arguments. require-parens-for-chained-comparison.rs:20 f<X>(); ^ ``` ### after ``` require-parens-for-chained-comparison.rs:14:11: 14:22 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:14 false == false == false; ^~~~~~~~~~~ require-parens-for-chained-comparison.rs:17:11: 17:17 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:17 false == 0 < 2; ^~~~~~ require-parens-for-chained-comparison.rs:20:6: 20:9 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:20 f<X>(); ^~~ require-parens-for-chained-comparison.rs:20:6: 20:9 help: use `::<...>` instead of `<...>` if you meant to specify type arguments require-parens-for-chained-comparison.rs:20 f<X>(); ^~~ ```
2015-01-25Add the span of the operator itself to ast::BinOp.Huon Wilson-2/+2
2015-01-23Fix tidy.Vadim Chugunov-1/+1
2015-01-22Suppress space after idents with "ModName" style in serialization of ↵Vadim Chugunov-1/+10
exported macros. Fixes issue #20701
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-43/+25
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21rollup merge of #21258: aturon/stab-3-indexAlex Crichton-2/+2
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
2015-01-21rollup merge of #21340: pshc/libsyntax-no-more-intsAlex Crichton-108/+108
Collaboration with @rylev! I didn't change `int` in the [quasi-quoter](https://github.com/pshc/rust/blob/99ae1a30f3ca28c0f7e431620560d30e44627124/src/libsyntax/ext/quote.rs#L328), because I'm not sure if there will be adverse effects. Addresses #21095.
2015-01-21Fallout from stabilization.Aaron Turon-2/+2
2015-01-21syntax: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-43/+25
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-46/+46
2015-01-18libsyntax: int types -> isizePaul Collier-27/+27
2015-01-18Make output type in ast::FnDecl optionalSeo Sanghyeon-18/+10
2015-01-17libsyntax: rename functions from uint to usizePaul Collier-2/+2
2015-01-17libsyntax: uint types to usizePaul Collier-37/+37
2015-01-15rollup merge of #21127: erickt/opt-stackAlex Crichton-174/+252
libsyntax compiled without optimization uses a lot of stack, which can cause it to run out of stack space. This PR factors out some arm handlers from `print_expr` as well as converts `advance_left` into a loop. This helps to cut down on the stack usage.
2015-01-15syntax: add fully qualified UFCS expressions.Eduard Burtescu-8/+18
2015-01-13syntax: factor out print_expr arms to reduce non-optimized stack usageErick Tryzelaar-78/+138
2015-01-13syntax: Rewrite pp advance_left to use a constant stack sizeErick Tryzelaar-31/+37
2015-01-13syntax: Don't import the pp.rs enum variants into the namespaceErick Tryzelaar-70/+82
2015-01-07use slicing sugarJorge Aparicio-88/+87
2015-01-07falloutNick Cameron-27/+26
2015-01-07Pretty print empty structs properlyNick Cameron-1/+4
2015-01-07Replace full slice notation with index callsNick Cameron-82/+82
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-0/+2
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05rollup merge of #20554: huonw/mut-patternAlex Crichton-1/+4
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05rollup merge of #20424: jroesch/tuple-struct-where-clause-fixAlex Crichton-1/+2
Fixes #17904. All the cases that I believe we should support are detailed in the test case, let me know if there is there is any more desired behavior. cc @japaric. r? @nikomatsakis or whoever is appropriate.
2015-01-05remove TyClosureJorge Aparicio-19/+0
2015-01-05Add a special macro nonterminal $crateKeegan McAllister-0/+2
2015-01-05Refactor struct parsing and add testsJared Roesch-1/+2
2015-01-05Change `&` pat to only work with &T, and `&mut` with &mut T.Huon Wilson-1/+4
This implements RFC 179 by making the pattern `&<pat>` require matching against a variable of type `&T`, and introducing the pattern `&mut <pat>` which only works with variables of type `&mut T`. The pattern `&mut x` currently parses as `&(mut x)` i.e. a pattern match through a `&T` or a `&mut T` that binds the variable `x` to have type `T` and to be mutable. This should be rewritten as follows, for example, for &mut x in slice.iter() { becomes for &x in slice.iter() { let mut x = x; Due to this, this is a [breaking-change] Closes #20496.
2015-01-04Add syntax for negative implementations of traitsFlavio Percoco-0/+8
This commit introduces the syntax for negative implmenetations of traits as shown below: `impl !Trait for Type {}` cc #13231 Part of RFC #3
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`.