about summary refs log tree commit diff
path: root/src/libsyntax_expand/base.rs
AgeCommit message (Collapse)AuthorLines
2019-12-30Rename directories for some crates from `syntax_x` to `rustc_x`Vadim Petrochenkov-1181/+0
`syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` `syntax_ext` -> `rustc_builtin_macros`
2019-12-22Format the worldMark Rousskov-144/+152
2019-12-20introduce 'type AttrVec'Mazdak Farrokhzad-2/+1
2019-12-20Rollup merge of #67131 - Centril:item-merge, r=petrochenkovMazdak Farrokhzad-12/+12
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-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-12/+12
2019-12-03Remove dead cfg methodMark Rousskov-1/+0
2019-11-24rustc_plugin: Remove support for syntactic pluginsVadim Petrochenkov-2/+0
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-4/+4
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
2019-11-06Rollup merge of #65973 - eddyb:caller-location-panic, r=petrochenkovMazdak Farrokhzad-12/+1
caller_location: point to macro invocation sites, like file!/line!, and use in core::panic!. The main change here is to `core::panic!`, trying to fix this remaining regression: https://github.com/rust-lang/rust/pull/65927#issuecomment-547625147 However, in order for `caller_location` to be usable from macros the same way `file!()`/`line!()` are, it needs to have the same behavior (of extracting the macro invocation site `Span` and using that). Arguably we would've had to do this at some point anyway, if we want to use `#[track_caller]` to replace the `file!()`/`line!()` uses from macros, but I'm not sure the RFC mentions this at all. r? @petrochenkov cc @anp @nnethercote
2019-11-05Review feedback: Remove more stuff! Simplify simplify simplify!Felix S. Klock II-3/+2
2019-11-03Migrate resolver over to internal lint bufferMark Rousskov-2/+2
2019-10-30caller_location: point to macro invocation sites, like file!/line!.Eduard-Mihai Burtescu-12/+1
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-13/+3
This is done by moving some data definitions to syntax::expand.
2019-10-19Avoid ICE when include! is used by stdin crateNika Layzell-4/+11
This should also eliminate the ICE when using `include_bytes!`, `include_str!` and `#[doc(include = "...")]`. Fixes #63900
2019-10-19expand: Simplify expansion of derivesVadim Petrochenkov-2/+1
And make it more uniform with other macros. By merging placeholders for future derives' outputs into the derive container's output fragment early.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-0/+1189