about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2017-06-02Rollup merge of #42319 - Manishearth:const-extern, r=nikomatsakisMark Simulacrum-0/+4
Improve error message for const extern fn It's currently ``error: unmatched visibility `pub` ``, which is a nonsensical error in this context.
2017-05-31Improve error message for const extern fnManish Goregaokar-0/+4
2017-05-31Emit proper expectation for the "default" keyword.Masaki Hara-2/+11
2017-05-31Parse macros named "default" correctly.Masaki Hara-19/+14
2017-05-25Hygienize lifetimes.Jeffrey Seyfried-1/+1
2017-05-25Declarative macros 2.0 without hygiene.Jeffrey Seyfried-21/+47
2017-05-25Refactor out `ast::MacroDef`.Jeffrey Seyfried-1/+3
2017-05-24Rollup merge of #42120 - euclio:unicode, r=arielb1Mark Simulacrum-1/+1
remove "much" from unicode diagnostic The English seems slightly awkward to me, and it's unnecessary.
2017-05-20remove "much" from unicode diagnosticAndy Russell-1/+1
2017-05-18Add an option to the parser to avoid parsing out of line modulesNick Cameron-4/+36
This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
2017-05-16Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkovMark Simulacrum-205/+195
Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-15adressed comments by @kennytm and @petrochenkovAndre Bogus-5/+4
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-205/+196
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12Disallow ._ in float literal.Masaki Hara-3/+1
2017-05-08Rollup merge of #41827 - qnighy:allow-bare-cr-in-nondoc-comment, r=estebankCorey Farwell-1/+1
Allow bare CR in ////-style comment. Fixes #40624 in a way that bare CR is allowed in all non-doc comments.
2017-05-08Allow bare CR in ////-style comment.Masaki Hara-1/+1
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-8/+8
2017-05-07Auto merge of #41729 - ubsan:master, r=nrcbors-22/+26
Delete features which are easily removed, in libsyntax
2017-05-07fix the easy features in libsyntaxubsan-22/+26
2017-05-06Fix "an" usageacdenisSK-1/+1
2017-05-05Rollup merge of #41722 - F001:warnTilde, r=petrochenkovCorey Farwell-0/+13
Suggest `!` for bitwise negation when encountering a `~` Fix #41679 Here is a program ```rust fn main() { let x = ~1; } ``` It's output: ``` error: `~` can not be used as an unary operator --> /home/fcc/temp/test.rs:4:13 | 4 | let x = ~1; | ^^ | = help: use `!` instead of `~` if you meant to bitwise negation ``` cc @bstrie
2017-05-05Suggest `!` for bitwise negation when encountering a `~`F001-0/+13
2017-05-04Remove use of `Self: Sized` from libsyntaxTommy Ip-1/+1
The bound is not required for compiling but it prevents using `next_token()` from a trait object. Fixes #33506.
2017-05-02Auto merge of #40851 - oli-obk:multisugg, r=jonathandturnerbors-10/+7
Minimize single span suggestions into a label changes ``` 14 | println!("☃{}", tup[0]); | ^^^^^^ | help: to access tuple elements, use tuple indexing syntax as shown | println!("☃{}", tup.0); ``` into ``` 14 | println!("☃{}", tup[0]); | ^^^^^^ to access tuple elements, use `tup.0` ``` Also makes suggestions explicit in the backend in preparation of adding multiple suggestions to a single diagnostic. Currently that's already possible, but results in a full help message + modified code snippet per suggestion, and has no rate limit (might show 100+ suggestions).
2017-04-28Auto merge of #41542 - petrochenkov:objpars2, r=nikomatsakisbors-2/+2
syntax: Parse trait object types starting with a lifetime bound Fixes https://github.com/rust-lang/rust/issues/39085 This was originally implemented in https://github.com/rust-lang/rust/pull/40043, then reverted, then there was some [agreement](https://github.com/rust-lang/rust/issues/39318#issuecomment-289108720) that it should be supported. (This is hopefully the last PR related to bound parsing.)
2017-04-28Auto merge of #41508 - michaelwoerister:generic-path-remapping, r=alexcrichtonbors-26/+26
Implement a file-path remapping feature in support of debuginfo and reproducible builds This PR adds the `-Zremap-path-prefix-from`/`-Zremap-path-prefix-to` commandline option pair and is a more general implementation of #41419. As opposed to the previous attempt, this implementation should enable reproducible builds regardless of the working directory of the compiler. This implementation of the feature is more general in the sense that the re-mapping will affect *all* paths the compiler emits, including the ones in error messages. r? @alexcrichton
2017-04-27Auto merge of #37860 - giannicic:defaultimpl, r=nagisabors-7/+27
#37653 support `default impl` for specialization this commit implements the first step of the `default impl` feature: > all items in a `default impl` are (implicitly) `default` and hence > specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See [referenced](https://github.com/rust-lang/rust/issues/37653) issue for further info r? @aturon
2017-04-26 support `default impl` for specializationGianni Ciccarelli-9/+6
`[default] [unsafe] impl` and typecheck
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-26/+26
reproducible builds.
2017-04-25Parse trait object types starting with a lifetime boundVadim Petrochenkov-2/+2
2017-04-25Add ui testsGuillaume Gomez-7/+4
2017-04-25Improve E0178 suggestion placementOliver Schneider-4/+5
2017-04-25Address PR commentsOliver Schneider-3/+1
2017-04-25Update affected testsOliver Schneider-3/+1
2017-04-25 support `default impl` for specializationGianni Ciccarelli-3/+11
pr review
2017-04-24Remove strip prefixGuillaume Gomez-16/+2
2017-04-24Add tests for module suggestionsGuillaume Gomez-15/+28
2017-04-24Fix invalid module suggestionGuillaume Gomez-13/+20
2017-04-24support `default impl` for specializationGianni Ciccarelli-7/+22
this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2017-04-21Move parse_remaining_bounds into a separate functionVadim Petrochenkov-20/+21
2017-04-21Fix issue with single question mark or parenVadim Petrochenkov-23/+28
2017-04-21syntax: Support parentheses around trait boundsVadim Petrochenkov-4/+25
2017-04-17Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkovbors-68/+99
libsyntax/parse: fix missing kind error reporting Fixes #41161. Fixes #41239.
2017-04-17libsyntax/parse: improve associated item error reportingAriel Ben-Yehuda-68/+99
Fixes #41161. Fixes #41239.
2017-04-17Auto merge of #41345 - frewsxcv:rollup, r=frewsxcvbors-1/+5
Rollup of 3 pull requests - Successful merges: #41012, #41280, #41290 - Failed merges:
2017-04-17Adjust descriptionalexey zabelin-1/+1
2017-04-15move NtVis enum variant to stave off comment rotAlex Burka-1/+1
2017-04-15parse interpolated visibility tokensAlex Burka-0/+2
2017-04-15update :vis implementation to current rustAlex Burka-1/+1
2017-04-15Implementation of the `vis` macro matcher.Daniel Keep-0/+2