Commit Graph

48 Commits

Author SHA1 Message Date
Nick Cameron
d399098fd8 Remove the push_unsafe! and pop_unsafe! macros.
This is a [breaking change].
2015-10-12 15:50:12 +13:00
Nick Cameron
254a10b318 Properly set the MatchSource for for loops 2015-10-12 09:49:29 +13:00
Nick Cameron
a62a529eea review comments 2015-10-09 21:44:44 +13:00
Nick Cameron
87b0cf4541 rustfmt'ing 2015-10-09 11:53:42 +13:00
Nick Cameron
2b4f28e531 Misc fixups 2015-10-09 11:53:42 +13:00
Nick Cameron
3d81f78544 Add a comment 2015-10-09 11:53:42 +13:00
Nick Cameron
ba43c228b5 Some cleanup of no longer used AST things 2015-10-09 11:53:42 +13:00
Nick Cameron
21205f4f9e Cache ids between lowering runs
So that lowering is reproducible
2015-10-09 11:53:42 +13:00
Nick Cameron
e0c74868c3 Fix stability 2015-10-09 11:53:41 +13:00
Nick Cameron
7f469ba6c5 Move placement in desugaring to lowering 2015-10-09 11:53:41 +13:00
Nick Cameron
bc364b4a0d if let and while let 2015-10-09 11:53:41 +13:00
Nick Cameron
20083c1e1f Move for loop desugaring to lowering 2015-10-09 11:53:41 +13:00
Nick Cameron
56713a1684 Add a lowering context 2015-10-09 11:53:41 +13:00
Nick Cameron
869e9719fd rustfmt librustc_front 2015-10-06 11:22:34 +13:00
Seo Sanghyeon
61f5b2b0ca Check attribute usage 2015-10-03 00:01:49 +09:00
Ms2ger
b093060c2a Stop re-exporting AttrStyle's variants and rename them. 2015-10-01 18:03:34 +02:00
Vadim Petrochenkov
4764d98223 Restore if lets replaced with fors 2015-09-29 11:33:25 +03:00
Vadim Petrochenkov
4744d56846 Fill in some missing parts in the default HIR visitor 2015-09-29 00:23:54 +03:00
Manish Goregaokar
30b43c1b12 Rollup merge of #28682 - apasel422:features, r=steveklabnik 2015-09-27 15:05:18 +05:30
Andrew Paseltiner
589c82449a Remove unnecessary #![feature] attributes 2015-09-26 15:59:31 -04:00
bors
2e88c36ebc Auto merge of #28642 - petrochenkov:name3, r=nrc
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-26 14:48:56 +00:00
Vadim Petrochenkov
f284cbc7af Cleanup interfaces of Name, SyntaxContext and Ident
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-24 23:05:02 +03:00
Eduard Burtescu
f293ea28b4 Remove the deprecated box(PLACE) syntax. 2015-09-24 18:00:08 +03:00
Vadim Petrochenkov
40ce80484c Remove random Idents outside of libsyntax 2015-09-23 20:04:49 +03:00
Vadim Petrochenkov
0af8e47546 Fix rebase 2015-09-22 20:46:23 +03:00
Vadim Petrochenkov
45b445e5a3 Restore fold_ident and visit_ident 2015-09-22 19:58:30 +03:00
Vadim Petrochenkov
2a779062d8 Use Names in the remaining HIR structures with exception of...
PathSegment, PatIdent, ExprWhile, ExprLoop, ExprBreak and ExprAgain - they need Idents for resolve
2015-09-22 19:58:29 +03:00
Vadim Petrochenkov
a636a83caa Use Names in path fragments and MacroDef 2015-09-22 19:57:43 +03:00
Vadim Petrochenkov
64fb709f99 Use Names in hir::{Field, ExprMethodCall, ExprField} 2015-09-22 19:53:53 +03:00
Vadim Petrochenkov
a4af958786 Use Names in HIR Items 2015-09-22 19:53:52 +03:00
Vadim Petrochenkov
ae77dbb835 Use Names in HIR visitors and folders 2015-09-22 19:52:53 +03:00
bors
e9d2587766 Auto merge of #28364 - petrochenkov:usegate, r=alexcrichton
Closes https://github.com/rust-lang/rust/issues/28075
Closes https://github.com/rust-lang/rust/issues/28388

r? @eddyb 
cc @brson
2015-09-22 01:12:26 +00:00
Ms2ger
184c8a99ed Use ast::AsmDialect's variants qualified, and drop the pointless prefix. 2015-09-21 16:48:25 +02:00
Ms2ger
22fa1aaade Remove hir::AsmDialect in favour of ast::AsmDialect. 2015-09-21 16:12:53 +02:00
bors
72a10fa1d3 Auto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichton
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-18 18:51:04 +00:00
Vadim Petrochenkov
5fa6e857c9 Implement empty struct with braces (RFC 218) 2015-09-18 15:26:08 +03:00
Vadim Petrochenkov
c3f53d1b12 Resolve prefix in imports with empty braces 2015-09-17 14:13:14 +03:00
Vadim Petrochenkov
357982fae4 Workaround for imports with empty braces 2015-09-17 14:13:13 +03:00
Vadim Petrochenkov
50e42ea9f7 Correctly walk import lists in AST visitors 2015-09-17 14:13:12 +03:00
Simonas Kazlauskas
f5a99ae7fb Remove Visibility field from enum variants
Followup on #28440
2015-09-17 10:02:59 +03:00
Nick Cameron
d21bfff78c Remove hir::ExprParen 2015-09-17 12:16:46 +12:00
Nick Cameron
e9f1b06329 Use ast attributes every where (remove HIR attributes).
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-16 10:57:06 +12:00
bors
53e694e19b Auto merge of #28190 - arielb1:generic-key-entry, r=eddyb
Fixes #28181
This may fix #28151

r? @pnkfelix
2015-09-05 22:15:40 +00:00
bors
791e7bcb41 Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichton
r? @alexcrichton
2015-09-04 05:15:22 +00:00
Ariel Ben-Yehuda
16f75f773d create a region-map for types in generics
Fixes #28181
This may fix #28151
2015-09-03 13:35:41 +03:00
Simonas Kazlauskas
c493084ec1 Adapt the PR for HIR changes 2015-09-03 11:54:17 +03:00
Vadim Petrochenkov
405c616eaf Use consistent terminology for byte string literals
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03 10:54:53 +03:00
Nick Cameron
facdf2ebb1 Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00