Commit Graph

2131 Commits

Author SHA1 Message Date
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 ea47c2b6b3 Unify structures and enum variants in AST 2015-10-13 15:19:15 +03:00
bors c14609035d Auto merge of #28857 - nrc:lowering, r=nikomatsakis
r? @nikomatsakis
2015-10-09 08:53:45 +00:00
Nick Cameron ba43c228b5 Some cleanup of no longer used AST things 2015-10-09 11:53:42 +13:00
Nick Cameron 08f3752270 hygiene for for loops, if let, while let
and some unrelated test cleanups
2015-10-09 11:53:41 +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
Cristi Cobzarenco 4b308b44e1 typos: fix a grabbag of typos all over the place 2015-10-08 19:49:31 +01:00
Vadim Petrochenkov b82d76c8a1 Add comment for the use of Ident in hash map in mtwt 2015-10-06 01:47:35 +03:00
Vadim Petrochenkov f37d6fc6f3 libsyntax: Do not derive Hash for Ident 2015-10-03 12:44:47 +03:00
Ms2ger b093060c2a Stop re-exporting AttrStyle's variants and rename them. 2015-10-01 18:03:34 +02: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
Ms2ger 184c8a99ed Use ast::AsmDialect's variants qualified, and drop the pointless prefix. 2015-09-21 16:48:25 +02:00
Andrew Paseltiner 85b8b447fa Replace ast::Mac_ enum with struct
Closes #28527.
2015-09-20 17:15:04 -04:00
Manish Goregaokar 8aef16c2a5 Move tts instead of cloning in expansion 2015-09-20 06:45:19 +05:30
Simonas Kazlauskas f5a99ae7fb Remove Visibility field from enum variants
Followup on #28440
2015-09-17 10:02:59 +03:00
Huon Wilson 31310f5b65 Allow tracking issues for lang features.
This is similar to the libs version, which allow an `issue` field in the
`#[unstable]` attribute.

cc #28244
2015-09-08 11:01:42 +10: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
bors ae75ef9e62 Auto merge of #28137 - nrc:remove-non-multi, r=huonw
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-09-01 09:12:52 +00:00
Nick Cameron 20e1ea2dd8 Remove the Modifier and Decorator kinds of syntax extensions.
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-09-01 13:16:03 +12:00
Nick Cameron ef4853041a Closures are not generated code. 2015-08-31 17:06:30 +12:00
Michael Layzell 38d450fad2 Allow #[derive()] to generate unsafe trait impls 2015-08-29 14:50:05 -04:00
Manish Goregaokar 25cbb4385e Move ExpnInfo to Name 2015-08-28 03:37:13 +05:30
Manish Goregaokar 4ec7b713dd Enumify CompilerExpansion in ExpnInfo 2015-08-27 05:16:05 +05:30
bors 4c996499a1 Auto merge of #27239 - apasel422:issue-19102, r=huonw
closes #19102
2015-08-24 18:43:41 +00:00
bors 7e13faee17 Auto merge of #27849 - jonas-schievink:macro-errors, r=nikomatsakis
And some small indentation/code style fixes in the macro parser.
2015-08-19 00:54:38 +00:00
Huon Wilson e364f0eb5a feature gate cfg(target_feature).
This is theoretically a breaking change, but GitHub search turns up no
uses of it, and most non-built-in cfg's are passed via cargo features,
which look like `feature = "..."`, and hence can't overlap.
2015-08-17 14:41:37 -07:00
Huon Wilson c8b6d5b23c Implement repr(simd) as an alias for #[simd]. 2015-08-17 10:57:18 -07:00
Jonas Schievink 5e8d39ebfd Slightly improved macro diagnostics + Indentation fixes 2015-08-15 21:27:52 +02:00
bors 29455557aa Auto merge of #27827 - w00ns:for-loop-expn-issue-27639, r=alexcrichton
Fixes #27639
2015-08-15 14:50:13 +00:00
w00ns ae68e90af4 Fix issue with for loop expansion 2015-08-15 10:17:12 +02:00
Jonas Schievink 59f8e3238a Fix span of invalid metavariable repetition 2015-08-15 00:45:34 +02:00
bors 6a5c4e77a8 Auto merge of #27691 - jonas-schievink:for-macro, r=alexcrichton
Closes #27004
2015-08-12 20:58:31 +00:00
Jonas Schievink a016dfb1d1 Fix macro expansion in for loop pattern 2015-08-12 10:34:14 +02:00
bors 58b0aa5e42 Auto merge of #27584 - TimNN:macro-eof-span, r=huonw
The ideas is to use the span of the complete macro invocation if the span of a macro error is `DUMMY_SP`.

fixes #7970
2015-08-11 23:21:19 +00:00
bors 8856927f64 Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton
An implementation of [RFC 1219](https://github.com/rust-lang/rfcs/pull/1219).

The RFC is not merged yet, but once merged, this could be.
2015-08-10 20:24:06 +00:00
Tim Neumann d46e84081f add and use Span.substitute_dummy method 2015-08-10 20:43:11 +02:00
Sean McArthur cfcd449c4c rustc: rename multiple imports in a list 2015-08-08 11:54:15 -07:00
Tim Neumann c115c51363 improve span of erroneous empty macro invocation
The ideas is to use the span of the complete macro invocation if the span of a
macro error is `DUMMY_SP`.

fixes #7970
2015-08-07 16:53:13 +02:00
bors 11deb083f5 Auto merge of #27296 - jroesch:type-macros, r=huonw
This pull request implements the functionality for [RFC 873](https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md). This is currently just an update of @freebroccolo's branch from January, the corresponding commits are linked in each commit message.

@nikomatsakis and I had talked about updating the macro language to support a lifetime fragment specifier, and it is possible to do that work on this branch as well. If so we can (collectively) talk about it next week during the pre-RustCamp work week.
2015-08-06 19:11:17 +00:00
Jared Roesch 471370a16b Fix last nits 2015-08-04 16:05:07 -07:00
Jared Roesch f004079de2 Actually commit tests 2015-08-04 16:05:07 -07:00
Jared Roesch 89d401f6ab Address nits 2015-08-04 16:05:07 -07:00
Jared Roesch 15e7aa79f5 Add feature gate 2015-08-04 16:05:07 -07:00
Jared Roesch 8602a7d898 Update and add test case
Test case from here: https://github.com/freebroccolo/rust/commit/9e93fef3c0e61836a8b56f727eb7a2e94bb4ca09
2015-08-04 16:05:07 -07:00