about summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-3527/+0
2020-02-01pretty: remove ParseSess dependencyMazdak Farrokhzad-17/+11
2020-01-23unused-parens: implement for block return valuesTyler Lanphear-5/+1
2020-01-22Rollup merge of #68441 - Centril:pprust-as_deref, r=Mark-SimulacrumTyler Mandry-2/+2
pprust: use as_deref Some drive-by cleanup.
2020-01-22pprust: use as_derefMazdak Farrokhzad-2/+2
2020-01-19Add `constness` field to `ast::ItemKind::Impl`Dylan MacKenzie-0/+9
2020-01-17Use named fields for `ast::ItemKind::Impl`Dylan MacKenzie-8/+8
2020-01-10Introduce `#![feature(half_open_range_patterns)]`.Mazdak Farrokhzad-3/+7
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-7/+6
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-17/+17
2019-12-23Add span information to `ExprKind::Assign`varkor-1/+1
2019-12-22Format the worldMark Rousskov-444/+400
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-7/+7
2. mir::Mutability -> ast::Mutability.
2019-12-12`AssocImplKind::{Method -> Fn}`.Mazdak Farrokhzad-1/+1
2019-12-12Unify associated item pretty printing.Mazdak Farrokhzad-75/+21
2019-12-12parse: refactor fun ret ty & param tyMazdak Farrokhzad-56/+19
2019-12-12Unify `{Trait,Impl}ItemKind::TyAlias` structures.Mazdak Farrokhzad-12/+10
2019-12-12`TraitItemKind::Type` -> `TraitItemKind::TyAlias`.Mazdak Farrokhzad-1/+1
2019-12-12Use `Option` in `ImplItemKind::Method`.Mazdak Farrokhzad-15/+11
2019-12-12Use `Option` in `ImplItemKind::Const`.Mazdak Farrokhzad-1/+1
2019-12-12Alias `TraitItem` & `ImplItem`.Mazdak Farrokhzad-0/+1
Allow defaultness on trait items syntactically.
2019-12-07Print the visibility in `print_variant`.Mazdak Farrokhzad-0/+1
2019-12-06Rename to `then_some` and `then`varkor-1/+1
2019-12-06Use `to_option` in various placesvarkor-1/+1
2019-12-02syntax: Use `ast::MacArgs` for macro definitionsVadim Petrochenkov-2/+2
2019-12-02syntax: Use `ast::MacArgs` for attributesVadim Petrochenkov-10/+15
2019-12-02syntax: Remove redundant span from `ast::Mac`Vadim Petrochenkov-2/+2
Also remove a couple of redundant `visit_mac` asserts
2019-12-02syntax: Introduce a struct `MacArgs` for macro argumentsVadim Petrochenkov-14/+10
2019-11-24Add raw address of expressions to the AST and HIRMatthew Jasper-17/+20
2019-11-22Rollup merge of #66183 - Centril:empty-vis-trait-decl, r=petrochenkovMazdak Farrokhzad-0/+1
*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-16ast: Keep string literals in ABIs preciselyVadim Petrochenkov-6/+4
2019-11-16ast: Keep `extern` qualifiers in functions more preciselyVadim Petrochenkov-7/+15
2019-11-14TAIT: remove `OpaqueTy` in AST.Mazdak Farrokhzad-20/+0
2019-11-11syntactically allow visibility on trait item & enum variantMazdak Farrokhzad-0/+1
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-7/+7
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10move config.rs to libsyntax_expandMazdak Farrokhzad-2/+5
2019-11-08ast::ItemKind::Fn: use ast::FnSigMazdak Farrokhzad-3/+3
2019-11-08ast::MethodSig -> ast::FnSigMazdak Farrokhzad-1/+1
2019-11-07move syntax::parse::lexer::comments -> syntax::util::commentsMazdak Farrokhzad-1/+1
2019-11-07move parse::classify -> util::classifyMazdak Farrokhzad-2/+2
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
2019-11-07parser: don't hardcode ABIs into grammarMazdak Farrokhzad-11/+9
2019-11-06Make doc comments cheaper with `AttrKind`.Nicholas Nethercote-9/+12
`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-02Convert `x.as_str().to_string()` to `x.to_string()` where possible.Nicholas Nethercote-3/+3
2019-10-15syntax::parse::sess -> syntax::sessMazdak Farrokhzad-1/+2
2019-10-14pprust: `p1@p2` -> `p1 @ p2`Mazdak Farrokhzad-1/+2
2019-09-30syntax: Support modern attribute syntax in the `meta` matcherVadim Petrochenkov-18/+22
2019-09-29Rollup merge of #63492 - eddyb:cvarargs, r=nagisa,matthewjasperMazdak Farrokhzad-1/+0
Remove redundancy from the implementation of C variadics. This cleanup was first described in https://github.com/rust-lang/rust/issues/44930#issuecomment-497163539: * AST doesn't track `c_variadic: bool` anymore, relying solely on a trailing `CVarArgs` type in fn signatures * HIR doesn't have a `CVarArgs` anymore, relying solely on `c_variadic: bool` * same for `ty::FnSig` (see tests for diagnostics improvements from that) * `{hir,mir}::Body` have one extra argument than the signature when `c_variadic == true` * `rustc_typeck` and `rustc_mir::{build,borrowck}` need to give that argument the right type (which no longer uses a lifetime parameter, but a function-internal scope) * `rustc_target::abi::call` doesn't need special hacks anymore (since it never sees the `VaListImpl` now, it's all inside the body) r? @nagisa / @rkruppe cc @dlrobertson @oli-obk
2019-09-28syntax: don't keep a redundant c_variadic flag in the AST.Eduard-Mihai Burtescu-1/+0