Commit Graph

28 Commits

Author SHA1 Message Date
Vadim Petrochenkov
607b8c3892 Comment on the purpose(s) of NodeId in VariantData 2015-10-13 16:18:33 +03:00
Vadim Petrochenkov
46750d0409 Merge VariantData and VariantData_ 2015-10-13 15:19:27 +03:00
Vadim Petrochenkov
40aa09e4c9 Merge struct fields and struct kind 2015-10-13 15:19:25 +03:00
Vadim Petrochenkov
30af54dede Dict -> Struct, StructDef -> VariantData, def -> data 2015-10-13 15:19:24 +03:00
Vadim Petrochenkov
beda1f88a7 Provide span for visit_struct_def + remove some dead code 2015-10-13 15:19:19 +03:00
Vadim Petrochenkov
877c35e8a2 Remove now redundant NodeId from Variant 2015-10-13 15:19:18 +03:00
Vadim Petrochenkov
495566ee61 Decouple structure kinds from NodeIds 2015-10-13 15:19:17 +03:00
Vadim Petrochenkov
2314ab29c2 Unify structures and enum variants in HIR 2015-10-13 15:19:16 +03:00
Nick Cameron
a62a529eea review comments 2015-10-09 21:44:44 +13:00
Nick Cameron
e0c74868c3 Fix stability 2015-10-09 11:53:41 +13:00
Nick Cameron
869e9719fd rustfmt librustc_front 2015-10-06 11:22:34 +13:00
Vadim Petrochenkov
4744d56846 Fill in some missing parts in the default HIR visitor 2015-09-29 00:23:54 +03: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
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
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
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
791e7bcb41 Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichton
r? @alexcrichton
2015-09-04 05:15:22 +00: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