about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
AgeCommit message (Collapse)AuthorLines
2015-02-18Round 3 test fixes and conflictsAlex Crichton-51/+51
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-32/+32
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-32/+32
2015-02-18rollup merge of #22287: Ryman/purge_carthographersAlex Crichton-4/+3
This overlaps with #22276 (I left make check running overnight) but covers a number of additional cases and has a few rewrites where the clones are not even necessary. This also implements `RandomAccessIterator` for `iter::Cloned` cc @steveklabnik, you may want to glance at this before #22281 gets the bors treatment
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-4/+3
2015-02-17std: Stabilize the `ascii` moduleAlex Crichton-6/+4
This commit performs a stabilization pass over the `std::ascii` module taking the following actions: * the module name is now stable * `AsciiExt` is now stable after moving its type parameter to an `Owned` associated type * `AsciiExt::is_ascii` is now stable * `AsciiExt::to_ascii_uppercase` is now stable * `AsciiExt::to_ascii_lowercase` is now stable * `AsciiExt::eq_ignore_ascii_case` is now stable * `AsciiExt::make_ascii_uppercase` is added to possibly replace `OwnedAsciiExt::into_ascii_uppercase` (similarly for lowercase variants). * `escape_default` now returns an iterator and is stable * `EscapeDefault` is now stable Trait implementations are now also marked stable. Primarily it is still unstable to *implement* the `AsciiExt` trait due to it containing some unstable methods. [breaking-change]
2015-02-10TestsNick Cameron-4/+10
2015-02-07Fake up #![no_std] on pretty-printing; keep it out of ASTKeegan McAllister-1/+22
2015-02-06Update to last version, remove "[]" as much as possibleGuillaumeGomez-11/+11
2015-02-06Libsyntax has been updatedGuillaumeGomez-17/+16
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-16/+17
2015-02-06Auto merge of #21947 - bluss:full-range-syntax, r=brsonbors-3/+1
Implement step 1 of rust-lang/rfcs#702 Allows the expression `..` (without either endpoint) in general, can be used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`. The old syntax &expr[] is not yet removed or warned for.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-4/+4
2015-02-05Implement pretty-printing of `..` and update tests.Ulrik Sverdrup-3/+1
Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing passes.
2015-02-03Remove the explicit closure kind syntax from the parser and AST;Niko Matsakis-14/+5
upgrade the inference based on expected type so that it is able to infer the fn kind in isolation even if the full signature is not available (and we could perhaps do better still in some cases, such as extracting just the types of the arguments but not the return value).
2015-02-02rollup merge of #21830: japaric/for-cleanupAlex Crichton-42/+42
Conflicts: src/librustc/metadata/filesearch.rs src/librustc_back/target/mod.rs src/libstd/os.rs src/libstd/sys/windows/os.rs src/libsyntax/ext/tt/macro_parser.rs src/libsyntax/print/pprust.rs src/test/compile-fail/issue-2149.rs
2015-02-02`for x in xs.into_iter()` -> `for x in xs`Jorge Aparicio-1/+1
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-41/+41
2015-02-02Omit integer suffix when unnecessaryAlfie John-31/+31
See PR # 21378 for context
2015-01-31Fix pretty printerAdolfo Ochagavía-0/+1
2015-01-29Auto merge of #21677 - japaric:no-range, r=alexcrichtonbors-1/+1
Note: Do not merge until we get a newer snapshot that includes #21374 There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672). r? @alexcrichton
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-1/+1
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-27fix #[cfg(test)] warningsJorge Aparicio-1/+0
2015-01-26Fallout of io => old_ioAlex Crichton-10/+10
2015-01-26Remove dead code related to old closures.Eduard Burtescu-84/+11
2015-01-26Remove "unboxed" attribute in code referring to new closures.Eduard Burtescu-8/+8
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-45/+45
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-29/+29
2015-01-18libsyntax: int types -> isizePaul Collier-2/+2
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-14/+14
2015-01-15rollup merge of #21127: erickt/opt-stackAlex Crichton-85/+152
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: Don't import the pp.rs enum variants into the namespaceErick Tryzelaar-7/+14
2015-01-07use slicing sugarJorge Aparicio-85/+84
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-80/+80
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