about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2015-01-25Tweak chained comparison errors.Huon Wilson-3/+4
Lower case and give a more precise span: from operator to operator, not just the last one.
2015-01-25Add the span of the operator itself to ast::BinOp.Huon Wilson-5/+7
2015-01-22Fix some grammar inconsistencies for the '..' range notation.Daniel Grunwald-17/+37
Grammar changes: * allow 'for _ in 1..i {}' (fixes #20241) * allow 'for _ in 1.. {}' as infinite loop * prevent use of range notation in contexts where only operators of high precedence are expected (fixes #20811) Parser code cleanup: * remove RESTRICTION_NO_DOTS * make AS_PREC const and follow naming convention * make min_prec inclusive
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-315/+119
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-1/+1
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 #21463: sanxiyn/demutAlex Crichton-16/+16
2015-01-21rollup merge of #21411: P1start/help-tweaksAlex Crichton-1/+1
Conflicts: src/librustc_typeck/check/closure.rs
2015-01-21rollup merge of #21340: pshc/libsyntax-no-more-intsAlex Crichton-28/+28
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-1/+1
2015-01-21syntax: merge ast::ViewItem into ast::Item.Eduard Burtescu-315/+119
2015-01-21De-mut the parserSeo Sanghyeon-16/+16
2015-01-20Fix up some ‘help’ messagesP1start-1/+1
2015-01-19Auto merge of #21278 - thchittenden:issue-21033-struct-var-pattern-fix, ↵bors-25/+34
r=alexcrichton Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.
2015-01-19Fixes #21033 with accompanying test.Tom Chittenden-25/+34
2015-01-19Auto merge of #21099 - sanxiyn:opt-return-ty, r=alexcrichtonbors-24/+5
This avoids having ast::Ty nodes which have no counterpart in the source.
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-9/+9
2015-01-18libsyntax: int types -> isizePaul Collier-5/+5
2015-01-18libsyntax: int => i32 in appropriate placesPaul Collier-3/+3
2015-01-18Make output type in ast::FnDecl optionalSeo Sanghyeon-24/+5
2015-01-18auto merge of #20901 : dgrunwald/rust/update-token-can-begin-expr, r=sanxiynbors-9/+3
* add `Token::AndAnd` (double borrow) * add `Token::DotDot` (range notation) * remove `Token::Pound` and `Token::At` This fixes a syntax error when parsing `fn f() -> RangeTo<i32> { return ..1; }`. Also, remove `fn_expr_lookahead`. It's from the `fn~` days and seems to no longer be necessary.
2015-01-17libsyntax: uint types to usizePaul Collier-11/+11
2015-01-15Test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-15rollup merge of #21088: aochagavia/obsoleteAlex Crichton-128/+4
Only the most recent changes (since November 2014) get a special error. Fixes #20599
2015-01-15syntax: parse fully qualified UFCS expressions.Eduard Burtescu-7/+37
2015-01-14Remove old obsolete syntax errorsAdolfo Ochagavía-128/+4
2015-01-11Update Token::can_begin_expr() to make it consistent with the grammar:Daniel Grunwald-9/+3
* add Token::AndAnd (double borrow) * add Token::DotDot (range notation) * remove Token::Pound and Token::At Fixes a syntax error when parsing "fn f() -> RangeTo<i32> { return ..1; }". Also, remove "fn_expr_lookahead". It's from the fn~ days and seems to no longer be necessary.
2015-01-08Forbid trailing attributes in impl blocksSteven Fackler-2/+6
Closes #20711
2015-01-07rollup merge of #20720: nick29581/assoc-ice-missingAlex Crichton-18/+20
2015-01-08Remove String impls and fix for make tidyNick Cameron-3/+0
2015-01-07rollup merge of #20721: japaric/snapAlex Crichton-109/+108
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustc/lint/builtin.rs src/librustc/session/config.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/context.rs src/librustc_trans/trans/type_.rs src/librustc_typeck/check/_match.rs src/librustdoc/html/format.rs src/libsyntax/std_inject.rs src/libsyntax/util/interner.rs src/test/compile-fail/mut-pattern-mismatched.rs
2015-01-07rollup merge of #20726: dgrunwald/require-parens-for-chained-comparisonAlex Crichton-1/+23
[Rendered RFC](https://github.com/rust-lang/rfcs/blob/master/text/0558-require-parentheses-for-chained-comparisons.md)
2015-01-08RFC 558: Require parentheses for chained comparisonsDaniel Grunwald-1/+23
Fixes #20724.
2015-01-07use slicing sugarJorge Aparicio-109/+108
2015-01-08Fix precedence for ranges.Nick Cameron-18/+23
Technically this is a [breaking-change] but it probably shouldn't affect your code. Closes #20256
2015-01-07Merge pull request #20674 from jbcrail/fix-misspelled-commentsbors-1/+1
Fix misspelled comments. Reviewed-by: steveklabnik
2015-01-06Fix misspelled comments.Joseph Crail-1/+1
I cleaned up comments prior to the 1.0 alpha release.
2015-01-06Test fixes and rebase conflictsAlex Crichton-2/+2
2015-01-06rollup merge of #19430: pczarn/interp_tt-cleanupAlex Crichton-55/+83
Conflicts: src/libsyntax/parse/parser.rs
2015-01-07Cleanup and followup to PR #17830: parsing changesPiotr Czarnecki-55/+83
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes #18775 Fixes #18839 Fixes #15640
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-3/+3
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-07falloutNick Cameron-11/+27
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-3/+3
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-07Remove old slicing hacks and make new slicing workNick Cameron-95/+20
2015-01-07Replace full slice notation with index callsNick Cameron-79/+79
2015-01-05More test fixes!Alex Crichton-9/+3
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-6/+17
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-05Merge remote-tracking branch 'nrc/sized-2' into rollupAlex Crichton-14/+17
Conflicts: src/liballoc/boxed.rs src/libcollections/btree/map.rs src/libcollections/slice.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/libstd/collections/hash/map.rs src/libsyntax/parse/obsolete.rs src/test/compile-fail/unboxed-closure-sugar-default.rs src/test/compile-fail/unboxed-closure-sugar-equiv.rs src/test/compile-fail/unboxed-closure-sugar-lifetime-elision.rs src/test/compile-fail/unboxed-closure-sugar-region.rs src/test/compile-fail/unsized3.rs src/test/run-pass/associated-types-conditional-dispatch.rs
2015-01-05rollup merge of #20556: japaric/no-for-sizedAlex Crichton-2/+6
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/libcore/borrow.rs src/libcore/cmp.rs src/libcore/ops.rs src/libstd/c_str.rs src/test/compile-fail/issue-19009.rs
2015-01-05rollup merge of #20554: huonw/mut-patternAlex Crichton-2/+7
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05rollup merge of #20424: jroesch/tuple-struct-where-clause-fixAlex Crichton-40/+89
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.