Manish Goregaokar
81aeb0cdde
Rollup merge of #33854 - petrochenkov:prefvis, r=eddyb
...
Apply visit_path to import prefixes by default
Overriding `visit_path` is not enough to visit all paths, some import prefixes are not visited and `visit_path_list_item` need to be overridden as well. This PR removes this catch, it should be less error prone this way. Also, the prefix is visited once now, not repeatedly for each path list item.
r? @eddyb
2016-05-28 19:52:16 +05:30
Manish Goregaokar
7905452f08
Rollup merge of #33644 - petrochenkov:selfast, r=nrc
...
The AST part of https://github.com/rust-lang/rust/pull/33505 .
https://github.com/rust-lang/rust/pull/33505 isn't landed yet, so this PR is based on top of it.
r? @nrc
plugin-[breaking-change] cc #31645 @Manishearth
2016-05-27 09:57:11 +05:30
Manish Goregaokar
35785712cd
Rollup merge of #33639 - petrochenkov:dotdot, r=nmatsakis
...
cc https://github.com/rust-lang/rust/issues/33627
r? @nikomatsakis
plugin-[breaking-change] cc https://github.com/rust-lang/rust/issues/31645 @Manishearth
2016-05-27 09:57:00 +05:30
Vadim Petrochenkov
d69aeaf662
Implement ..
in tuple (struct) patterns
2016-05-26 11:11:58 +03:00
Vadim Petrochenkov
1a1de5bf89
Add a new AST-only type variant ImplicitSelf
2016-05-25 21:55:04 +03:00
Vadim Petrochenkov
5660a00486
Remove ExplicitSelf from AST
2016-05-25 21:55:04 +03:00
Vadim Petrochenkov
40285ca717
Apply visit_path to import prefixes by default
2016-05-24 23:49:08 +03:00
Georg Brandl
2e812e10f4
syntax/hir: give loop labels a span
...
This makes the "shadowing labels" warning *not* print the entire loop
as a span, but only the lifetime.
Also makes #31719 go away, but does not fix its root cause (the span
of the expanded loop is still wonky, but not used anymore).
2016-05-24 14:22:14 +02:00
Niko Matsakis
ecd10f04ce
thread tighter span for closures around
...
Track the span corresponding to the `|...|` part of the closure.
2016-04-24 18:10:57 +05:30
Jeffrey Seyfried
2b2e4dda21
Visit visibilities in the ast visitor's walk_*
functions
2016-04-14 04:52:28 +00:00
Vadim Petrochenkov
8fe4290f1c
Move span into StructField
2016-04-06 11:19:10 +03:00
Vadim Petrochenkov
7f3744f07f
Get rid of ast::StructFieldKind
2016-04-06 10:33:15 +03:00
Jeffrey Seyfried
432eb8a094
Add Crate
and Restricted
variants to ast::Visibility
2016-04-02 20:32:18 +00:00
Jeffrey Seyfried
bc355244df
Make ast::Visibility
non-copyable
2016-04-02 20:21:41 +00:00
Jorge Aparicio
210dd611aa
implement the ?
operator
...
The `?` postfix operator is sugar equivalent to the try! macro, but is more amenable to chaining:
`File::open("foo")?.metadata()?.is_dir()`.
`?` is accepted on any *expression* that can return a `Result`, e.g. `x()?`, `y!()?`, `{z}?`,
`(w)?`, etc. And binds more tightly than unary operators, e.g. `!x?` is parsed as `!(x?)`.
cc #31436
2016-03-07 14:39:39 -05:00
Alex Burka
5daf13cae3
libsyntax: parse inclusive ranges
2016-02-27 02:01:41 -05:00
Vadim Petrochenkov
9f414a44a7
Split ast::PatKind::Enum into tuple struct and path patterns
2016-02-13 15:51:27 +03:00
Vadim Petrochenkov
14adc9bb63
Rename ast::Pat_ and its variants
2016-02-13 13:49:24 +03:00
Oliver 'ker' Schneider
dfe35da6b8
[breaking-change] don't glob export ast::TraitItemKind variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
019614f03d
[breaking-change] don't glob export ast::Item_ variants
2016-02-11 12:34:48 +01:00
Oliver 'ker' Schneider
0d6ddd1903
[breaking-change] don't glob export ast::ForeignItem_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
8290c950a8
[breaking-change] don't pub export ast::Stmt_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
05d4cefd63
[breaking-change] don't pub export ast::Ty_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
80bf9ae18a
[breaking-change] don't glob export ast::Expr_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
1c4d437158
[breaking-change] don't glob export ast::ExplicitSelf_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
79fa657abc
[breaking-change] don't glob export ast::Decl_ variants
2016-02-11 12:34:48 +01:00
Oliver Schneider
3b57d40fe5
[breaking-change] don't glob import ast::FunctionRetTy variants
2016-02-11 12:34:48 +01:00
Ms2ger
2359ab0dc9
Stop re-exporting PathParameters's variants.
2015-12-22 17:12:33 +01:00
Vadim Petrochenkov
e0ceef5a9e
Add ExprType to HIR and make everything compile
...
+ Apply parser changes manually
+ Add feature gate
2015-12-16 17:13:16 +03:00
Eduard Burtescu
b8157cc67f
Implement type ascription.
2015-12-16 17:12:35 +03:00
Amanieu d'Antras
65707dfc00
Use a struct instead of a tuple for inline asm output operands
2015-12-05 10:11:20 +00:00
Amanieu d'Antras
9d7b113b44
Add proper support for indirect output constraints in inline asm
2015-12-05 08:18:30 +00:00
Marvin Löbel
f0beba0217
Moved and refactored ThinAttributes
2015-11-26 21:46:12 +01:00
Marvin Löbel
2a8f358de7
Add syntax support for attributes on expressions and all syntax
...
nodes in statement position.
Extended #[cfg] folder to allow removal of statements, and
of expressions in optional positions like expression lists and trailing
block expressions.
Extended lint checker to recognize lint levels on expressions and
locals.
2015-11-26 21:46:12 +01:00
bors
b2f539375a
Auto merge of #29887 - sanxiyn:match-ref-pats, r=sfackler
2015-11-17 20:10:25 +00:00
Seo Sanghyeon
95f6ea920d
Fix match_ref_pats flagged by Clippy
2015-11-17 23:24:49 +09:00
Oliver Schneider
d09220de13
rename ast::ImplItem_::*ImplItem
to ast::ImplItemKind::*
2015-11-16 10:35:30 +01:00
Vadim Petrochenkov
3468b8d42c
Remove PatWildMulti
2015-10-31 03:44:43 +03:00
Vadim Petrochenkov
a0f2a591e0
Provide span for visit_enum_def
2015-10-16 17:17:14 +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
ea47c2b6b3
Unify structures and enum variants in AST
2015-10-13 15:19:15 +03:00
Nick Cameron
ba43c228b5
Some cleanup of no longer used AST things
2015-10-09 11:53:42 +13: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
Vadim Petrochenkov
eedb95101b
Fill in some missing parts in the default AST visitor
...
+ Add helper macro for walking lists (including Options)
2015-09-28 23:06:43 +03:00
Eduard Burtescu
f293ea28b4
Remove the deprecated box(PLACE) syntax.
2015-09-24 18:00:08 +03:00
Vadim Petrochenkov
c3f53d1b12
Resolve prefix in imports with empty braces
2015-09-17 14:13:14 +03:00