about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2018-12-05Fix pretty testShotaro Yamada-1/+1
2018-12-04adds DocTest filename variant, refactors doctest_offset out of source_map, ↵Matthew Russo-5/+7
fixes remaining test failures
2018-12-04updates all Filename variants to take a fingerprintMatthew Russo-5/+8
2018-12-04cleanup: remove static lifetimes from constsljedrz-3/+3
2018-12-04Use iterator and pattern APIs instead of `char_at`Shotaro Yamada-47/+32
2018-12-04Address review commentsVadim Petrochenkov-2/+2
2018-12-04syntax: Rename some keywordsVadim Petrochenkov-3/+3
`CrateRoot` -> `PathRoot`, `::` doesn't necessarily mean crate root now `SelfValue` -> `SelfLower`, `SelfType` -> `SelfUpper`, both `self` and `Self` can be used in type and value namespaces now
2018-12-03Rollup merge of #56438 - yui-knk:remove_not_used_DotEq_token, r=petrochenkovkennytm-4/+1
Remove not used `DotEq` token Currently libproc_macro does not use `DotEq` token. https://github.com/rust-lang/rust/pull/49545 changed libproc_macro to not generate `DotEq` token.
2018-12-03Rollup merge of #56433 - yui-knk:update_comment_of_parse_visibility, ↵kennytm-3/+4
r=petrochenkov Add description about `crate` for parse_visibility's comment This rule was introduced by https://github.com/rust-lang/rust/pull/45401.
2018-12-03Rollup merge of #56419 - mark-i-m:remove-try, r=Centrilkennytm-4/+2
Remove some uses of try!
2018-12-02Remove not used `DotEq` tokenyui-knk-4/+1
Currently libproc_macro does not use `DotEq` token. https://github.com/rust-lang/rust/pull/49545 changed libproc_macro to not generate `DotEq` token.
2018-12-02Delay gensym creation for "underscore items" until name resolutionVadim Petrochenkov-14/+13
Prohibit `static _` Fis unused import warnings for `use foo as _` Add more tests for `use foo as _`
2018-12-02Fix "line longer than 100 chars"yui-knk-3/+4
2018-12-02Add description about `crate` for parse_visibility's commentyui-knk-1/+1
This rule was introduced by https://github.com/rust-lang/rust/pull/45401.
2018-12-01remove some uses of try!Mark Mansi-4/+2
2018-12-01resolve: Support aliasing local crate root in extern preludeVadim Petrochenkov-1/+5
2018-11-30Use appropriate terminology based on heuristicEsteban Küber-13/+24
2018-11-30Suggest an appropriate token when encountering `pub Ident<'a>`Esteban Küber-11/+28
2018-12-01Rollup merge of #56336 - nnethercote:clean-up-pp, r=nikomatsakiskennytm-1/+1
Clean up and streamline the pretty-printer Some minor improvements.
2018-11-29Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavisGuillaume Gomez-2/+2
Clean up span in non-trailing `..` suggestion
2018-11-29Rollup merge of #56255 - jasonl:update-old-documents, r=michaelwoeristerGuillaume Gomez-3/+2
Update outdated code comments in StringReader For the detection of newlines in the lexer, this is now done in `analyze_source_file.rs`.
2018-11-29Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakisGuillaume Gomez-8/+45
Suggest appropriate place for lifetime when declared after type arguments
2018-11-29Use `Cow` in `Token::String`.Nicholas Nethercote-1/+1
`Printer::word` takes a `&str` and converts it into a `String`, which causes an allocation. But that allocation is rarely necessary, because `&str` is almost always a `&'static str` or a `String` that won't be used again. This commit changes `Token::String` so it holds a `Cow<'static, str>` instead of a `String`, which avoids a lot of allocations.
2018-11-28Clean up span in non-trailing `..` suggestionEsteban Küber-2/+2
2018-11-26Specify suggestion applicabilityEsteban Küber-1/+2
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-26Update outdated code comments in StringReaderJason Langenauer-3/+2
2018-11-26Emit one diagnostic for multiple misplaced lifetimesEsteban Küber-12/+19
2018-11-25Move lifetimes before the *first* type argumentEsteban Küber-1/+3
2018-11-25Suggest appropriate place for lifetime when declared after type argumentsEsteban Küber-8/+35
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