summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-07-31cleanup StringReader fieldsAleksey Kladov-12/+11
2019-07-31Decode AttrId via mk_attr_idMark Rousskov-3/+13
2019-07-31Use Ident::new over setting span position via builderMark Rousskov-4/+4
2019-07-31Replace AstBuilder with inherent methodsMark Rousskov-402/+130
2019-07-31Replace a few Attribute constructors with mk_attrMark Rousskov-9/+2
2019-07-31Remove span argument from mk_attr_{inner,outer}Mark Rousskov-7/+7
Always the same as the passed MetaItem
2019-07-31Remove Span argument from ExtCtxt::attributeMark Rousskov-6/+6
MetaItem.span was always equivalent
2019-07-31Remove AttrId from Attribute constructorsMark Rousskov-23/+29
2019-07-31Unify spanned and non-spanned Attribute ctorsMark Rousskov-17/+7
There is no difference in the code/arguments, so go with the shorter name throughout the code.
2019-07-30Rollup merge of #63095 - Centril:incomplete-features-lint, r=varkorMazdak Farrokhzad-13/+4
Turn `INCOMPLETE_FEATURES` into lint We do this because it is annoying to see the warning when building rustc and because this is better from a "separation of concerns" POV. The drawback to this change is that this will respect `--cap-lints`. Also note that this is not a buffered lint so if there are fatal parser errors then the lint will not trigger. r? @varkor
2019-07-30Point at type ascription before macro invocation on expansion parse errorEsteban Küber-9/+49
2019-07-30Pacify tidy, the merciless.Mazdak Farrokhzad-1/+1
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-71/+41
2019-07-30Turn INCOMPLETE_FEATURES into a lint.Mazdak Farrokhzad-13/+4
2019-07-30Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebankMazdak Farrokhzad-162/+217
Syntax: Recover on `for ( $pat in $expr ) $block` Fixes #62724 by adding some recovery: ``` error: unexpected closing `)` --> $DIR/recover-for-loop-parens-around-head.rs:10:23 | LL | for ( elem in vec ) { | --------------^ | | | opening `(` | help: remove parenthesis in `for` loop: `elem in vec` ``` The last 2 commits are drive-by cleanups. r? @estebank
2019-07-30Account for maybe_whole_expr in range patterns.Mazdak Farrokhzad-0/+14
2019-07-29Rollup merge of #63092 - Centril:update-impl-trait-gates, r=varkorMazdak Farrokhzad-2/+2
Update `impl Trait` gate issues cc https://github.com/rust-lang/rust/issues/63065 cc https://github.com/rust-lang/rust/issues/63063 r? @varkor cc @alexreg
2019-07-29Rollup merge of #63077 - petrochenkov:nolangfeat, r=petrochenkovMazdak Farrokhzad-18/+0
cleanup: Remove some language features related to built-in macros They are now library features. Cleanup after https://github.com/rust-lang/rust/pull/62086. The unstable book files are moved because tidy complained.
2019-07-29Update existential_type + impl_trait_in_bindings issue numbers.Mazdak Farrokhzad-2/+2
2019-07-28Auto merge of #63090 - Centril:rollup-xnjwm2h, r=Centrilbors-8/+23
Rollup of 8 pull requests Successful merges: - #61856 (Lint attributes on function arguments) - #62360 (Document that ManuallyDrop::drop should not called more than once) - #62392 (Update minifier-rs version) - #62871 (Explicit error message for async recursion.) - #62995 (Avoid ICE when suggestion span is at Eof) - #63053 (SystemTime docs: recommend Instant for elapsed time) - #63081 (tidy: Cleanup the directory whitelist) - #63088 (Remove anonymous_parameters from unrelated test) Failed merges: r? @ghost
2019-07-28Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasperMazdak Farrokhzad-8/+23
Lint attributes on function arguments Fixes #61238. cc #60406
2019-07-28Add 'span_to_snippet' shortcut.Mazdak Farrokhzad-16/+13
2019-07-28Use chaining for diagnosics in parser.Mazdak Farrokhzad-152/+155
2019-07-28Recover 'for ( $pat in $expr ) $block'.Mazdak Farrokhzad-0/+55
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-2/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-6/+1
rustbuild Remove some random unnecessary lint `allow`s
2019-07-28cleanup: Remove some language features related to built-in macrosVadim Petrochenkov-18/+0
They are now library features.
2019-07-28Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkovMazdak Farrokhzad-385/+318
Implement RFC 2707 + Parser recovery for range patterns Implement https://github.com/rust-lang/rfcs/pull/2707. - Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result. - Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later). - Refactor `parser.rs` wrt. parsing sequences and lists of things in the process. - Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`. This should make it easy to actually support these patterns semantically later if we so desire. cc https://github.com/rust-lang/rust/issues/62254 r? @petrochenkov
2019-07-28Address comments in lowering + parsing.Mazdak Farrokhzad-4/+7
2019-07-28Recover on 'X..' / 'X..=' / 'X...' range patterns.Mazdak Farrokhzad-21/+43
2019-07-28Recover on '..X' / '..=X' / '...X' range patterns.Mazdak Farrokhzad-6/+46
2019-07-28Adjust parsing of Slice, Tuple, TupleStruct patterns.Mazdak Farrokhzad-127/+26
2019-07-28Cleanup using the new parse_*_seq methods.Mazdak Farrokhzad-96/+60
2019-07-28Add more parse_*_seq methods for code reuse.Mazdak Farrokhzad-0/+24
2019-07-28Cleanup parse_seq_* methods + record trailing separators.Mazdak Farrokhzad-42/+35
2019-07-28Adjust and document 'Pat::to_ty' accordingly.Mazdak Farrokhzad-4/+11
2019-07-28Adjust pretty printing accordingly.Mazdak Farrokhzad-47/+8
2019-07-28Adjust feature gating of subslice patterns accordingly.Mazdak Farrokhzad-5/+17
2019-07-28Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.Mazdak Farrokhzad-37/+21
2019-07-28Introduce 'ast::Pat::is_rest(&self) -> bool'.Mazdak Farrokhzad-0/+8
2019-07-28Add 'ast::PatKind::Rest'.Mazdak Farrokhzad-2/+18
2019-07-28Rollup merge of #63038 - eupn:outer-attribute-diag, r=estebankMazdak Farrokhzad-16/+45
Make more informative error on outer attribute after inner Fixes #61218. ?r @estebank
2019-07-28Rollup merge of #62771 - petrochenkov:depext, r=eddybMazdak Farrokhzad-785/+984
Break dependencies between `syntax_ext` and other crates Move `source_util` macros into `syntax_ext`. Move other early code generation facilities like standard library injection into `syntax_ext`. The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything. Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`. r? @eddyb
2019-07-27Remove run-pass test suitesVadim Petrochenkov-1/+1
2019-07-27Treat doc comments separatelyEvgenii P-8/+20
2019-07-27syntax_ext: `proc_macro_decls` -> `proc_macro_harness`Vadim Petrochenkov-3/+4
Few other minor renamings for consistency. Remove one unused dependency from `rustc_passes`. Fix libsyntax tests. Fix rebase.
2019-07-27Move standard library injection into libsyntax_extVadim Petrochenkov-116/+5
2019-07-27Move test harness generation into libsyntax_extVadim Petrochenkov-425/+0
2019-07-27Move proc macro server into libsyntaxVadim Petrochenkov-77/+968
2019-07-27Break dependencies between `syntax_ext` and some other cratesVadim Petrochenkov-167/+10
Move `source_uitil` macros into `syntax_ext` Cleanup dependencies of `rustc_driver`