Taylor Cramer
cf844b547d
async await desugaring and tests
2018-06-21 22:36:36 -07:00
Without Boats
18ff7d091a
Parse async fn header.
...
This is gated on edition 2018 & the `async_await` feature gate.
The parser will accept `async fn` and `async unsafe fn` as fn
items. Along the same lines as `const fn`, only `async unsafe fn`
is permitted, not `unsafe async fn`.The parser will not accept
`async` functions as trait methods.
To do a little code clean up, four fields of the function type
struct have been merged into the new `FnHeader` struct: constness,
asyncness, unsafety, and ABI.
Also, a small bug in HIR printing is fixed: it previously printed
`const unsafe fn` as `unsafe const fn`, which is grammatically
incorrect.
2018-06-21 22:29:47 -07:00
varkor
dde942bb64
Fix additional comments
2018-06-20 12:23:46 +01:00
varkor
95f1866a4d
Make GenericBound explicit
2018-06-20 12:23:46 +01:00
varkor
c5f16e0e18
Rename ParamBound(s) to GenericBound(s)
2018-06-20 12:23:46 +01:00
varkor
7de6ed06a5
Rename TraitTyParamBound to ParamBound::Trait
2018-06-20 12:23:23 +01:00
varkor
831b5c02df
Take advantage of the lifetime refactoring
2018-06-20 12:23:08 +01:00
varkor
80dbe58efc
Use ParamBounds in WhereRegionPredicate
2018-06-20 12:23:07 +01:00
varkor
aed530a457
Lift bounds into GenericParam
2018-06-20 12:22:46 +01:00
varkor
a5328bc17b
Simply joint lifetime/type iteration
2018-06-20 12:21:52 +01:00
varkor
8bccfe7a52
Refactor counting methods
2018-06-20 12:21:52 +01:00
varkor
3bcb006fd9
Rename structures in ast
2018-06-20 12:21:52 +01:00
varkor
2c6ff2469a
Refactor ast::GenericParam as a struct
2018-06-20 12:21:08 +01:00
varkor
82dba3d419
Refactor hir::GenericParam as a struct
2018-06-20 12:21:07 +01:00
varkor
d643946550
Rename ast::GenericParam and ast::GenericArg
...
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20 12:19:04 +01:00
varkor
f9d0968906
Make method and variable names more consistent
2018-06-20 12:19:04 +01:00
varkor
76c0d68745
Rename "parameter" to "arg"
2018-06-20 12:19:04 +01:00
varkor
3e89753283
Rename PathParameter(s) to GenericArg(s)
2018-06-20 12:19:04 +01:00
varkor
494859e8dd
Consolidate PathParameters and AngleBracketedParameterData
2018-06-20 12:19:03 +01:00
QuietMisdreavus
122b5b47c2
create multiple HIR items for a use statement
2018-06-14 17:47:28 -05:00
Eduard-Mihai Burtescu
5c76b64546
rustc: don't visit lifetime parameters through visit_lifetime.
2018-05-30 20:29:38 +03:00
Niko Matsakis
01d6ed525f
restore emplacement syntax (obsolete)
2018-05-24 18:49:58 -04:00
Eduard-Mihai Burtescu
26aad25487
rustc: introduce {ast,hir}::AnonConst to consolidate so-called "embedded constants".
2018-05-19 20:34:42 +03:00
est31
11f5893610
label-break-value: Parsing and AST/HIR changes
2018-05-16 13:56:24 +02:00
Irina Popa
04fa0e7bb3
rustc_target: move in syntax::abi and flip dependency.
2018-04-26 17:49:16 +03:00
Vadim Petrochenkov
44acea4d88
AST/HIR: Merge field access expressions for named and numeric fields
2018-04-12 23:02:09 +03:00
Vadim Petrochenkov
b3b5ef186c
Remove more duplicated spans
2018-04-06 11:50:49 +03:00
Vadim Petrochenkov
62000c072e
Rename ast::Variant_::name into ident + Fix rebase
2018-04-06 11:48:19 +03:00
Vadim Petrochenkov
e2afefd80b
Get rid of SpannedIdent
2018-04-06 11:48:19 +03:00
Vadim Petrochenkov
8719d1ed05
Rename PathSegment::identifier to ident
2018-04-06 11:46:26 +03:00
Alex Crichton
46492ffabd
Rollup merge of #49350 - abonander:macros-in-extern, r=petrochenkov
...
Expand macros in `extern {}` blocks
This permits macro and proc-macro and attribute invocations (the latter only with the `proc_macro` feature of course) in `extern {}` blocks, gated behind a new `macros_in_extern` feature.
A tracking issue is now open at #49476
closes #48747
2018-04-05 10:49:14 -05:00
Austin Bonander
5d74990ceb
expand macro invocations in extern {} blocks
2018-04-03 13:16:11 -07:00
Aidan Hobson Sayers
9b5859aea1
Remove all unstable placement features
...
Closes #22181 , #27779
2018-04-03 11:02:34 +02:00
Vadim Petrochenkov
b057c554ab
AST: Make renames in imports closer to the source
...
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
c6c6cf9515
AST/HIR: Clarify what the optional name in extern crate items mean
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
c9aff92e6d
Support parentheses in patterns under feature gate
...
Improve recovery for trailing comma after `..`
2018-03-01 01:47:56 +03:00
Vadim Petrochenkov
8640a51ff8
Implement multiple patterns with | in if let and while let
2018-02-24 03:12:35 +03:00
Seiichi Uchida
d6bdf296a4
Change ast::Visibility to Spanned type
2018-02-18 00:10:40 +09:00
Seiichi Uchida
0bddba9248
Add a span field to Visibility::Restricted
...
This span covers the whole visibility expression: e.g. `pub (in path)`.
2018-02-18 00:10:40 +09:00
Alex Crichton
98b375483c
Rollup merge of #47502 - petrochenkov:label, r=eddyb
...
AST/HIR: Add a separate structure for labels
2018-01-25 12:48:49 -06:00
John Kåre Alsaker
ccf0d8399e
Adds support for immovable generators. Move checking of invalid borrows across suspension points to borrowck. Fixes #44197 , #45259 and #45093 .
2018-01-23 05:10:38 +01:00
Vadim Petrochenkov
2d56abfbeb
AST/HIR: Add a separate structure for labels
2018-01-22 23:13:12 +03:00
leonardo.yvens
f93183adb4
Remove impl Foo for .. in favor of auto trait Foo
...
No longer parse it.
Remove AutoTrait variant from AST and HIR.
Remove backwards compatibility lint.
Remove coherence checks, they make no sense for the new syntax.
Remove from rustdoc.
2018-01-13 18:48:00 +03:00
Jonas Platte
78493ed21a
Add GenericParam, refactor Generics in ast, hir, rustdoc
...
The Generics now contain one Vec of an enum for the generic parameters,
rather than two separate Vec's for lifetime and type parameters.
Additionally, places that previously used Vec<LifetimeDef> now use
Vec<GenericParam> instead.
2017-12-21 13:38:10 +01:00
Alex Burka
d4a28268cc
add trait aliases to AST
2017-12-14 12:56:26 -05:00
Pietro Albini
91ba8b42fc
Implement RFC 2128 (use_nested_groups)
...
This commit adds support for nested groups inside `use` declarations,
such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-11-30 13:10:26 +01:00
leonardo.yvens
1f4b630899
add auto keyword, parse auto trait, lower to HIR
...
Adds an `IsAuto` field to `ItemTrait` which flags if the trait was
declared as an `auto trait`.
Auto traits cannot have generics nor super traits.
2017-11-03 16:13:20 -02:00
leonardo.yvens
06506bb751
[Syntax Breaking] Rename DefaultImpl to AutoImpl
...
DefaultImpl is a highly confusing name for what we now call auto impls,
as in `impl Send for ..`. The name auto impl is not formally decided
but for sanity anything is better than `DefaultImpl` which refers
neither to `default impl` nor to `impl Default`.
2017-11-03 16:13:20 -02:00
Paul Lietar
77f7e85d7f
Implement RFC 1861: Extern types
2017-10-27 23:01:34 +02:00
bors
56dc171a2f
Auto merge of #45464 - sinkuu:ice_44851, r=jseyfried
...
Visit attribute tokens in `DefCollector` and `BuildReducedGraphVisitor`
Fixes #44851 .
2017-10-26 04:32:16 +00:00