Taylor Cramer
749349fc9f
Refactor async fn return type lowering
...
async fn now lowers directly to an existential type declaration
rather than reusing the `impl Trait` return type lowering.
As part of this, it lowers all argument-position elided lifetimes
using the in-band-lifetimes machinery, creating fresh parameter
names for each of them, using each lifetime parameter as a generic
argument to the generated existential type.
This doesn't currently successfully allow multiple
argument-position elided lifetimes since `existential type`
doesn't yet support multiple lifetimes where neither outlive
the other. This requires a separate fix.
2019-04-01 18:25:57 -07:00
Mazdak Farrokhzad
c28704c2a8
Rollup merge of #59453 - estebank:recover-tuple-parse, r=petrochenkov
...
Recover from parse error in tuple syntax
2019-03-30 07:51:36 +01:00
Mazdak Farrokhzad
fda206633d
Rollup merge of #59467 - hgallagher1993:local_branch, r=estebank
...
Better diagnostic for binary operation on BoxedValues
Fixes #59458
2019-03-29 12:32:26 +01:00
hgallagher1993
4644c3a6aa
Add check for when left and right overlap and change span for explanation to point at operator
2019-03-28 13:54:29 -04:00
Mazdak Farrokhzad
06a9196055
Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk
...
compiletest: make path normalization smarter
Fixes #59109 .
2019-03-28 13:35:43 +01:00
Esteban Küber
e3918cf621
Recover from parse error in tuple syntax
2019-03-28 04:47:37 -07:00
Josh Stone
c818c1a1d6
Rollup merge of #57565 - petrochenkov:turbowarn, r=Centril
...
syntax: Remove warning for unnecessary path disambiguators
`rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in https://github.com/rust-lang/rust/pull/43540 (where it was introduced).
One hardcoded warning less.
Closes https://github.com/rust-lang/rust/issues/58055
r? @nikomatsakis
2019-03-27 18:15:19 -07:00
hgallagher1993
4d648ce1b9
Better diagnostic for binary operation on BoxedValues
2019-03-27 13:13:09 -04:00
Mazdak Farrokhzad
b316514dbd
Rollup merge of #59150 - estebank:type-ascription, r=varkor
...
Expand suggestions for type ascription parse errors
Fix #51222 . CC #48016 , #47666 , #54516 , #34255 .
2019-03-26 09:05:39 +01:00
bors
3f36ac4e83
Auto merge of #59242 - euclio:asm-ice, r=nagisa
...
make asm diagnostic instruction optional
`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so
the instruction shouldn't be blindly unwrapped.
Reopening from #55193 . I was unable to trigger the assertion on Windows after rebasing.
Fixes #23458 .
Fixes #55216 .
2019-03-25 09:05:00 +00:00
bors
60eca54a7c
Auto merge of #59240 - euclio:struct-field-span, r=oli-obk
...
use the identifier span for missing struct field
2019-03-25 05:40:12 +00:00
Andy Russell
695dfe7dff
compiletest: make path normalization smarter
2019-03-25 01:06:45 -04:00
Andy Russell
4728433c9e
make asm diagnostic instruction optional
...
`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so
the instruction shouldn't be blindly unwrapped.
2019-03-24 12:21:03 -04:00
bors
fb5ed488ff
Auto merge of #59199 - estebank:untrack-errors, r=eddyb
...
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`
In the spirit of continuing through errors in type checking (#39275 ), remove `track_errors` from a couple of locations in the codebase.
2019-03-24 05:38:10 +00:00
Esteban Küber
59f0f2edc1
Fix span after rebase
2019-03-23 14:10:39 -07:00
Esteban Küber
0a4ecf3438
Mark duplicate import removal suggestion tool only
2019-03-23 13:05:30 -07:00
Esteban Küber
44730271f7
Hide obvious suggestion from cli output
2019-03-23 13:05:30 -07:00
Esteban Küber
3211f38828
Tweak unnecessary import suggestion
2019-03-23 13:05:30 -07:00
Esteban Küber
9bfb0ef818
Tweak unsupported negative trait bounds message
2019-03-23 13:05:30 -07:00
Esteban Küber
8e043950c8
Swap const evaluation lint spans to point at problem in primary span
2019-03-23 13:05:30 -07:00
Esteban Küber
1b0ab0b8a9
Tweak spans for E0599
2019-03-23 13:05:29 -07:00
Vadim Petrochenkov
4b382946e4
syntax: Remove warning for unnecessary path disambiguators
2019-03-23 17:20:11 +03:00
Esteban Küber
936dec8df3
Continue running after typeck_item_bodies has failed
2019-03-22 20:15:32 -07:00
Esteban Küber
d72ef21ddd
Reword type ascription note to reduce verbosity
2019-03-22 20:14:20 -07:00
Esteban Küber
44a086ef39
Review comment
2019-03-22 19:50:18 -07:00
Esteban Küber
8ba1a97e37
Expand suggestions for type ascription parse errors
2019-03-22 19:50:18 -07:00
bors
f21dee2c61
Auto merge of #58929 - estebank:elide-object, r=zackmdavis
...
Elide object safety errors on non-existent trait function
Fix #58734 .
r? @zackmdavis
2019-03-23 02:40:15 +00:00
Mazdak Farrokhzad
11429b2d13
Rollup merge of #59321 - varkor:unify-E0109-E0110-E0111, r=davidtwco
...
Unify E0109, E0110 and E0111
Error messages should no longer be restricted to specific generic kinds.
2019-03-22 19:31:33 +01:00
Mazdak Farrokhzad
225b6baae7
Rollup merge of #59190 - greg-kargin:master, r=sanxiyn
...
consistent naming for Rhs type parameter in libcore/ops
Rename RHS type parameter occurrences RHS->Rhs to make it consistent throughout files and follow naming conventions.
2019-03-22 19:31:21 +01:00
bors
a85ec7c2c0
Auto merge of #59031 - estebank:recover-from-comaless, r=petrochenkov
...
Recover from missing comma between enum variants and from bad `pub` kw
Fix #56579 . Fix #56473 .
2019-03-22 04:52:10 +00:00
bors
86466a397a
Auto merge of #58981 - estebank:elseless-if, r=davidtwco
...
Point at coercion reason for `if` expressions without else clause if caused by return type
```
error[E0317]: if may be missing an else clause
--> $DIR/if-without-else-as-fn-expr.rs:2:5
|
LL | fn foo(bar: usize) -> usize {
| ----- found `usize` because of this return type
LL | / if bar % 5 == 0 {
LL | | return 3;
LL | | }
| |_____^ expected (), found usize
|
= note: expected type `()`
found type `usize`
= note: `if` expressions without `else` must evaluate to `()`
```
Fix #25228 .
2019-03-21 23:42:41 +00:00
varkor
aff175b328
Update tests
2019-03-20 18:32:52 +00:00
bors
cd45b19bd2
Auto merge of #58872 - rep-nop:diagnostic-fix-56031, r=petrochenkov
...
Adds help message in error for invalid `impl for T` syntax
Fixes #56031 .
2019-03-18 08:03:05 +00:00
bors
817d074e54
Auto merge of #59250 - bovinebuddha:filter_ui_revision_tests, r=petrochenkov
...
Filter ui revision tests
Updates UI test output filtering to also filter away test annotations for revisions:
Previously filtered: //~ ERROR [XXXX]
Now also filters: //[revision]~ ERROR [XXXX]
I reckon, if we have the one, we should have the other for consistency, its lack was probably an oversight (the existence of revision testing is not really well documented...)
2019-03-17 23:51:18 +00:00
Mathias Blikstad
faed3a2b19
Updated UI test output to remove test annotations for revisions
2019-03-17 17:00:18 +01:00
Esteban Küber
1aa43af370
parse full visibility when recovering
2019-03-16 17:47:57 -07:00
Esteban Küber
b2b9555f95
Recover from incorrect pub kw in "reasonable" places
2019-03-16 17:47:57 -07:00
Esteban Küber
532dd4475b
Recover from missing comma between enum variants
2019-03-16 17:47:00 -07:00
Andy Russell
b392c5e3c1
use the identifier span for missing struct field
2019-03-16 13:14:01 -04:00
kennytm
464478fbbb
Rollup merge of #59118 - seanmonstar:alias-where-self-ice, r=alexreg
...
rustc: fix ICE when trait alias has bare Self
Fixes https://github.com/rust-lang/rust/issues/59029
2019-03-16 22:40:07 +08:00
kennytm
6fbd55385d
Rollup merge of #59079 - euclio:macro-semi, r=estebank
...
add suggestions to invalid macro item error
r? @estebank
2019-03-16 22:39:49 +08:00
Grigorii Kargin
7f395d2b3a
fix tests
2019-03-16 02:56:26 +03:00
Esteban Küber
d7bb98f7a1
Elide object safety errors on non-existent trait function
...
Fix #58734 .
2019-03-15 13:26:30 -07:00
Eduard-Mihai Burtescu
22d6c55cdf
rustc: print ExistentialProjection with spaces around =, e.g. dyn Foo<A = X>.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
a54a41ce47
rustc: provide DisambiguatedDefPathData in ty::print.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
4deaa69b42
rustc: print elided regions as '_ instead of nothing, and use a separate check when optional.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
6ca6c1a6cc
rustc_mir: adjust the type_length_limit diagnostic to be more useful.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
3e1cef7007
rustc: pass Option<&Substs> and Namespace around in ty::item_path.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
329b8ca818
rustc: always rely on '_ to be not printed by ty::Region itself.
2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu
1c2a3c5d79
rustc: support impl's in PrintCx::parameterized.
2019-03-15 09:26:13 +02:00