about summary refs log tree commit diff
path: root/src/libsyntax_expand
AgeCommit message (Collapse)AuthorLines
2019-12-30Rename directories for some crates from `syntax_x` to `rustc_x`Vadim Petrochenkov-10284/+0
`syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` `syntax_ext` -> `rustc_builtin_macros`
2019-12-30Rollup merge of #64273 - petrochenkov:stabattrmod, r=CentrilYuki Okushi-7/+4
Stabilize attribute macros on inline modules While still gating non-inline modules in proc macro input. Split from https://github.com/rust-lang/rust/pull/63931 cc https://github.com/rust-lang/rust/issues/54727
2019-12-29Auto merge of #67112 - Centril:expr-polish, r=estebankbors-4/+2
Refactor expression parsing thoroughly Based on https://github.com/rust-lang/rust/pull/66994 together with which this has refactored basically the entirety of `expr.rs`. r? @estebank
2019-12-28doc comments: Less attribute mimickingVadim Petrochenkov-11/+5
2019-12-28Stabilize attribute macros on inline modulesVadim Petrochenkov-7/+4
2019-12-24x.py fmt after previous deignoreMark Rousskov-117/+116
2019-12-23extract parse_not_exprMazdak Farrokhzad-4/+2
2019-12-22Format the worldMark Rousskov-1606/+1472
2019-12-21Rollup merge of #67355 - Centril:merge-mut, r=oli-obkMazdak Farrokhzad-3/+3
Merge `ast::Mutability` and `mir::Mutability` r? @oli-obk
2019-12-20introduce 'type AttrVec'Mazdak Farrokhzad-13/+10
2019-12-20extract suggest_slice_patMazdak Farrokhzad-21/+25
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-3/+3
2. mir::Mutability -> ast::Mutability.
2019-12-20Rollup merge of #67131 - Centril:item-merge, r=petrochenkovMazdak Farrokhzad-32/+33
Merge `TraitItem` & `ImplItem into `AssocItem` In this PR we: - Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286. - This is done by using the cover grammar of both forms. - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`): - `default`ness on `trait` items, - `impl` items without a body / definition (`const`, `type`, and `fn`), - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`. - The syntactic restrictions are replaced by semantic ones in `ast_validation`. - Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`: - `fn`s in all contexts now syntactically allow `...`, - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`), - and `...` can be the sole parameter (`fn foo(...) {}`. r? @petrochenkov
2019-12-18Propagate cfg bootstrapMark Rousskov-1/+0
2019-12-13Address review commentsOliver Scherer-1/+1
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-1/+5
functions with a `const` modifier
2019-12-12Remove `ast::{Impl,Trait}{Item,ItemKind}`.Mazdak Farrokhzad-18/+18
2019-12-12Unify associated item mut visitors.Mazdak Farrokhzad-14/+14
2019-12-12Alias `TraitItem` & `ImplItem`.Mazdak Farrokhzad-0/+1
Allow defaultness on trait items syntactically.
2019-12-12Remove the `DelimSpan` from `NamedMatch::MatchedSeq`.Nicholas Nethercote-20/+11
Because it's unused. This then allows the removal of `MatcherPos::sp_open`. It's a tiny perf win, reducing instruction counts by 0.1% - 0.2% on a few benchmarks.
2019-12-07Make `ForeignItem` an alias of `Item`.Mazdak Farrokhzad-0/+1
2019-12-06parse_meta: ditch parse_in_attrMazdak Farrokhzad-5/+5
2019-12-06derive: avoid parse_in_attrMazdak Farrokhzad-25/+62
2019-12-03Remove dead cfg methodMark Rousskov-1/+0
2019-12-03Move early lint declarations to librustc_sessionMark Rousskov-2/+2
2019-12-02syntax: Use `ast::MacArgs` for macro definitionsVadim Petrochenkov-6/+6
2019-12-02syntax: Use `ast::MacArgs` for attributesVadim Petrochenkov-23/+9
2019-12-02syntax: Remove redundant span from `ast::Mac`Vadim Petrochenkov-4/+3
Also remove a couple of redundant `visit_mac` asserts
2019-12-02syntax: Introduce a struct `MacArgs` for macro argumentsVadim Petrochenkov-11/+2
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-13/+15
2019-11-30move is_builtin_attr to syntax::attrMazdak Farrokhzad-2/+2
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-3/+5
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-1/+1
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-26Fix spelling typosBrian Wignall-1/+1
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-1/+2
Various tweaks to diagnostic output
2019-11-25Tweak duplicate matcher binding errorEsteban Küber-1/+2
2019-11-25Auto merge of #66669 - petrochenkov:tup2attr, r=matthewjasperbors-4/+23
Fix some issues with attributes on unnamed fields Fixes https://github.com/rust-lang/rust/issues/66487 Fixes https://github.com/rust-lang/rust/issues/66555
2019-11-25Auto merge of #66671 - matthewjasper:ast-address-of, r=Centrilbors-1/+1
Ast address-of This is the parts of #64588 that don't affect MIR. If an address-of expression makes it to MIR lowering we error and lower to the best currently expressible approximation to limit further errors. r? @Centril
2019-11-24Add raw address of expressions to the AST and HIRMatthew Jasper-1/+1
2019-11-24rustc_plugin: Remove support for syntactic pluginsVadim Petrochenkov-2/+0
2019-11-24expand: Fully preserve visibilities on unnamed fields with attributesVadim Petrochenkov-4/+23
2019-11-22Rollup merge of #66183 - Centril:empty-vis-trait-decl, r=petrochenkovMazdak Farrokhzad-4/+7
*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-20Delete ProcessCfgModMark Rousskov-8/+3
The previous commit removes the use of this, and now we cleanup.
2019-11-19Move syntax_expand::config to rustc_parse::configMark Rousskov-367/+2
2019-11-16expand: Stop marking derive helper attributes as knownVadim Petrochenkov-34/+5
Pass them through name resolution instead
2019-11-11syntactically allow visibility on trait item & enum variantMazdak Farrokhzad-4/+7
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-34/+34
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10move config.rs to libsyntax_expandMazdak Farrokhzad-2/+2445
2019-11-09move attr meta grammar to parse::validate_atr + ast_validationMazdak Farrokhzad-1/+3
2019-11-08Rollup merge of #65785 - Centril:compat-to-error-2, r=oli-obkMazdak Farrokhzad-1/+1
Transition future compat lints to {ERROR, DENY} - Take 2 Follow up to https://github.com/rust-lang/rust/pull/63247 implementing https://github.com/rust-lang/rust/pull/63247#issuecomment-536295992. - `legacy_ctor_visibility` (ERROR) -- closes #39207 - `legacy_directory_ownership` (ERROR) -- closes #37872 - `safe_extern_static` (ERROR) -- closes #36247 - `parenthesized_params_in_types_and_modules` (ERROR) -- closes #42238 - `duplicate_macro_exports` (ERROR) - `nested_impl_trait` (ERROR) -- closes #59014 - `ill_formed_attribute_input` (DENY) -- transitions #57571 - `patterns_in_fns_without_body` (DENY) -- transitions #35203 r? @varkor cc @petrochenkov