about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2015-10-09if let and while letNick Cameron-140/+4
2015-10-09Move `for` loop desugaring to loweringNick Cameron-94/+6
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-5/+4
2015-10-06Add RFC 1238's `unsafe_destructor_blind_to_params` (UGEH) where needed.Felix S. Klock II-4/+4
I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to bootstrap; but of course that alone was not sufficient for `make check`. Later I added `unsafe_destructor_blind_to_params` to collections, in particular `LinkedList` and `RawTable` (the backing representation for `HashMap` and `HashSet`), to get the regression tests exercising cyclic structure from PR #27185 building. ---- Note that the feature is `dropck_parametricity` (which is not the same as the attribute's name). We will almost certainly vary our strategy here in the future, so it makes some sense to have a not-as-ugly name for the feature gate. (The attribute name was deliberately selected to be ugly looking.)
2015-10-06Non-parametric dropck; instead trust an unsafe attribute (RFC 1238).Felix S. Klock II-0/+9
Implement cannot-assume-parametricity (CAP) from RFC 1238, and add the UGEH attribute. ---- Note that we check for the attribute attached to the dtor method, not the Drop impl. (This is just to match the specification of RFC and the tests; I am not wedded to this approach.)
2015-10-06Add comment for the use of Ident in hash map in mtwtVadim Petrochenkov-0/+2
2015-10-03Implement original version of RFC#1245John Hodge-3/+8
2015-10-03libsyntax: Do not derive Hash for IdentVadim Petrochenkov-15/+29
2015-10-03Auto merge of #28672 - sanxiyn:const-eval-span, r=alexcrichtonbors-1/+5
Fix #28402.
2015-10-03Add a method to test span containmentSeo Sanghyeon-1/+5
2015-10-03Check attribute usageSeo Sanghyeon-1/+0
2015-10-02Auto merge of #28793 - Ms2ger:AttrStyle, r=alexcrichtonbors-25/+24
2015-10-01Stop re-exporting AttrStyle's variants and rename them.Ms2ger-25/+24
2015-10-01Convert DefId to use DefIndex, which is an index into a list ofNiko Matsakis-2/+2
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
2015-10-01Auto merge of #28577 - jethrogb:topic/ast-stmt-debug, r=pcwaltonbors-7/+10
This enables the Debug trait to work on syntax::ast::Stmt.
2015-09-29Restore `if let`s replaced with `for`sVadim Petrochenkov-3/+3
2015-09-29Fill in some missing parts in the default HIR visitorVadim Petrochenkov-11/+18
2015-09-28Fill in some missing parts in the default AST visitorVadim Petrochenkov-341/+267
+ Add helper macro for walking lists (including Options)
2015-09-26Auto merge of #28642 - petrochenkov:name3, r=nrcbors-222/+170
This PR removes random remaining `Ident`s outside of libsyntax and performs general cleanup In particular, interfaces of `Name` and `Ident` are tidied up, `Name`s and `Ident`s being small `Copy` aggregates are always passed to functions by value, and `Ident`s are never used as keys in maps, because `Ident` comparisons are tricky. Although this PR closes https://github.com/rust-lang/rust/issues/6993 there's still work related to it: - `Name` can be made `NonZero` to compress numerous `Option<Name>`s and `Option<Ident>`s but it requires const unsafe functions. - Implementation of `PartialEq` on `Ident` should be eliminated and replaced with explicit hygienic, non-hygienic or member-wise comparisons. - Finally, large parts of AST can potentially be converted to `Name`s in the same way as HIR to clearly separate identifiers used in hygienic and non-hygienic contexts. r? @nrc
2015-09-26Auto merge of #28612 - gandro:targetvendor, r=alexcrichtonbors-0/+7
This adds a new target property, `target_vendor`. It is to be be used as a matcher for conditional compilation. The vendor is part of the [autoconf target triple](http://llvm.org/docs/doxygen/html/classllvm_1_1Triple.html#details): `<arch><sub>-<vendor>-<os>-<env>`. `arch`, `target_os` and `target_env` are already supported by Rust. This change was suggested in PR #28593. It enables conditional compilation based on the vendor. This is needed for the rumprun target, which needs to match against both, target_os and target_vendor. The default value for `target_vendor` is "unknown", "apple" and "pc" are other common values. Matching against the `target_vendor` is introduced behind the feature gate `#![feature(cfg_target_vendor)]`. This is the first time I messed around with rustc internals. I just added the my code where I found the existing `target_*` variables, hopefully I haven't missed anything. Please review with care. :) r? @alexcrichton
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-222/+170
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-24Remove the deprecated box(PLACE) syntax.Eduard Burtescu-93/+44
2015-09-24rustc: Add target_vendor for target triplesSebastian Wicki-0/+7
This adds a new target property, `target_vendor` which can be used as a matcher for conditional compilation. The vendor is part of the autoconf target triple: <arch><sub>-<vendor>-<os>-<env> The default value for `target_vendor` is "unknown". Matching against the `target_vendor` with `#[cfg]` is currently feature gated as `cfg_target_vendor`.
2015-09-22Encode/decode Names as stringsVadim Petrochenkov-2/+13
2015-09-22Auto merge of #28364 - petrochenkov:usegate, r=alexcrichtonbors-19/+20
Closes https://github.com/rust-lang/rust/issues/28075 Closes https://github.com/rust-lang/rust/issues/28388 r? @eddyb cc @brson
2015-09-21Change syntax::ast_util::stmt_id to not panic on macrosJethro Beekman-7/+10
This enables the Debug trait to work on syntax::ast::Stmt
2015-09-21Use ast::AsmDialect's variants qualified, and drop the pointless prefix.Ms2ger-6/+6
2015-09-21Auto merge of #28552 - apasel422:issue-28527, r=Manishearthbors-139/+114
Closes #28527. r? @Manishearth
2015-09-20Auto merge of #28534 - marcusklaas:fix-mod-inner-span, r=alexcrichtonbors-1/+1
Fixes https://github.com/rust-lang/rust/issues/28520. r? @alexcrichton or @nrc?
2015-09-20Replace `ast::Mac_` enum with structAndrew Paseltiner-139/+114
Closes #28527.
2015-09-20Fix the overly long inner spans of inline modsMarcus Klaas-1/+1
2015-09-20Auto merge of #28529 - Manishearth:rollup, r=Manishearthbors-26/+38
- Successful merges: #28463, #28507, #28522, #28525, #28526 - Failed merges:
2015-09-20Rollup merge of #28526 - Manishearth:expand-clone, r=eddybManish Goregaokar-24/+25
This reduces some clones of `Vec`s. These are not deep copies since the token tree is made using `Rc`s, so this won't be a major improvement. r? @eddyb
2015-09-20Auto merge of #28503 - marcusklaas:pub-extern, r=alexcrichtonbors-7/+4
Fixes https://github.com/rust-lang/rust/issues/28472.
2015-09-20Move tts instead of cloning in expansionManish Goregaokar-24/+25
2015-09-19Feature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`Andrew Paseltiner-2/+13
Closes #28091.
2015-09-19Auto merge of #28345 - japaric:op-assign, r=nmatsakisbors-0/+6
Implements overload-able augmented/compound assignments, like `a += b` via the `AddAssign` trait, as specified in RFC [953] [953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md r? @nikomatsakis
2015-09-19Auto merge of #28486 - nrc:pub-extern-crate, r=alexcrichtonbors-5/+12
Temporary 'fix' for #26775 r? @brson
2015-09-18Overloaded augmented assignmentsJorge Aparicio-0/+6
2015-09-19Include visibility modifier in span of foreign itemMarcus Klaas-7/+4
2015-09-18Auto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichtonbors-14/+4
Followup on #28440 Do not merge before the referenced PR is merged. I will fix the PR once that is merged (or close if it is not)
2015-09-18Add feature gateVadim Petrochenkov-1/+20
2015-09-18Implement empty struct with braces (RFC 218)Vadim Petrochenkov-43/+28
2015-09-18Warn on `pub extern crate`.Nick Cameron-5/+12
Temporary 'fix' for #26775
2015-09-17Resolve prefix in imports with empty bracesVadim Petrochenkov-2/+1
2015-09-17Workaround for imports with empty bracesVadim Petrochenkov-2/+2
2015-09-17Correctly walk import lists in AST visitorsVadim Petrochenkov-19/+21
2015-09-17Remove Visibility field from enum variantsSimonas Kazlauskas-10/+3
Followup on #28440
2015-09-17libsyntax: forbid visibility modifiers for enum variantsAleksey Kladov-5/+2
fixes #28433
2015-09-17Fix the span for ! returnsNick Cameron-1/+1