about summary refs log tree commit diff
path: root/src/libsyntax/ext/build.rs
AgeCommit message (Collapse)AuthorLines
2016-05-26Implement `..` in tuple (struct) patternsVadim Petrochenkov-2/+2
2016-05-09rustc: Implement custom panic runtimesAlex Crichton-1/+1
This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account).
2016-04-25Rollup merge of #33041 - petrochenkov:path, r=nrc,ManishearthManish Goregaokar-5/+3
Paths are mostly parsed without taking whitespaces into account, e.g. `std :: vec :: Vec :: new ()` parses successfully, however, there are some special cases involving keywords `super`, `self` and `Self`. For example, `self::` is considered a path start only if there are no spaces between `self` and `::`. These restrictions probably made sense when `self` and friends weren't keywords, but now they are unnecessary. The first two commits remove this special treatment of whitespaces by removing `token::IdentStyle` entirely and therefore fix https://github.com/rust-lang/rust/issues/14109. This change also affects naked `self` and `super` (which are not tightly followed by `::`, obviously) they can now be parsed as paths, however they are still not resolved correctly in imports (cc @jseyfried, see `compile-fail/use-keyword.rs`), so https://github.com/rust-lang/rust/issues/29036 is not completely fixed. The third commit also makes `super`, `self`, `Self` and `static` keywords nominally (before this they acted as keywords for all purposes) and removes most of remaining \"special idents\". The last commit (before tests) contains some small improvements - some qualified paths with type parameters are parsed correctly, `parse_path` is not used for parsing single identifiers, imports are sanity checked for absence of type parameters - such type parameters can be generated by syntax extensions or by macros when https://github.com/rust-lang/rust/issues/10415 is fixed (~~soon!~~already!). This patch changes some pretty basic things in `libsyntax`, like `token::Token` and the keyword list, so it's a plugin-[breaking-change]. r? @eddyb
2016-04-24syntax: Merge keywords and remaining special idents in one listVadim Petrochenkov-5/+3
Simplify the macro used for generation of keywords Make `Keyword::ident` private
2016-04-24syntax: Make static/super/self/Self keywords + special ident cleanupVadim Petrochenkov-3/+3
2016-04-24thread tighter span for closures aroundNiko Matsakis-8/+29
Track the span corresponding to the `|...|` part of the closure.
2016-04-06Move span into `StructField`Vadim Petrochenkov-2/+3
2016-04-06Get rid of ast::StructFieldKindVadim Petrochenkov-1/+2
2016-02-13Split ast::PatKind::Enum into tuple struct and path patternsVadim Petrochenkov-1/+5
2016-02-13Rename ast::Pat_ and its variantsVadim Petrochenkov-9/+9
2016-02-11Remove some unnecessary indirection from AST structuresVadim Petrochenkov-23/+23
2016-02-11[breaking-change] don't glob export ast::PathListItem_ variantsOliver 'ker' Schneider-1/+6
2016-02-11[breaking-change] don't glob export ast::StrStyle variantsOliver 'ker' Schneider-1/+1
2016-02-11[breaking-change] don't glob export ast::Visibility variantsOliver 'ker' Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::Mutablity variantsOliver 'ker' Schneider-5/+8
2016-02-11[breaking-change] don't glob export ast::MetaItem_Oliver 'ker' Schneider-3/+3
2016-02-11[breaking-change] don't glob export ast::Item_ variantsOliver 'ker' Schneider-10/+10
2016-02-11[breaking-change] don't pub export ast::Stmt_ variantsOliver Schneider-4/+4
2016-02-11[breaking-change] don't pub export ast::IntLitType variantsOliver Schneider-4/+4
2016-02-11[breaking-change] don't pub export ast::Lit_ variantsOliver Schneider-11/+12
2016-02-11[breaking-change] don't pub export ast::Ty_ variantsOliver Schneider-7/+7
2016-02-11[breaking-change] remove the sign from integer literals in the astOliver Schneider-2/+7
2016-02-11[breaking-change] don't glob export ast::{UintTy, IntTy} variantsOliver Schneider-4/+4
2016-02-11[breaking-change] don't glob export ast::Expr_ variantsOliver Schneider-26/+26
2016-02-11[breaking-change] don't glob export ast::Decl_ variantsOliver Schneider-3/+3
2016-02-11[breaking-change] don't glob export ast::CaptureClause variantsOliver Schneider-2/+2
2016-02-11[breaking-change] don't glob import/export syntax::abi enum variantsOliver Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::BlockCheckMode variantsOliver Schneider-4/+2
2016-02-11[breaking-change] don't glob import ast::FunctionRetTy variantsOliver Schneider-1/+1
2016-02-11[breaking-change] don't glob export ast::BinOp_Oliver Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::UnOp variantsOliver Schneider-1/+2
2015-12-22Stop re-exporting PathParameters's variants.Ms2ger-2/+2
2015-12-21Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichtonbors-3/+3
2015-12-20Stop re-exporting the ast::BindingMode variants.Ms2ger-3/+3
2015-12-18Deprecate name `OwnedSlice` and don't use itVadim Petrochenkov-13/+12
2015-12-14[breaking-change] move ast_util functions to methodsfaineance-5/+4
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-0/+3
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-10-31Remove PatWildMultiVadim Petrochenkov-1/+1
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-2/+2
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-5/+4
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-4/+7
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-5/+5
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-1/+0
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-2/+6
2015-10-13Unify structures and enum variants in ASTVadim Petrochenkov-3/+8
2015-10-09Some cleanup of no longer used AST thingsNick Cameron-1/+1
2015-10-01Stop re-exporting AttrStyle's variants and rename them.Ms2ger-1/+1
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-9/+0
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-17Remove Visibility field from enum variantsSimonas Kazlauskas-1/+0
Followup on #28440
2015-08-08rustc: rename multiple imports in a listSean McArthur-1/+1