about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-07-04Switch master to 1.38Mark Rousskov-11/+0
2019-07-04make unwrap_or_abort non-generic againAleksey Kladov-1/+1
2019-07-04remove unused mk_sp_and_rawAleksey Kladov-10/+3
2019-07-04don't rely on spans when checking tokens for jointnessAleksey Kladov-47/+29
2019-07-04slightly comment lexer APIAleksey Kladov-11/+18
2019-07-04move constructors to topAleksey Kladov-51/+51
2019-07-04cleanup lexer constructorsAleksey Kladov-15/+7
2019-07-04remove peek_span_src_raw from StringReaderAleksey Kladov-68/+45
2019-07-04remove peek_token from StringReaderAleksey Kladov-18/+8
2019-07-04remove StringReader::peekAleksey Kladov-4/+0
The reader itself doesn't need ability to peek tokens, so it's better if clients implement this functionality. This hopefully becomes especially easy once we use iterator interface for lexer, but this is not too easy at the moment, because of buffered errors.
2019-07-04Rollup merge of #62297 - matklad:peek-delimited, r=petrochenkovMazdak Farrokhzad-67/+72
refactor check_for_substitution No behavior change, just flatter and simpler code. r? @petrochenkov
2019-07-04Rollup merge of #62258 - petrochenkov:idclean, r=CentrilMazdak Farrokhzad-170/+89
syntax: Unsupport `foo! bar { ... }` macros in the parser Their support in expansion was removed in https://github.com/rust-lang/rust/pull/61606. Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly). cc https://github.com/rust-lang-nursery/wg-grammar/issues/51
2019-07-04Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, ↵Mazdak Farrokhzad-6/+7
r=dtolnay,Centril Use mem::take instead of mem::replace with default
2019-07-04Rollup merge of #62039 - jeremystucki:needless_lifetimes, r=eddybMazdak Farrokhzad-5/+5
Remove needless lifetimes (rustc)
2019-07-03Add separate 'async_closure' feature gate.Mazdak Farrokhzad-39/+53
2019-07-03Auto merge of #62335 - Mark-Simulacrum:rollup-0pcaz5a, r=Mark-Simulacrumbors-2/+2
Rollup of 15 pull requests Successful merges: - #62021 (MSVC link output improve) - #62064 (nth_back for chunks_exact) - #62128 (Adjust warning of -C extra-filename with -o.) - #62161 (Add missing links for TryFrom docs) - #62183 (std: Move a process test out of libstd) - #62186 (Add missing type urls in Into trait) - #62196 (Add Vec::leak) - #62199 (import gdb for explicit access to gdb.current_objfile()) - #62229 (Enable intptrcast for explicit casts) - #62250 (Improve box clone doctests to ensure the documentation is valid) - #62255 (Switch tracking issue for `#![feature(slice_patterns)]`) - #62285 (Fix michaelwoerister's mailmap) - #62304 (HashMap is UnwindSafe) - #62319 (Fix mismatching Kleene operators) - #62327 (Fixed document bug, those replaced each other) Failed merges: r? @ghost
2019-07-03Rollup merge of #62255 - Centril:slice-patterns-change-issue, r=varkorMark Rousskov-2/+2
Switch tracking issue for `#![feature(slice_patterns)]` Switches the tracking issue for `#![feature(slice_patterns)]` to a fresh one in https://github.com/rust-lang/rust/issues/62254 due to new RFCs. Closes https://github.com/rust-lang/rust/issues/23121. r? @varkor
2019-07-03Auto merge of #61995 - eddyb:hir-sep-ptr, r=petrochenkovbors-2/+3
rustc: use a separate copy of P for HIR than for AST. Note: this currently includes/is based on top of #61987. Like #61968, but goes one step further and uses a separate `P<...>` for the HIR, with no `Clone`, or the ability to mutate after allocation. There is still `into_inner`/`into_iter`, but they're only exposed for `hir::lowering`, and they would take more work to untangle. r? @petrochenkov cc @rust-lang/compiler
2019-07-03Add missing lifetime specifierJeremy Stucki-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-5/+5
2019-07-02more nits + typosNiko Matsakis-1/+1
2019-07-02feature-gate member constraints outside of async-awaitNiko Matsakis-0/+3
Minimizes risk.
2019-07-02refactor check_for_substitutionAleksey Kladov-67/+72
No behavior change, just flatter and simpler code
2019-07-01Enable mem_take feature in relevant cratesChris Gregory-0/+1
2019-07-01Convert more usages overChris Gregory-6/+6
2019-07-01rustc: use a separate copy of P for HIR than for AST.Eduard-Mihai Burtescu-1/+1
2019-07-01syntax: use `box` instead of `Box::new` in `ptr::P`.Eduard-Mihai Burtescu-1/+2
2019-07-01Address review commentsVadim Petrochenkov-48/+45
2019-07-01syntax: Unsupport `foo! bar { ... }` macros in the parserVadim Petrochenkov-126/+48
Unreserve `macro_rules` as a macro name
2019-07-01Auto merge of #62253 - Centril:rollup-115uuuq, r=Centrilbors-8/+18
Rollup of 8 pull requests Successful merges: - #62062 (Use a more efficient iteration order for forward dataflow) - #62063 (Use a more efficient iteration order for backward dataflow) - #62224 (rustdoc: remove unused derives and variants) - #62228 (Extend the #[must_use] lint to boxed types) - #62235 (Extend the `#[must_use]` lint to arrays) - #62239 (Fix a typo) - #62241 (Always parse 'async unsafe fn' + properly ban in 2015) - #62248 (before_exec actually will only get deprecated with 1.37) Failed merges: r? @ghost
2019-07-01Auto merge of #61682 - Centril:stabilize-type_alias_enum_variants, ↵bors-3/+2
r=petrochenkov Stabilize `type_alias_enum_variants` in Rust 1.37.0 Stabilize `#![feature(type_alias_enum_variants)]` which allows type-relative resolution with highest priority to `enum` variants in both expression and pattern contexts. For example, you may now write: ```rust enum Option<T> { None, Some(T), } type OptAlias<T> = Option<T>; fn work_on_alias(x: Option<u8>) -> u8 { match x { OptAlias::Some(y) => y + 1, OptAlias::None => 0, } } ``` Closes https://github.com/rust-lang/rfcs/issues/2218 Closes https://github.com/rust-lang/rust/issues/52118 r? @petrochenkov
2019-06-30Switch tracking issue for 'slice_patterns'.Mazdak Farrokhzad-2/+2
2019-06-30Feature gate `rustc` attributes harderVadim Petrochenkov-0/+8
2019-06-30Make sure `#[rustc_doc_only_macro]` and other rustc attributes are registeredVadim Petrochenkov-16/+40
2019-06-29Always parse 'async unsafe fn' + properly ban in 2015.Mazdak Farrokhzad-8/+18
2019-06-29Inline rust_printerMark Rousskov-14/+9
2019-06-29Remove unused importMark Rousskov-2/+0
2019-06-29Remove io::Result from syntax::printMark Rousskov-1170/+1088
Since we're now writing directly to the vector, there's no need to thread results through the whole printing infrastructure
2019-06-29Replace pretty-printer Box<dyn Write> with &mut StringMark Rousskov-31/+22
2019-06-29Delete now-unused methodsMark Rousskov-53/+0
2019-06-29Privatize a bunch of methodsMark Rousskov-96/+96
2019-06-27Rollup merge of #62160 - ia0:question_mark_macro_sep, r=petrochenkovMazdak Farrokhzad-2/+0
Remove outdated question_mark_macro_sep lint
2019-06-27Rollup merge of #62154 - mark-i-m:old-fixme, r=CentrilMazdak Farrokhzad-1/+1
Remove old fixme fixed in https://github.com/rust-lang/rust/pull/60160 r? @Centril
2019-06-27Rollup merge of #62131 - Xanewok:clip-some-nits, r=petrochenkovMazdak Farrokhzad-25/+25
libsyntax: Fix some Clippy warnings When I was working on it before a lot of these popped up in the RLS so I figured I'll send a small patch fixing only the (hopefully) uncontroversial ones. Others that could be also fixed included also [`clippy::print_with_newline`](https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline) and [`clippy::cast_lossless`](https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless). Should I add them as well? since most of it touches libsyntax... r? @petrochenkov
2019-06-27Rollup merge of #62124 - matklad:without-with, r=petrochenkovMazdak Farrokhzad-139/+121
refactor lexer to use idiomatic borrowing
2019-06-26Remove outdated question_mark_macro_sep lintJulien Cretin-2/+0
2019-06-26remove old fixmeMark Mansi-1/+1
2019-06-26Fix clippy::print_with_newlineIgor Matuszewski-1/+1
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-24/+24
2019-06-25cleanup: rename name_from to symbol_fromAleksey Kladov-20/+19
Lexer uses Symbols for a lot of stuff, not only for identifiers, so the "name" terminology is just confusing.