Commit Graph

10 Commits

Author SHA1 Message Date
Eric Holk
0cb769347d Code review feedback
Add a note about `IntoFuture` in error messages where T is not a future.

Change await-into-future.rs to be a run-pass test.
2021-12-02 11:36:56 -08:00
Matthew Jasper
022c148fcd Fix tests from rebase 2020-10-06 11:19:33 +01:00
Matthew Jasper
5b279c8016 Check opaque types satisfy their bounds 2020-10-06 11:19:30 +01:00
Dan Aloni
07e7823c01 pretty: trim paths of unique symbols
If a symbol name can only be imported from one place for a type, and
as long as it was not glob-imported anywhere in the current crate, we
can trim its printed path and print only the name.

This has wide implications on error messages with types, for example,
shortening `std::vec::Vec` to just `Vec`, as long as there is no other
`Vec` importable anywhere.

This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.

On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.

This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
2020-09-02 22:26:37 +03:00
Nell Shamrell
5e28eb580f Adds a clearer message for when the async keyword is missing from a function
Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
2020-06-25 16:01:45 -07:00
John Kåre Alsaker
47a84f2170 Update tests 2020-03-23 19:31:41 +01:00
Niko Matsakis
3f277e1a66 s/async fn/async fn/ 2019-10-02 14:39:44 -04:00
Niko Matsakis
dce20bf62a WIP fix tests 2019-10-02 14:17:38 -04:00
Mazdak Farrokhzad
21476e7d6c --bless post no async_await gates in tests. 2019-08-20 03:08:42 +02:00
Aaron Hill
779308a5e1 Improve error span for async type inference error
Fixes #62382

Previously, we would point at the spawn of the 'await' expression,
instead of the actual expression with an unknown type.
2019-07-04 14:22:47 -04:00