about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2018-11-27resolve: Implement edition hygiene for imports and absolute pathsVadim Petrochenkov-16/+13
Use per-span hygiene in a few other places in resolve Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-22Rollup merge of #56002 - Axary:master, r=estebankGuillaume Gomez-2/+13
fix #55972: Erroneous self arguments on bare functions emit subpar compilation error #55972 r? @estebank
2018-11-20improve error noteAxary-1/+1
2018-11-19Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichtonbors-2/+3
Ignore non-semantic tokens for 'probably_eq' streams. Improves the situation in #43081 by skipping typically non-semantic tokens when checking for 'probably_eq'. r? @alexcrichton
2018-11-16Ignore non-semantic tokens for 'probably_eq' streams.Sergio Benitez-2/+3
2018-11-16fix tidy (remove whitespace)Axary-1/+1
2018-11-16improve error when self is used as not the first argumentAxary-8/+9
2018-11-16add a note to the error messageAxary-1/+4
2018-11-16eat CloseDelimAxary-2/+9
2018-11-14Clean up some non-mod-rs stuff.Eric Huss-15/+1
2018-11-12Change `Lit::short_name` to `Lit::literal_name`.Nicholas Nethercote-8/+8
This avoids a moderately hot allocation in `parse_lit_token`.
2018-11-08Rollup merge of #55777 - nnethercote:less-P-in-ast, r=petrochenkovMark Rousskov-1/+1
Use `Lit` rather than `P<Lit>` in `ast::ExprKind`. Because it results in fewer allocations and small speedups on some benchmarks.
2018-11-08Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.Nicholas Nethercote-1/+1
Because it results in fewer allocations and small speedups on some benchmarks.
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-1/+1
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-1/+1
2018-11-05Auto merge of #55451 - estebank:arg-doc, r=pnkfelixbors-16/+61
Custom diagnostic when trying to doc comment argument When writing ``` pub fn f( /// Comment id: u8, ) {} ``` Produce a targeted diagnostic ``` error: documentation comments cannot be applied to method arguments --> $DIR/fn-arg-doc-comment.rs:2:5 | LL | /// Comment | ^^^^^^^^^^^ doc comments are not allowed here ``` Fix #54801.
2018-11-04Auto merge of #55455 - estebank:expected-descr, r=michaelwoeristerbors-24/+26
Use token description in "expected/found" parse messages Fix #54309.
2018-11-04Auto merge of #54861 - rep-nop:find_main_in_doctest, r=estebankbors-9/+64
rustdoc: Replaces fn main search and extern crate search with proper parsing during doctests. Fixes #21299. Fixes #33731. Let me know if there's any additional changes you'd like made!
2018-11-03Extended elaboration for trait aliases to include arbitrary bounds.Alexander Regueiro-5/+5
2018-11-03Added support for trait aliases as object types.Alexander Regueiro-1/+1
2018-11-02implement existing parser fns in terms of fallible fnsQuietMisdreavus-14/+4
2018-11-01buffer errors from initial tokenization when parsingQuietMisdreavus-3/+68
2018-10-29Rename other occs of (Code/File)Map to Source(Map/File) #51574David Lavati-58/+58
2018-10-29Fix regressionEsteban Küber-1/+1
2018-10-29Rollup merge of #55384 - nnethercote:better-integer_lit-float_lit, ↵Pietro Albini-4/+19
r=michaelwoerister Avoid unnecessary allocations in `float_lit` and `integer_lit`. This commit avoids an allocation when parsing any float and integer literals that don't involved underscores. This reduces the number of allocations done for the `tuple-stress` benchmark by 10%, reducing its instruction count by just under 1%.
2018-10-28Use token description in "expected/found" parse messagesEsteban Küber-23/+25
2018-10-28Provide specific label for patern parsing errorEsteban Küber-18/+24
2018-10-28Point at `match` when a parse failure ocurrs inside of itEsteban Küber-1/+5
2018-10-28Produce targeted diagnostic when using doc comments on fn argsEsteban Küber-1/+36
Before parsing argument names and types, try to consume an incorrectly included doc comment or attribute in order to recover and continue parsing the rest of the fn definition.
2018-10-28Auto merge of #55192 - cramertj:nested-mod, r=petrochenkovbors-0/+11
Fix ordering of nested modules in non-mod.rs mods Flatten relative offset into directory path before adding inline (mod x { ... }) module names to the current directory path. Fix #55094
2018-10-26Avoid unnecessary allocations in `float_lit` and `integer_lit`.Nicholas Nethercote-4/+19
This commit avoids an allocation when parsing any float and integer literals that don't involved underscores. This reduces the number of allocations done for the `tuple-stress` benchmark by 10%, reducing its instruction count by just under 1%.
2018-10-26rebasing and reviewer changesNick Cameron-1/+1
Primarily refactoring `(Ident, Option<NodeId>)` to `Segment`
2018-10-26Give each PathSegment a NodeIdNick Cameron-2/+2
2018-10-21Fix a few tests with target-specific outputVadim Petrochenkov-1/+1
Enable one fully ignored test
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-1/+1
2018-10-18Fix ordering of nested modules in non-mod.rs modsTaylor Cramer-0/+11
Flatten relative offset into directory path before adding inline (mod x { ... }) module names to the current directory path. Fix #55094
2018-10-14Support underscore as constant nameDonato Sciarra-1/+7
Issue: 54912
2018-10-12Rollup merge of #54967 - holmgr:master, r=estebankkennytm-0/+5
Remove incorrect span for second label inner macro invocation A fix for issue #54841
2018-10-12Auto merge of #53933 - GuillaumeGomez:codeblock-error-display, r=QuietMisdreavusbors-0/+13
Improve error display for codeblocks in rustdoc Part of #53919. r? @QuietMisdreavus
2018-10-11Auto merge of #54850 - mcr431:fix-54707-trait-function-from-macro, ↵bors-0/+17
r=nikomatsakis Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls Previously parsing trait items only handled opening brace token and semicolon, I added a branch to the match statement that will also handle interpolated blocks.
2018-10-10Rollup merge of #54893 - dsciarra:issue-54379, r=pnkfelixManish Goregaokar-0/+3
Fixes #47311. r? @nrc
2018-10-10Rollup merge of #54862 - Havvy:cfg_attr_multi, r=petrochenkovManish Goregaokar-1/+1
Fixes #47311. r? @nrc
2018-10-10Remove incorrect span for second label inner macro invocationholmgr-0/+5
2018-10-08parse_trait_item_ now handles interpolated blocks as function body declsMatthew Russo-0/+17
2018-10-07Fix internal compiler error on malformed match arm pattern.Donato Sciarra-0/+3
Issue: 54379
2018-10-05cfg_attr_multi: Basic implementationHavvy (Ryan Scheel)-1/+1
Does not implement the warning or a feature flag.
2018-10-05Rollup merge of #54833 - abonander:issue-54441, r=petrochenkovPietro Albini-12/+11
make `Parser::parse_foreign_item()` return a foreign item or error Fixes `Parser::parse_foreign_item()` to follow the convention of `parse_trait_item()` and `parse_impl_item()` in that it *must* parse an item or return an error, and then the caller is responsible for detecting the closing delimiter. This prevents it from looping endlessly on an unexpected token in `ext/expand.rs` where it was also leaking memory by continually pushing to `Parser::expected_tokens` via `Parser::check_keyword()`. closes #54441 r? @petrochenkov cc @dtolnay
2018-10-05add suggestion for inverted function parametersAndy Russell-1/+20
Fixes #54065.
2018-10-05make `Parser::parse_foreign_item()` return a foreign item or errorAustin Bonander-12/+11
closes #54441
2018-09-29Add a sentence before rustc errorsGuillaume Gomez-1/+3