Mark Rousskov
0ae2aa2320
Use diagnostic API on Session
2018-08-04 06:54:36 -06:00
Matthew Jasper
18d5f82148
Change order of copy and borrow to avoid conflict
...
Note that the first argument is `self as &mut dyn Delegate`, so this
isn't allowed with two-phase borrows.
2018-07-29 18:04:09 +01:00
kennytm
59f8422a17
Rollup merge of #52781 - ljedrz:avoid_vec_arguments, r=nikomatsakis
...
Use a slice where a vector is not necessary
2018-07-28 16:25:07 +08:00
ljedrz
1cca420435
Use slices where a vector is not necessary
2018-07-27 16:50:28 +02:00
Tatsuyuki Ishi
e098985939
Deny bare_trait_objects globally
2018-07-25 10:25:29 +09:00
Oliver Schneider
de511438cd
Promoteds are statics and statics have a place, not just a value
2018-07-23 09:51:30 +02:00
csmoe
6a16b38198
ExprKind
2018-07-16 15:09:16 +02:00
csmoe
14893ba96b
DeclKind
2018-07-16 15:09:16 +02:00
csmoe
114314c920
StmtKind
2018-07-16 15:09:16 +02:00
csmoe
fe8955bd58
BinOpKind
2018-07-16 15:09:16 +02:00
bors
49f1e5d8ab
Auto merge of #52318 - TheDarkula:master, r=oli-obk
...
Removed the promotable field from CheckCrateVisitor...
and replaced it with the custom enum Promotability.
r? @oli-obk
2018-07-14 22:28:31 +00:00
Meade Kincke
07faca9741
Removed the promotable field from CheckCrateVisitor and replaced it with the structs Promotable and NotPromotable.
2018-07-14 21:46:19 +01:00
Vadim Petrochenkov
7d142c1e53
Address comments
2018-07-14 14:57:15 +03:00
Vadim Petrochenkov
4d1a30c92b
Remove most of PartialEq
impls from AST and HIR structures
2018-07-14 14:56:57 +03:00
ljedrz
5058af7003
Deny bare trait objects in the rest of rust
2018-07-12 13:50:22 +02:00
Meade Kincke
f629eb3595
General fixes and cleanup.
2018-07-07 01:09:09 +01:00
Meade Kincke
75bc0649b8
Omitted the walk in visit_expr()
2018-07-07 01:09:09 +01:00
varkor
4d66b65850
Fix issue-50585 test
2018-07-02 19:44:27 +01:00
varkor
7ad1c62d38
Fix an ICE using break and continue as array lengths
2018-07-02 19:43:16 +01:00
bors
ef9a322843
Auto merge of #51883 - estebank:placement-suggestion, r=varkor
...
Suggest correct comparison against negative literal
When parsing as emplacement syntax (`x<-1`), suggest the correct syntax
for comparison against a negative value (`x< -1`).
Fix #45651 .
2018-07-01 13:37:05 +00:00
Esteban Küber
23d59d00be
Suggest correct comparison against negative literal
...
When parsing as emplacement syntax (`x<-1`), suggest the correct syntax
for comparison against a negative value (`x< -1`).
2018-06-28 14:58:54 -07:00
Oliver Schneider
b2e2c32105
Generate the NodeId
for existential type
in the AST
2018-06-27 11:17:25 +02:00
bors
4fe88c05cd
Auto merge of #51727 - varkor:expragain-to-exprcontinue, r=petrochenkov
...
Rename hir::ExprAgain to hir::ExprContinue
The current name is confusing and historical.
I also used this PR to clean up the annoying indentation in `check/mod.rs`. If that's viewed as too tangential a change, I'll split it up, but it seemed reasonable to slip it in to reduce @bors's work. It's easy to compare for the two commits individually.
r? @petrochenkov
2018-06-23 14:33:10 +00:00
varkor
7ba2952af6
Rename ExprAgain to ExprContinue
2018-06-23 10:51:01 +01:00
Taylor Cramer
b97ef26de1
Explicitly ban async in trait impls
...
This wouldn't compile before because the return type wouldn't match,
but now it's properly an error.
2018-06-21 22:38:05 -07:00
Taylor Cramer
d64e577fa3
Async methods
2018-06-21 22:38:05 -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
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
3bcb006fd9
Rename structures in ast
2018-06-20 12:21:52 +01:00
varkor
f457b3d10a
Refactor generic parameters in rustdoc/clean
2018-06-20 12:21:52 +01:00
varkor
c65454850f
Remove AngleBracketedArgs impl
2018-06-20 12:21:08 +01:00
varkor
e1d888c722
Remove methods from ast::GenericParam and ast::Generics
2018-06-20 12:21:08 +01:00
varkor
2c6ff2469a
Refactor ast::GenericParam as a struct
2018-06-20 12:21:08 +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
Eduard-Mihai Burtescu
5a5c7ded0d
rustc: rename ty::maps to ty::query.
2018-06-14 18:05:12 +03:00
Oliver Schneider
9d613c27b7
Do not promote union field accesses
2018-06-03 19:06:31 +02:00
Niko Matsakis
a667049c33
also check let
arms and nested patterns for mutable borrows
2018-06-01 10:06:02 -04:00
bors
30cae58709
Auto merge of #51182 - eddyb:not-just-visibility, r=nikomatsakis
...
[MIR] Change "scopes" from "visibility scopes" to "source scopes".
These scopes are already used for source-oriented diagnostics, lint levels and unsafety checks.
This PR generalizes the naming around scopes, making the type `SourceScope`, and flips (across several commits) the relationship/priority between `LocalDecl`'s "visibility" and "syntactic" scopes.
r? @nikomatsakis
2018-05-31 08:55:09 +00:00
Eduard-Mihai Burtescu
85d44c4276
rustc: rename mir::VisibilityScope to mir::SourceScope.
2018-05-30 20:30:09 +03:00
Eduard-Mihai Burtescu
5c76b64546
rustc: don't visit lifetime parameters through visit_lifetime.
2018-05-30 20:29:38 +03:00
Felix S. Klock II
24abe6f363
rust-lang/rust#27282 : Add StatementKind::ReadForMatch
to MIR.
...
(This is just the data structure changes and some boilerplate match
code that followed from it; the actual emission of these statements
comes in a follow-up commit.)
2018-05-29 23:01:36 +02:00
Niko Matsakis
626818fc42
pacify the mercilous tidy
2018-05-25 04:46:42 -04:00
Niko Matsakis
01d6ed525f
restore emplacement syntax (obsolete)
2018-05-24 18:49:58 -04:00