683 Commits

Author SHA1 Message Date
Manish Goregaokar
ba0e2518c8
Rollup merge of #60901 - estebank:str-str-str, r=Centril
Handle more string addition cases with appropriate suggestions
2019-05-17 11:34:12 -07:00
bors
b982867a73 Auto merge of #60171 - matthewjasper:full-nll-compare-mode, r=pnkfelix
Use -Zborrowck=mir for NLL compare mode

closes #56993

r? @pnkfelix
2019-05-17 13:01:23 +00:00
Esteban Küber
ee0bf5e6aa review comments 2019-05-16 21:09:39 -07:00
Dario Gonzalez
e84b2812ca fixed issues relating to line numbers being shifted 2019-05-16 14:29:12 -07:00
Dario Gonzalez
f2466cd166 Added ignore-sgx for appropriate tests 2019-05-16 14:29:12 -07:00
Esteban Küber
c616605005 Point at enclosing fn/closure when it's not async 2019-05-16 13:58:44 -07:00
Esteban Küber
91c36c40bd tidy fix 2019-05-16 13:58:44 -07:00
Esteban Küber
d763faf921 Parse alternative incorrect uses of await and recover 2019-05-16 13:56:44 -07:00
Matthew Jasper
be5fe051a8 Remove feature(nll) when compare mode is sufficient 2019-05-12 18:46:43 +01:00
Matthew Jasper
ff71b80a85 Change compare mode to use -Zborrowck=mir 2019-05-12 18:46:43 +01:00
Pulkit Goyal
3b78a474f3 Fix HIR printing of existential type #60662
This fixes https://github.com/rust-lang/rust/issues/60662
2019-05-12 01:50:58 +03:00
bors
7519eaca9a Auto merge of #60721 - estebank:ice-ice-baby, r=varkor
Avoid ICE by using delay_span_bug

Fix #59406, fix #53498.
2019-05-11 03:56:11 +00:00
Esteban Küber
adc18eb7cf Avoid ICE by using delay_span_bug 2019-05-10 18:22:25 -07:00
Mazdak Farrokhzad
8d1e5b8b39 Various test changes 2019-05-10 19:41:10 +02:00
Mazdak Farrokhzad
f683b6b799
Rollup merge of #60644 - estebank:abolish-ice, r=varkor
Use `delay_span_bug` for "Failed to unify obligation"

Fix #60283.
2019-05-09 00:58:32 +02:00
Mazdak Farrokhzad
d20b692756
Rollup merge of #60627 - matklad:test, r=estebank
test for #50518

It was fixed somewhere between 1.28.0 and 1.31.1

closes #50518

r? @estebank

Where's the best place to add this test? I *think* we want "compile-pass" for this test (no need to run a binary, and not running saves us a millisecond of process creation) , but there's no compile-pass anymore.

Should this be UI test with empty stdout, stderr and zero return code?
2019-05-09 00:58:28 +02:00
Esteban Küber
0fce5c1bf0 Use delay_span_bug for "Failed to unify obligation" 2019-05-08 11:42:47 -07:00
Aleksey Kladov
c87d2ccf88 test for #50518
It was fixed somewhere between 1.28.0 and 1.31.1

closes #50518
2019-05-08 13:43:43 +03:00
Taylor Cramer
fe8760cb84 Implement built-in await syntax
Adds support for .await under the existing async_await feature gate.
Moves macro-like await! syntax to the await_macro feature gate.
Removes support for `await` as a non-keyword under the `async_await`
feature.
2019-05-07 14:45:53 -07:00
Mazdak Farrokhzad
099c06465b
Rollup merge of #60517 - estebank:wording, r=davidtwco
Reword casting message

r? @davidtwco
2019-05-04 09:21:29 +02:00
Mazdak Farrokhzad
ffc33b3733
Rollup merge of #60513 - chrisvittal:remove-borrowck-compare, r=matthewjasper
Remove -Z borrowck=compare flag

This is the start of the work that needs to be done on #59193. It just removes the flag and updates
the tests.

r? @matthewjasper
2019-05-04 09:21:26 +02:00
Mazdak Farrokhzad
b4c620dc05
Rollup merge of #60449 - matthewjasper:impl-trait-outlives, r=pnkfelix
Constrain all regions in the concrete type for an opaque type

`push_outlives_components` skips some regions in a type, notably the signature
of a closure is ignored. Most of the time this is OK, but for opaque types the
concrete type is used when checking auto-trait bounds in other functions.

cc @nikomatsakis @pnkfelix

Closes #57464
Closes #60127
2019-05-04 09:21:23 +02:00
Esteban Küber
1e2af7d935 Reword casting message 2019-05-03 10:41:26 -07:00
Mazdak Farrokhzad
3ca0d36538
Rollup merge of #60388 - cramertj:elided-lifetime-async, r=nikomatsakis
Disallow non-explicit elided lifetimes in async fn

Fix https://github.com/rust-lang/rust/issues/60203

