about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-06-10syntax: Use `MultiItemModifier` for built-in derivesVadim Petrochenkov-25/+22
2019-06-10syntax: Remove `SyntaxExtension::MultiDecorator` and `MultiItemDecorator`Vadim Petrochenkov-43/+1
2019-06-10syntax: Remove `SyntaxExtension::IdentTT` and `IdentMacroExpander`Vadim Petrochenkov-60/+0
2019-06-10Don't suggest using \r in raw stringsIgor Matuszewski-1/+7
2019-06-10Stabilize underscore_const_names.Mazdak Farrokhzad-11/+3
2019-06-10Special-case literals in `parse_bottom_expr`.Nicholas Nethercote-10/+22
This makes parsing faster, particularly for code with large constants, for two reasons: - it skips all the keyword comparisons for literals; - it replaces the unnecessary `parse_literal_maybe_minus` call with `parse_lit`, avoiding an unnecessary allocation via `mk_expr`.
2019-06-09Auto merge of #61229 - Centril:stabilize-repr_align_enum, r=nagisabors-14/+3
Stabilize #![feature(repr_align_enum)] in Rust 1.37.0 On an `enum` item, you may now write: ```rust #[repr(align(X))] enum Foo { // ... } ``` This has equivalent effects to first defining: ```rust #[repr(align(X))] struct AlignX<T>(T); ``` and then using `AlignX<Foo>` in `Foo`'s stead. r? @nagisa
2019-06-09Use char byte calculation using existing iteratorIgor Matuszewski-11/+13
2019-06-09Actually translate CRLF in raw byte strings and unify unescape implIgor Matuszewski-25/+69
2019-06-09Add a doc comment for scan_raw_stringIgor Matuszewski-0/+2
2019-06-09Allow attributes in formal function parametersCaio-39/+109
2019-06-09pacify tidy.Mazdak Farrokhzad-1/+1
2019-06-09Some more cleanup in libsyntax::ext::tt::quotedMazdak Farrokhzad-11/+8
2019-06-09Cleanups in parse_sep_and_kleene_op.Mazdak Farrokhzad-12/+4
2019-06-09Support ? Kleene operator in 2015.Mazdak Farrokhzad-167/+4
2019-06-09Translate CRLF -> LF in raw (byte) stringsIgor Matuszewski-34/+18
2019-06-09Rollup merge of #61669 - petrochenkov:tokderef2, r=oli-obkMazdak Farrokhzad-228/+160
syntax: Remove `Deref` impl from `Token` Follow up to https://github.com/rust-lang/rust/pull/61541 r? @oli-obk
2019-06-09Rollup merge of #61660 - petrochenkov:nocusta, r=CentrilMazdak Farrokhzad-6/+14
Minimize use of `#![feature(custom_attribute)]` Some preparations before resurrecting https://github.com/rust-lang/rust/pull/57921.
2019-06-09Rollup merge of #61646 - L117:master, r=CentrilMazdak Farrokhzad-15/+15
Remove useless allocations in macro_rules follow logic. Closes #61543
2019-06-08Prohibit bare CRs in raw byte stringsIgor Matuszewski-70/+53
2019-06-08Validate and transcribe raw strings via unescape moduleIgor Matuszewski-46/+59
2019-06-08Introduce `#[rustc_dummy]` attribute and use it in testsVadim Petrochenkov-6/+9
Unlike other built-in attributes, this attribute accepts any input
2019-06-08Turn `#[allocator]` into a built-in attribute and rename it to ↵Vadim Petrochenkov-0/+5
`#[rustc_allocator]`
2019-06-08syntax: Move some `Token` methods aroundVadim Petrochenkov-48/+40
2019-06-08syntax: Remove `Deref` impl from `Token`Vadim Petrochenkov-66/+45
2019-06-08syntax: Move most of the `TokenKind` methods to `Token`Vadim Petrochenkov-99/+65
2019-06-08fix libsyntax testCedric-4/+4
2019-06-08Remove redundant, commented out codeIgor Matuszewski-6/+0
It was commented out as part of https://github.com/rust-lang/rust/commit/8a8e497ae786ffc032c1e68fc23da0edcf6fa5e3. Done probably by accident, since the code in question was moved to a match arm, along with newly introduced logic to detect bare CRs in raw strings.
2019-06-08Separate a `scan_raw_string` (similar `raw_byte` variant)Igor Matuszewski-77/+82
2019-06-08Clean up minor bitsIgor Matuszewski-2/+2
2019-06-08syntax: Keep full `Token`s for `macro_rules` separatorsVadim Petrochenkov-35/+30
2019-06-08cast vec to slicesCedric-5/+5
2019-06-08use default binding mode in match clausesCedric-10/+10
2019-06-08fix bad style for structsCedric-13/+19
2019-06-08improve styleCedric-13/+10
2019-06-08use pattern matching for slices destructuringCedric-46/+32
2019-06-08Rollup merge of #61616 - petrochenkov:parsderef, r=oli-obkMazdak Farrokhzad-262/+252
parser: Remove `Deref` impl from `Parser` Follow up to https://github.com/rust-lang/rust/pull/61541 You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess. Not sure. Probably still better than people using both and being confused about the definition point of `span`. r? @oli-obk @estebank
2019-06-08Remove useless allocations in macro_rules follow logic.L117-15/+15
2019-06-07syntax: Treat error literals in more principled wayVadim Petrochenkov-12/+14
2019-06-07parser: Remove `look_ahead_span`Vadim Petrochenkov-18/+5
2019-06-07parser: Remove `Deref` impl from `Parser`Vadim Petrochenkov-10/+0
2019-06-07parser: `self.span` -> `self.token.span`Vadim Petrochenkov-238/+251
2019-06-07Auto merge of #61209 - matthewjasper:const-tuple-constructors, r=oli-obkbors-0/+4
Make tuple constructors real const fns Mir construction special cases `Ctor(...)` to be lowered as `Ctor { 0: ... }`, which means this doesn't come up much in practice, but it seems inconsistent not to allow this. r? @oli-obk
2019-06-06Make constructors actually be const functionsMatthew Jasper-0/+4
2019-06-06Address review commentsVadim Petrochenkov-16/+19
2019-06-06Some code cleanup and tidy/test fixesVadim Petrochenkov-75/+89
2019-06-06syntax: Use `Token` in visitors and fix a mut visitor testVadim Petrochenkov-11/+19
2019-06-06syntax: Switch function parameter order in `TokenTree::token`Vadim Petrochenkov-52/+53
2019-06-06syntax: Use `Token` in some more placesVadim Petrochenkov-6/+6
2019-06-06syntax: Remove duplicate span from `token::Ident`Vadim Petrochenkov-153/+147