summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2019-08-05Remove leftover AwaitOriginMark Rousskov-9/+0
This was missed in PR #62293.
2019-08-04Auto merge of #63213 - varkor:itemkind-tyalias, r=Centrilbors-3/+3
Rename `ItemKind::Ty` to `ItemKind::TyAlias` The current name is not entirely clear without context and `TyAlias` is consistent with `ItemKind::TraitAlias`.
2019-08-04Rename `ItemImplKind::Type` to `ItemImplKind::TyAlias`varkor-1/+1
2019-08-04Rename `ItemKind::Ty` to `ItemKind::TyAlias`varkor-2/+2
2019-08-04Auto merge of #62816 - estebank:type-ascription-macros, r=petrochenkovbors-0/+1
Point at type ascription before macro invocation on expansion parse error Fix https://github.com/rust-lang/rust/issues/47666. Follow up to https://github.com/rust-lang/rust/pull/62791. r? @petrochenkov
2019-08-03Rollup merge of #63146 - Mark-Simulacrum:clean-attr, r=petrochenkovMazdak Farrokhzad-3/+13
Cleanup syntax::attr Mostly removing needless arguments to constructors r? @petrochenkov
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-6/+8
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
2019-08-02Replace "existential" by "opaque"varkor-6/+8
2019-08-02libsyntax: Unconfigure tests during normal buildVadim Petrochenkov-12/+3
2019-07-31Decode AttrId via mk_attr_idMark Rousskov-3/+13
2019-07-30Point at type ascription before macro invocation on expansion parse errorEsteban Küber-0/+1
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-1/+1
2019-07-28Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasperMazdak Farrokhzad-0/+2
Lint attributes on function arguments Fixes #61238. cc #60406
2019-07-28Adjust and document 'Pat::to_ty' accordingly.Mazdak Farrokhzad-4/+11
2019-07-28Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.Mazdak Farrokhzad-19/+9
2019-07-28Introduce 'ast::Pat::is_rest(&self) -> bool'.Mazdak Farrokhzad-0/+8
2019-07-28Add 'ast::PatKind::Rest'.Mazdak Farrokhzad-0/+15
2019-07-27Lint attributes on function argumentsCaio-0/+2
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-5/+4
2019-07-19Adjust other names after the `Mark` renamingVadim Petrochenkov-3/+3
2019-07-19libsyntax: Remove `Mark` into `ExpnId`Vadim Petrochenkov-4/+4
2019-07-15pprust: Use `print_mac_common` for delimited token groupsVadim Petrochenkov-1/+11
2019-07-10Move lifetime_to_string to Display implMark Rousskov-1/+7
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-2/+2
2019-06-24Auto merge of #62075 - Centril:guardless-match-arms, r=petrochenkovbors-6/+1
Remove `ast::Guard` With the introduction of `ast::ExprKind::Let` in https://github.com/rust-lang/rust/pull/60861, the `ast::Guard` structure is now redundant in terms of representing [`if let` guards](https://github.com/rust-lang/rust/issues/51114) in AST since it can be represented by `ExprKind::Let` syntactically. Therefore, we remove `ast::Guard` here. However, we keep `hir::Guard` because the semantic representation is a different matter and this story is more unclear right now (might involve `goto 'arm` in HIR or something...). r? @petrochenkov
2019-06-23Remove redundant syntax::ast::Guard.Mazdak Farrokhzad-6/+1
2019-06-23let_chains: More accurately describe `ast::ExprKind::Let`.Mazdak Farrokhzad-1/+1
Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2019-06-23let_chains: scrutinee -> conditionMazdak Farrokhzad-1/+1
2019-06-23let_chains: Improve documentation for ast::ExprKind::Let(..).Mazdak Farrokhzad-1/+4
2019-06-23let_chains: Remove ast::ExprKind::{IfLet, WhileLet} and introduce ::Let.Mazdak Farrokhzad-15/+5
2019-06-18Remove the HirId/NodeId from where clausesMatthew Jasper-2/+0
Also give them a span in the HIR
2019-06-14Change `...` to `..=` where applicableAaron Kutch-1/+1
2019-06-09Allow attributes in formal function parametersCaio-1/+3
2019-06-07syntax: Treat error literals in more principled wayVadim Petrochenkov-3/+3
2019-06-05Implemented for function bounds, type bounds, and named existential types.Alexander Regueiro-7/+21
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-2/+2
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-49/+6
Here follows the main reverts applied in order to make this commit: Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj" This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e. Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis" This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing changes made to 12bf98155249783583a91863c5dccf9e346f1226. Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj" This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.
2019-05-27Add `to_symbol` methods.Nicholas Nethercote-1/+23
2019-05-24Remove `ObsoleteInPlace`varkor-3/+0
2019-05-23syntax: Turn `token::Lit` into a structVadim Petrochenkov-2/+0
2019-05-23Auto merge of #60174 - matthewjasper:add-match-arm-scopes, r=pnkfelixbors-0/+1
Add match arm scopes and other scope fixes * Add drop and lint scopes for match arms. * Lint attributes are now respected on match arms. * Make sure we emit a StorageDead if we diverge when initializing a temporary. * Adjust MIR pretty printing of scopes for locals. * Don't generate duplicate lint scopes for `let statements`. * Add some previously missing fake borrows for matches. closes #46525 cc @rust-lang/compiler
2019-05-22Simplify use of keyword symbolsVadim Petrochenkov-6/+6
2019-05-22Auto merge of #59445 - alexreg:ban-multi-trait-objects-via-aliases, r=oli-obkbors-2/+2
Ban multi-trait objects via trait aliases Obviously, multi-trait objects are not normally supported, so they should not be supported via trait aliases. This has been factored out from the previous PR https://github.com/rust-lang/rust/pull/55994 (see point 1). r? @Centril CC @nikomatsakis ------------------ ### RELNOTES: We now allow `dyn Send + fmt::Debug` with equivalent semantics to `dyn fmt::Debug + Send`. That is, the order of the mentioned traits does not matter wrt. principal/not-principal traits. This is a small change that might deserve a mention in the blog post because it is a language change but most likely not. See https://github.com/rust-lang/rust/blob/ce2ee305f9165c037ecddddb5792588a15ff6c37/src/test/ui/traits/wf-trait-object-reverse-order.rs. // @Centril
2019-05-21Give match arms an HirId and a SpanMatthew Jasper-0/+1
2019-05-21Auto merge of #60903 - nnethercote:mv-gensyms-from-Symbol-to-Ident, ↵bors-5/+1
r=petrochenkov Move gensym operations from `Symbol` to `Ident` Gensyms are always at the `Ident` level, and long-term we probably want to record gensym-ness in hygiene data. r? @petrochenkov
2019-05-20Ban multi-trait objects via trait aliases.Alexander Regueiro-2/+2
2019-05-20Move `is_gensymed` from `Symbol` to `Ident`.Nicholas Nethercote-5/+1
Note that the `is_gensymed` call on `primitive_types` is unnecessary because that table only contains the name of primitive types (e.g. `i32`) and never contains gensyms.
2019-05-19Improve type size assertionsVadim Petrochenkov-2/+2
Now they - Tell what the new size is, when it changes - Do not require passing an identifier
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-6/+0
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-11Address comments + Fix testsVadim Petrochenkov-2/+7