summary refs log tree commit diff
path: root/src/libsyntax/visit.rs
AgeCommit message (Collapse)AuthorLines
2020-01-19Add `constness` field to `ast::ItemKind::Impl`Dylan MacKenzie-0/+1
2020-01-17Use named fields for `ast::ItemKind::Impl`Dylan MacKenzie-4/+12
2020-01-10Introduce `#![feature(half_open_range_patterns)]`.Mazdak Farrokhzad-2/+2
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-23Add span information to `ExprKind::Assign`varkor-3/+3
2019-12-22Format the worldMark Rousskov-116/+133
2019-12-12`AssocImplKind::{Method -> Fn}`.Mazdak Farrokhzad-2/+2
2019-12-12Unify assoc item visitors more.Mazdak Farrokhzad-2/+11
2019-12-12Unify associated item visitor.Mazdak Farrokhzad-43/+15
2019-12-12parse: refactor fun ret ty & param tyMazdak Farrokhzad-1/+1
2019-12-12Unify `{Trait,Impl}ItemKind::TyAlias` structures.Mazdak Farrokhzad-2/+3
2019-12-12`TraitItemKind::Type` -> `TraitItemKind::TyAlias`.Mazdak Farrokhzad-1/+1
2019-12-12Use `Option` in `ImplItemKind::Method`.Mazdak Farrokhzad-4/+8
2019-12-12Use `Option` in `ImplItemKind::Const`.Mazdak Farrokhzad-1/+1
2019-12-02syntax: Use `ast::MacArgs` for attributesVadim Petrochenkov-1/+9
2019-11-24Add raw address of expressions to the AST and HIRMatthew Jasper-1/+1
2019-11-22Rollup merge of #66183 - Centril:empty-vis-trait-decl, r=petrochenkovMazdak Farrokhzad-0/+2
*Syntactically* permit visibilities on trait items & enum variants Fixes #65041 Suppose we have `$vis trait_item` or `$vis enum_variant` and `$vis` is a `:vis` macro fragment. Before this PR, this would fail to parse. This is now instead allowed as per language team consensus in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286. (See added tests for elaboration.) Moreover, we now also permit visibility modifiers on trait items & enum variants *syntactically* but reject them with semantic checks (in `ast_validation`): ```rust #[cfg(FALSE)] trait Foo { pub fn bar(); } // OK #[cfg(FALSE)] enum E { pub U } // OK ```
2019-11-14TAIT: remove `OpaqueTy` in AST.Mazdak Farrokhzad-7/+0
2019-11-11syntactically allow visibility on trait item & enum variantMazdak Farrokhzad-0/+2
2019-11-08ast::ItemKind::Fn: use ast::FnSigMazdak Farrokhzad-5/+4
2019-11-08ast::MethodSig -> ast::FnSigMazdak Farrokhzad-1/+1
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-1/+4
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a big performance win (over 10% in some cases) because `DocComment` lets doc comments (which are common) be represented very cheaply. `Attribute` gets some new helper methods to ease the transition: - `has_name()`: check if the attribute name matches a single `Symbol`; for `DocComment` variants it succeeds if the symbol is `sym::doc`. - `is_doc_comment()`: check if it has a `DocComment` kind. - `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant; panic otherwise. Fixes #60935.
2019-11-06Remove unnecessary `Deref` impl for `Attribute`.Nicholas Nethercote-1/+1
This kind of thing just makes the code harder to read.
2019-09-26Rename `ForeignItem.node` to `ForeignItem.kind`varkor-1/+1
2019-09-26Rename `Item.node` to `Item.kind`varkor-1/+1
2019-09-26Rename `Stmt.node` to `Stmt.kind`varkor-1/+1
2019-09-26Rename `Ty.node` to `Ty.kind`varkor-1/+1
2019-09-26Rename `TraitItem.node` to `TraitItem.kind`varkor-1/+1
2019-09-26Rename `ImplItem.node` to `ImplItem.kind`varkor-1/+1
2019-09-26Rename `Pat.node` to `Pat.kind`varkor-1/+1
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-1/+1
For both `ast::Expr` and `hir::Expr`.
2019-09-15or-patterns: remove hack from lowering.Mazdak Farrokhzad-2/+0
2019-09-07Apply suggestions from code reviewAlexander Regueiro-1/+1
2019-09-07Aggregation of cosmetic changes made during work on REPL PRs: libsyntaxAlexander Regueiro-10/+13
2019-09-05or-patterns: address review comments.Mazdak Farrokhzad-1/+1
2019-09-05or-patterns: syntax: adjust `visit` and `mut_visit`.Mazdak Farrokhzad-9/+8
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-7/+7
2019-08-24Modifies how Arg, Arm, Field, FieldPattern and Variant are visitedCaio-25/+29
Part of the necessary work to accomplish #63468.
2019-08-17initial implementation of or-pattern parsingDan Robertson-1/+1
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`. This is a partial implementation of RFC 2535.
2019-08-17Initial implementation of or patternsvarkor-4/+3
2019-08-15Remove `Spanned` from `{ast,hir}::FieldPat`Vadim Petrochenkov-3/+3
2019-08-15Remove `Spanned` from `ast::Mac`Vadim Petrochenkov-1/+1
2019-08-14Merge Variant and Variant_Caio-4/+4
2019-08-04Rename `ItemImplKind::Type` to `ItemImplKind::TyAlias`varkor-1/+1
2019-08-04Rename `ItemKind::Ty` to `ItemKind::TyAlias`varkor-1/+1
2019-08-02Replace "existential" by "opaque"varkor-2/+2
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-1/+1
2019-07-28Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasperMazdak Farrokhzad-5/+10
Lint attributes on function arguments Fixes #61238. cc #60406
2019-07-28Adjust 'ast::PatKind::{TupleStruct,Tuple,Slice}'.Mazdak Farrokhzad-8/+6