r? @nikomatsakis
2019-05-03 16:24:57 +02:00
Christopher Vittal
cfdd6ba77e Update tests 2019-05-03 03:11:37 -04:00
Matthew Jasper
d72f4de659 Constrain all regions in the concrete type for an opaque type 2019-05-02 18:56:56 +01:00
Taylor Cramer
c6e13bc20b Disallow non-explicit elided lifetimes in async fn 2019-05-01 18:34:49 -07:00
Esteban Küber
4b1297baf7 Suggest try_into when possible 2019-04-29 14:38:26 -07:00
Mazdak Farrokhzad
a4ef188ab6
Rollup merge of #60160 - xldenis:fix-overlapping-zero-width-annotation, r=estebank
Fix #58270, fix off-by-one error in error diagnostics.

This fixes #58270 by checking if two diagnostics overlap completely when we're calculating the line offset for each message.
2019-04-25 03:05:24 +02:00
Mazdak Farrokhzad
48cb6bead1
Rollup merge of #59739 - cramertj:stabilize, r=withoutboats
Stabilize futures_api

cc https://github.com/rust-lang/rust/issues/59725.
Based on https://github.com/rust-lang/rust/pull/59733 and https://github.com/rust-lang/rust/pull/59119 -- only the last two commits here are relevant.

r? @withoutboats , @oli-obk for the introduction of `rustc_allow_const_fn_ptr`.
2019-04-24 05:16:18 +02:00
bors
0928511d3a Auto merge of #58623 - Amanieu:hashbrown3, r=alexcrichton
Replace HashMap implementation with SwissTable (as an external crate)

This is the same as #56241 except that it imports `hashbrown` as an external crate instead of copying the implementation into libstd.

This includes a few API changes (all unstable):
- `try_reserve` is added to `HashSet`.
- Some trait bounds have been changed in the `raw_entry` API.
- `search_bucket` has been removed from the `raw_entry` API (doesn't work with SwissTable).
2019-04-24 00:20:56 +00:00
Taylor Cramer
3f966dcd53 Stabilize futures_api 2019-04-23 16:13:53 -07:00
Amanieu d'Antras
9325451ec9 Fix test 2019-04-24 06:54:14 +08:00
Mazdak Farrokhzad
d1b2d6d64d
Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytm
Warn when ignore-tidy-linelength is present, but no lines are too long

It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
2019-04-23 21:50:57 +02:00
varkor
497dcfa221 Update ui tests 2019-04-23 11:42:14 +01:00
varkor
62838975d0 Remove unnecessary ignore-tidy-linelength 2019-04-23 11:42:14 +01:00
bors
31f5d69ba4 Auto merge of #60125 - estebank:continue-evaluating, r=oli-obk
Don't stop evaluating due to errors before borrow checking

r? @oli-obk

Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-23 09:38:34 +00:00
bors
0f11354a9c Auto merge of #60172 - varkor:tidy-double-trailing-newline, r=kennytm
Disallow double trailing newlines in tidy

This wasn't done previously in https://github.com/rust-lang/rust/pull/47064#issuecomment-354533010 as it affected too many files, but I think it's best to fix it now so that the number of files with double trailing newlines doesn't keep increasing.

r? kennytm
2019-04-23 06:40:12 +00:00
Xavier Denis
4a073dda93 Fix #58270, fix off-by-one error in error diagnostics. 2019-04-22 18:14:45 -05:00
Esteban Küber
6e723c24a8 Never stop due to errors before borrow checking 2019-04-22 13:11:53 -07:00
Esteban Küber
45bbd14db4 Continue evaluating after item-type checking 2019-04-22 11:31:35 -07:00
varkor
7f0f0e31ec Remove double trailing newlines 2019-04-22 16:57:01 +01:00
Matthew Jasper
8eef102270 update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
bors
6c22051411 Auto merge of #60073 - rchaser53:issue-60049, r=estebank
avoid type-check body of DefId

fix: #60049
related: PR #59798
2019-04-19 07:03:12 +00:00
rchaser53
0ce131b192 avoid type-check body of DefId 2019-04-19 04:34:54 +00:00
Mazdak Farrokhzad
37f835cd18
Rollup merge of #60064 - estebank:issue-59980, r=varkor
Point at try `?` on errors affecting the err match arm of the desugared code

Fix #59980.
2019-04-19 06:03:23 +02:00
Mazdak Farrokhzad
aa58242b28
Rollup merge of #60061 - estebank:field-sugg, r=davidtwco
Change suggestion of field when not in self context

Fix #60057.
2019-04-19 06:03:21 +02:00
Mazdak Farrokhzad
2d6150a762
Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebank
Correct unused parameter diagnostic

The message was incorrect for unused lifetime parameters. There's no need to be specific.
2019-04-19 06:03:17 +02:00
Esteban Küber
6aa4c992bc Suggest appropriate path when calling associated item on bare types
When looking at the documentation for `std::f32` or `std::str`, for
example, it is easy to get confused and assume `std::f32` and `f32`
are the same thing. Because of this, it is not uncommon to attempt
writing `f32::consts::PI` instead of the correct
`std::f32::consts::PI`. When encountering the former, which results
in an access error due to it being an inexistent path, try to access
the same path under `std`. If this succeeds, this information is
stored for later tweaking of the final E0599 to provide an
appropriate suggestion.

This suggestion applies to both E0233 and E0599 and is only checked
when the first ident of a path corresponds to a primitive type.
2019-04-18 19:18:26 -07:00
Esteban Küber
2f4035d27e Fix rebase 2019-04-18 18:57:16 -07:00