bors
32a4bd9ae5
Auto merge of #29102 - petrochenkov:spanvis, r=alexcrichton
...
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-17 06:16:09 +00:00
bors
747d951e88
Auto merge of #29014 - petrochenkov:stability, r=brson
...
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-16 17:47:01 +00:00
Vadim Petrochenkov
a0f2a591e0
Provide span for visit_enum_def
2015-10-16 17:17:14 +03:00
bors
785932f9d8
Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelix
...
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-15 03:26:48 +00:00
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
a5225cbe92
Fix rebase 2
2015-10-13 15:19:26 +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
Vadim Petrochenkov
ea47c2b6b3
Unify structures and enum variants in AST
2015-10-13 15:19:15 +03:00
Vadim Petrochenkov
ab671552c3
Refactor attr::Stability
...
Stricter checking + enforcement of invariants at compile time
2015-10-13 06:01:31 +03:00
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 let
s replaced with for
s
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