summary refs log tree commit diff
path: root/compiler/rustc_ast/src
AgeCommit message (Collapse)AuthorLines
2020-09-23tidyErik Hofmayer-1/+4
2020-09-23/nightly/nightly-rustcErik Hofmayer-1/+1
2020-09-23Updated html_root_url for compiler cratesErik Hofmayer-1/+1
2020-09-22Add `#![feature(const_fn_transmute)]` to `rustc_ast`Dylan MacKenzie-0/+1
2020-09-20Rollup merge of #76890 - matthiaskrgr:matches_simpl, r=lcnrRalf Jung-3/+3
use matches!() macro for simple if let conditions
2020-09-18use matches!() macro for simple if let conditionsMatthias Krüger-3/+3
2020-09-17Remove redundant #![feature(...)] 's from compiler/est31-4/+0
2020-09-14Auto merge of #76541 - matthiaskrgr:unstable_sort, r=davidtwcobors-1/+2
use sort_unstable to sort primitive types It's not important to retain original order if we have &[1, 1, 2, 3] for example. clippy::stable_sort_primitive
2020-09-10Fully integrate token collection for additional AST structsAaron Hill-1/+1
This commit contains miscellaneous changes that don't fit into any of the other commits in this PR
2020-09-10Attach tokens to `ast::Stmt`Aaron Hill-2/+6
We currently only attach tokens when parsing a `:stmt` matcher for a `macro_rules!` macro. Proc-macro attributes on statements are still unstable, and need additional work.
2020-09-10Attach `TokenStream` to `ast::Visibility`Aaron Hill-7/+14
A `Visibility` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Attach `TokenStream` to `ast::Path`Aaron Hill-4/+5
2020-09-10Attach tokens to `NtMeta` (`ast::AttrItem`)Aaron Hill-3/+4
An `AttrItem` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Attach `TokenStream` to `ast::Ty`Aaron Hill-4/+6
A `Ty` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Attach `TokenStream` to `ast::Block`Aaron Hill-1/+2
A `Block` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Syntactically permit unsafety on modsDavid Tolnay-5/+12
2020-09-10Auto merge of #76291 - matklad:spacing, r=petrochenkovbors-30/+27
Rename IsJoint -> Spacing Builds on #76286 and might conflict with #76285 r? `@petrochenkov`
2020-09-10Revert "Rollup merge of #76285 - matklad:censor-spacing, r=petrochenkov"Tyler Mandry-2/+2
This reverts commit 85cee57fd791d670d92dc61e0ad71594128dd45a, reversing changes made to b4d387302416c90a3f70211770292d8d8ab5e07d.
2020-09-10use sort_unstable to sort primitive typesMatthias Krüger-1/+2
It's not important to retain original order if we have &[1, 1, 2, 3] for example. clippy::stable_sort_primitive
2020-09-07Rollup merge of #76274 - scottmcm:fix-76271, r=petrochenkovDylan DPC-0/+1
Allow try blocks as the argument to return expressions Fixes #76271 I don't think this needs to be edition-aware (phew) since `return try` in 2015 is also the start of an expression, just with a struct literal instead of a block (`return try { x: 4, y: 5 }`).
2020-09-06Auto merge of #76331 - Aaron1011:fix/group-compat-hack-test, r=petrochenkovbors-3/+13
Account for version number in NtIdent hack Issue #74616 tracks a backwards-compatibility hack for certain macros. This has is implemented by hard-coding the filenames and macro names of certain code that we want to continue to compile. However, the initial implementation of the hack was based on the directory structure when building the crate from its repository (e.g. `js-sys/src/lib.rs`). When the crate is build as a dependency, it will include a version number from the clone from the cargo registry (e.g. `js-sys-0.3.17/src/lib.rs`), which would fail the check. This commit modifies the backwards-compatibility hack to check that desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the proper part of the path. See https://github.com/rust-lang/rust/issues/76070#issuecomment-687215646 for more details.
2020-09-04Account for version number in NtIdent hackAaron Hill-3/+13
Issue #74616 tracks a backwards-compatibility hack for certain macros. This has is implemented by hard-coding the filenames and macro names of certain code that we want to continue to compile. However, the initial implementation of the hack was based on the directory structure when building the crate from its repository (e.g. `js-sys/src/lib.rs`). When the crate is build as a dependency, it will include a version number from the clone from the cargo registry (e.g. `js-sys-0.3.17/src/lib.rs`), which would fail the check. This commit modifies the backwards-compatibility hack to check that desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the proper part of the path. See https://github.com/rust-lang/rust/issues/76070#issuecomment-687215646 for more details.
2020-09-03Optimize Cursor::look_aheadAleksey Kladov-2/+2
Cloning a tt is cheap, but not free (there's Arc inside).
2020-09-03Rename IsJoint -> SpacingAleksey Kladov-30/+27
To match better naming from proc-macro
2020-09-02Allow try blocks as the argument to return expressionsScott McMurray-0/+1
Fixes 76271
2020-09-02Auto merge of #76170 - matklad:notrivia, r=petrochenkovbors-15/+3
Remove trivia tokens r? @ghost
2020-09-01Remove trivia tokensAleksey Kladov-15/+3
2020-08-30Factor out StmtKind::MacCall fields into `MacCallStmt` structAaron Hill-13/+19
In PR #76130, I add a fourth field, which makes using a tuple variant somewhat unwieldy.
2020-08-30mv compiler to compiler/mark-0/+8696