Florian Hahn
107b4aa329
Remove bare semicolons
2015-10-24 00:35:44 +02:00
Nick Cameron
401c80dab1
save-analysis: don't recompute crate name
2015-10-21 12:04:48 +13:00
bors
7ac89d27ad
Auto merge of #29040 - nrc:save-defid, r=@nikomatsakis
...
With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.
r? @nikomatsakis
2015-10-15 12:51:31 +00:00
Nick Cameron
06b5a951a0
save-analysis: normalise node ids before emitting.
...
With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.
2015-10-15 10:58:12 +13: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
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
Nick Cameron
21205f4f9e
Cache ids between lowering runs
...
So that lowering is reproducible
2015-10-09 11:53:42 +13:00
Nick Cameron
ce80094632
Make save-analysis work for if let
etc.
2015-10-09 11:53:42 +13:00
Nick Cameron
04a7675d22
For loops in save-analysis
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
b22231c820
rustfmt librustc_trans/save
2015-10-06 14:25:30 +13:00
Niko Matsakis
a0dc2d9a29
Introduce semi-duplicate DefIds into DefLocal/DefUpvar to remove use
...
of xxx_local.
2015-10-01 10:37:19 -04:00
Niko Matsakis
3b1399df2d
Make calling def_id on a DefSelfTy an error; the previous defids that
...
were returned, either the trait or the *self type itself*, were not
particularly representative of what the Def is (a type parameter).
Rewrite paths to handle this case specially, just as they handle the
primitive case specifically. This entire `def_id` codepath is kind of a
mess.
2015-10-01 10:37:19 -04:00
Niko Matsakis
cb784b70ba
Remove DefRegion, which is not used
2015-10-01 10:37:19 -04: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
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
Vadim Petrochenkov
40ce80484c
Remove random Idents outside of libsyntax
2015-09-23 20:04:49 +03:00
Nick Cameron
66f662f37d
Fix crash with --save-analysis
...
Should be lowering ast expressions to HIR expressions, not cheating via the hir map. That goes wrong now that there is not a 1:1 mapping between ast and hir (in the case of the crash due to ExprParen).
2015-09-18 16:41:11 +12:00
Nick Cameron
6a127e95c7
fixup
2015-09-05 09:45:35 +12:00
Nick Cameron
edca8f73d6
rustfmt librustc_trans/save
2015-09-05 09:45:35 +12:00
Nick Cameron
facdf2ebb1
Add an intital HIR and lowering step
2015-09-03 10:02:36 +12:00
Niko Matsakis
e91bef2e05
fallout from moving def-id
2015-08-24 05:35:34 -04:00
Ariel Ben-Yehuda
eedb1cc576
rename ADTDef to AdtDef etc.
2015-08-07 15:03:09 +03:00
Ariel Ben-Yehuda
5f3c1412ad
use VariantDef instead of struct_fields
2015-08-06 16:54:40 +03:00
Ariel Ben-Yehuda
764310e7bb
introduce an ADTDef struct for struct/enum definitions
2015-08-06 14:16:56 +03:00
Eduard Burtescu
a34b0a4691
rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer.
2015-08-04 01:16:53 +03:00
bors
55ede7ed8e
Auto merge of #27234 - oli-obk:move_get_name_get_ident_to_impl, r=eddyb
...
this has quite some fallout. but also made lots of stuff more readable imo
[breaking-change] for plugin authors
2015-07-28 21:14:28 +00:00
Oliver Schneider
00a5e66f81
remove get_ident
and get_name
, make as_str
sound
2015-07-28 18:07:20 +02:00
Nick Cameron
f91a20bbfb
save-analysis: return an Option from get_path_data
2015-07-25 17:47:26 +12:00
Felix S. Klock II
91493df752
Work around unary negation to-be-feature-gated warning by
...
replacing references to `-1` as a `ast::NodeId` with `ast::DUMMY_NODE_ID`,
which seems like a better notation to use (it is currently also `-1`.
(AFAICT the code is not *relying* on the value `-1` anywhere, it
really just needed a dummy value for when the input is `None`.)
2015-07-21 18:12:06 +02:00
Nick Cameron
41b056823c
save-analysis: tweak constructors
2015-07-14 14:21:54 +12:00
Nick Cameron
0c766cb8bc
save-analysis: API-ify methods
2015-07-09 12:24:39 +12:00
Nick Cameron
df5a1ca880
save-analysis: factor out helper method
2015-07-09 12:24:39 +12:00
Nick Cameron
374af4aea7
save-analysis: API-ify paths
2015-07-09 12:24:39 +12:00
Nick Cameron
8ac0bce64e
save-analysis: api-ify method calls
2015-07-09 12:24:39 +12:00
Eduard Burtescu
d256eb1c5d
rustc: remove MethodOrigin and use the container to distinguish inherent methods.
2015-07-04 17:51:31 +03:00
Eduard Burtescu
96d24a5c58
rustc: remove MethodOrigin::Object and use traits::VtableObject instead.
2015-07-04 06:21:00 +03:00
Eduard Burtescu
5620a58791
rustc_lint: use traits::select for methods in unconditional_recursion.
2015-07-04 06:21:00 +03:00
Eduard Burtescu
70365ed911
rustc: simplify ty::MethodOrigin and avoid trait item indices.
2015-07-04 06:21:00 +03:00
Eduard Burtescu
fe354e58bd
rustc: remove unused MethodStaticClosure variant of MethodOrigin.
2015-07-04 06:21:00 +03:00
bors
f027bdc1c8
Auto merge of #26378 - arielb1:unused-mut, r=pnkfelix
...
This makes it somewhat more aggressive, so this is kind-of a [breaking-change] for these compiling with `#[deny(unused_mut)]`.
r? @pnkfelix
2015-07-03 21:31:46 +00:00
Nick Cameron
a1d40c81f9
save-analysis: skip generated content in patterns
2015-07-01 15:53:08 +12:00
Ariel Ben-Yehuda
a18d9842ed
Make the unused_mut lint smarter with respect to locals.
...
Fixes #26332
2015-07-01 00:12:12 +03:00
Jared Roesch
79d02895ff
Begin refactor type checking state
...
This first patch starts by moving around pieces of state related to
type checking. The goal is to slowly unify the type checking state
into a single typing context. This initial patch moves the
ParameterEnvironment into the InferCtxt and moves shared tables
from Inherited and ty::ctxt into their own struct Tables. This
is the foundational work to refactoring the type checker to
enable future evolution of the language and tooling.
2015-06-27 13:43:20 -07:00
Eduard Burtescu
ad66c215aa
rustc: switch most remaining middle::ty functions to methods.
2015-06-26 07:34:57 +03:00