about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2015-10-18Fix span for pattern literalsMarcus Klaas-2/+2
2015-10-17Auto merge of #29102 - petrochenkov:spanvis, r=alexcrichtonbors-5/+8
Closes https://github.com/rust-lang/rust/issues/28750 `Arm` and `Generics` don't have spans at all, so it's not a visitor's problem, `visit_struct_def` was fixed in https://github.com/rust-lang/rust/pull/28816
2015-10-16Auto merge of #29014 - petrochenkov:stability, r=brsonbors-125/+173
Stricter checking of stability attributes + enforcement of their invariants at compile time (+ removed dead file librustc_front/attr.rs) I intended to enforce use of `reason` for unstable items as well (it normally presents for new items), but it turned out too intrusive, many older unstable items don't have `reason`s. r? @aturon I'm studying how stability works and do some refactoring along the way, so it's probably not the last PR.
2015-10-16Provide span for visit_enum_defVadim Petrochenkov-5/+8
2015-10-15Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelixbors-105/+2
This is a [breaking change]. @brson could you do a Crater run with this PR please? Lets not land till Crater says its OK. This was discussed at https://internals.rust-lang.org/t/does-anyone-use-the-push-pop-unsafe-macros/2702
2015-10-14Auto merge of #28827 - thepowersgang:unsafe-const-fn-2, r=Aatchbors-3/+8
This is the original test implementation, which works according to the tests I wrote, but might need a review.
2015-10-13Comment on the purpose(s) of NodeId in VariantDataVadim Petrochenkov-0/+11
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-72/+57
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-59/+104
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-56/+56
2015-10-13Test and gate empty structures and variants betterVadim Petrochenkov-26/+21
2015-10-13Provide span for visit_struct_def + remove some dead codeVadim Petrochenkov-22/+8
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-29/+16
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-40/+46
2015-10-13Unify structures and enum variants in ASTVadim Petrochenkov-156/+70
2015-10-13Refactor attr::StabilityVadim Petrochenkov-125/+173
Stricter checking + enforcement of invariants at compile time
2015-10-12Remove the push_unsafe! and pop_unsafe! macros.Nick Cameron-105/+2
This is a [breaking change].
2015-10-10Auto merge of #28932 - barosl:empty-comment, r=alexcrichtonbors-2/+3
Previously, `/**/` was incorrectly regarded as a doc comment because it starts with `/**` and ends with `*/`. However, this caused an ICE because some code assumed that the length of a doc comment is at least 5. This commit adds an additional check to `is_block_doc_comment` that tests the length of the input. Fixes #28844.
2015-10-10Auto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1bors-0/+9
implement RFC 1238: nonparametric dropck. cc #28498 cc @nikomatsakis
2015-10-10Prevent `/**/` from being parsed as a doc commentBarosl Lee-2/+3
Previously, `/**/` was incorrectly regarded as a doc comment because it starts with `/**` and ends with `*/`. However, this caused an ICE because some code assumed that the length of a doc comment is at least 5. This commit adds an additional check to `is_block_doc_comment` that tests the length of the input. Fixes #28844.
2015-10-09Auto merge of #28857 - nrc:lowering, r=nikomatsakisbors-444/+91
r? @nikomatsakis
2015-10-09Auto merge of #28919 - huonw:placement-tracking-issue, r=alexcrichtonbors-2/+2
cc #28244
2015-10-09Point `placement_in_syntax`/`box_syntax` lang features at tracking issue #27779.Huon Wilson-2/+2
cc #28244.
2015-10-09Some cleanup of no longer used AST thingsNick Cameron-49/+13
2015-10-09Cache ids between lowering runsNick Cameron-0/+1
So that lowering is reproducible
2015-10-09hygiene for `for` loops, `if let`, `while let`Nick Cameron-15/+72
and some unrelated test cleanups
2015-10-09Fix stabilityNick Cameron-2/+2
2015-10-09Move placement in desugaring to loweringNick Cameron-154/+3
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