Mazdak Farrokhzad
ebfd8673a7
Remove rustc_hir reexports in rustc::hir.
2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad
75e4783f63
Normalize syntax::source_map imports.
2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048
Rename syntax_pos to rustc_span in source code
2020-01-01 09:15:18 +03:00
Vadim Petrochenkov
b9a9c5b4fd
Make things build again
2019-12-30 19:18:16 +03:00
Vadim Petrochenkov
3d57b8bcc0
doc comments: Less attribute mimicking
2019-12-28 12:33:18 +03:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Camille GILLOT
084e6722f9
Use Arena inside hir::Item.
2019-12-21 23:17:29 +01:00
Mazdak Farrokhzad
a7aec3f207
1. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.
...
2. mir::Mutability -> ast::Mutability.
2019-12-20 22:22:44 +01:00
Mazdak Farrokhzad
e52f902a8a
AssocImplKind::{Method -> Fn}.
2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
abf2e7aa95
Remove ast::{Impl,Trait}{Item,ItemKind}.
2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
34d91709b6
parse: refactor fun ret ty & param ty
2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
39073767a4
Unify {Trait,Impl}ItemKind::TyAlias structures.
2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
c02fd31302
TraitItemKind::Type -> TraitItemKind::TyAlias.
2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
f6403c6c76
Use Option in ImplItemKind::Method.
2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
73557faed2
Use Option in ImplItemKind::Const.
2019-12-12 17:54:48 +01:00
Vadim Petrochenkov
0fac56717a
syntax: Remove redundant span from ast::Mac
...
Also remove a couple of redundant `visit_mac` asserts
2019-12-02 21:56:34 +03:00
Vadim Petrochenkov
266f547127
ast: Keep extern qualifiers in functions more precisely
2019-11-16 21:21:37 +03:00
Mazdak Farrokhzad
89b5907357
TAIT: adjust save-analysis
2019-11-14 13:40:42 +01:00
Mazdak Farrokhzad
4ae2728fa8
move syntax::parse -> librustc_parse
...
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10 03:57:18 +01:00
Mazdak Farrokhzad
b4c6abcf9e
ast::ItemKind::Fn: use ast::FnSig
2019-11-08 09:32:20 +01:00
Mazdak Farrokhzad
2cd48e8a3b
ast::MethodSig -> ast::FnSig
2019-11-08 09:32:20 +01:00
Mazdak Farrokhzad
27f97aa468
move syntax::parse::lexer::comments -> syntax::util::comments
2019-11-07 13:59:13 +01:00
Mazdak Farrokhzad
9d6768a478
syntax::parser::token -> syntax::token
2019-11-07 13:50:12 +01:00
Mazdak Farrokhzad
55f76cdb2f
syntax: use distinct FloatTy from rustc_target.
...
We also sever syntax's dependency on rustc_target as a result.
This should slightly improve pipe-lining.
Moreover, some cleanup is done in related code.
2019-11-07 05:25:31 +01:00
Mazdak Farrokhzad
beddf67a4b
parser: don't hardcode ABIs into grammar
2019-11-07 05:25:31 +01:00
Nicholas Nethercote
eea6f23a0e
Make doc comments cheaper with AttrKind.
...
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a
big performance win (over 10% in some cases) because `DocComment` lets doc
comments (which are common) be represented very cheaply.
`Attribute` gets some new helper methods to ease the transition:
- `has_name()`: check if the attribute name matches a single `Symbol`; for
`DocComment` variants it succeeds if the symbol is `sym::doc`.
- `is_doc_comment()`: check if it has a `DocComment` kind.
- `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant;
panic otherwise.
Fixes #60935 .
2019-11-06 23:05:07 +11:00
Nicholas Nethercote
69bc4aba78
Remove unnecessary Deref impl for Attribute.
...
This kind of thing just makes the code harder to read.
2019-11-06 23:01:02 +11:00
Igor Matuszewski
e755963cbd
save-analysis: Account for async desugaring in async fn return types
2019-10-29 16:25:37 +01:00
Igor Matuszewski
5fe88abed0
save-analysis: Nest tables when processing impl items
2019-10-17 20:48:00 +02:00
Igor Matuszewski
eefc1697c5
Nest typeck tables when processing struct member types
2019-10-13 02:08:33 +02:00
Igor Matuszewski
7b3cd1b674
Use empty typeck tables when nesting on items without those
2019-10-13 02:08:33 +02:00
Tyler Mandry
008526340a
Rollup merge of #64708 - SimonSapin:option-deref, r=Centril
...
Stabilize `Option::as_deref` and `Option::as_deref_mut`
The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
2019-10-05 21:54:47 -07:00
varkor
b474867961
Rename ForeignItem.node to ForeignItem.kind
2019-09-26 18:21:48 +01:00
varkor
7bc94cc3c2
Rename Item.node to Item.kind
2019-09-26 18:21:48 +01:00
varkor
c3d8791373
Rename Ty.node to Ty.kind
2019-09-26 18:21:10 +01:00
varkor
d4573c9c1e
Rename TraitItem.node to TraitItem.kind
2019-09-26 18:21:09 +01:00
varkor
ce6aabbaa1
Rename ImplItem.node to ImplItem.kind
2019-09-26 18:21:09 +01:00
varkor
8bd0382134
Rename Pat.node to Pat.kind
2019-09-26 18:21:09 +01:00
varkor
95f6d72a60
Rename Expr.node to Expr.kind
...
For both `ast::Expr` and `hir::Expr`.
2019-09-26 18:21:09 +01:00
varkor
e2e0f9af85
Rename sty to kind
2019-09-25 15:50:04 +01:00
Simon Sapin
0797712e29
Stabilize Option::deref and Option::deref_mut
...
The tracking issue https://github.com/rust-lang/rust/issues/50264
still has unresolved question for the corresponding `Result` methods.
2019-09-23 17:14:26 +02:00
Shotaro Yamada
0423c2a7a3
Remove unused dependencies
2019-09-23 15:25:00 +09:00
Igor Matuszewski
a946b8d6e1
save-analysis: Process bounds in impl trait only in argument position
2019-09-15 00:42:33 +02:00
Igor Matuszewski
30e39e871f
save-analysis: Deduplicate lookup_{d,r}ef_id functions
2019-09-15 00:42:33 +02:00
Igor Matuszewski
0fafd615e5
save-analysis: Visit bounds in opaque types
2019-09-13 15:41:10 +02:00
Igor Matuszewski
b4151dd321
save-analysis: Use process_bounds when processing opaque impl item type
...
...since the code is literally the same and does the same thing.
2019-09-13 15:36:55 +02:00
Igor Matuszewski
ab73b325b0
save-analysis: Nest typeck tables when processing functions/methods
...
Fixes an issue where we did not nest tables correctly when resolving
associated types in formal argument/return type positions
2019-09-13 15:31:50 +02:00
Mazdak Farrokhzad
be95dee5a1
or-patterns: adjust save_analysis wrt. process_var_decl{_multi}.
2019-09-05 08:33:09 +02:00
Kevin Per
e0ce9f8c0a
Cleanup: Consistently use Param instead of Arg #62426
2019-08-27 14:07:41 +02:00
Vadim Petrochenkov
dfcbe75900
syntax_pos: Introduce a helper for checking whether a span comes from expansion
2019-08-15 20:38:12 +03:00