Commit Graph

51 Commits

Author SHA1 Message Date
Josh White
8b77f8688e performed --bless of 15 ui tests affected 2020-02-07 12:44:31 -05:00
Esteban Küber
92505df338 Account for fn() types in lifetime suggestions 2020-02-05 10:32:01 -08:00
Esteban Küber
ba3b44c508 Account for '_ in suggestions 2020-02-05 10:32:01 -08:00
Esteban Küber
2100b31535 review comments 2020-02-05 10:32:01 -08:00
Esteban Küber
fa4594196d Suggest 'r instead of 'lifetime 2020-02-05 10:32:01 -08:00
Esteban Küber
7e1464336a When suggesting lifetimes, propose adding the new lifetime to all arguments 2020-02-05 10:32:01 -08:00
Esteban Küber
70dbf5526d Use spans for input borrowed types unrelated to return type 2020-02-05 10:32:01 -08:00
Esteban Küber
2102723887 review comments 2020-01-19 17:31:34 -08:00
Esteban Küber
78d3ea5484 When encountering an expected named lifetime and none are present, suggest adding one 2020-01-19 17:31:33 -08:00
Aaron Hill
168e35d569 Include a span in more expected...found notes
In most places, we use a span when emitting `expected...found` errors.
However, there were a couple of places where we didn't use any span,
resulting in hard-to-interpret error messages.

This commit attaches the relevant span to these notes, and additionally
switches over to using `note_expected_found` instead of manually
formatting the message
2019-12-03 23:13:10 -05:00
Dylan MacKenzie
ae2293837e Change some tests to use the shorter comment style 2019-11-21 14:09:18 -08:00
Guillaume Gomez
ffc1c5a04d Update ui tests 2019-11-07 13:02:34 +01:00
Guillaume Gomez
96efaad342 update ui tests 2019-10-07 17:12:54 +02:00
David Wood
5e3b41e0cb rustc: remove HirId from ArgSource::AsyncFn
This commit removes the `HirId` from `ArgSource::AsyncFn`, relying on
the fact that only `simple_ident` is used in each of the locations that
previously took the original pattern from the `ArgSource::AsyncFn`.
2019-06-03 14:02:21 +01:00
memoryruins
eb4580a570 Update ui test suite to use dyn 2019-05-29 00:57:31 -04:00
Matthew Jasper
ff71b80a85 Change compare mode to use -Zborrowck=mir 2019-05-12 18:46:43 +01:00
Andy Russell
b6f148c8bd hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04: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
Vadim Petrochenkov
fa72a81bea Update tests 2019-03-11 23:10:26 +03:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Oliver Scherer
61efc3b71b Update tests 2018-12-04 10:06:05 +01:00
Pietro Albini
f50e285e30 Rollup merge of #55173 - estebank:suggest-static, r=oli-obk
Suggest appropriate syntax on missing lifetime specifier in return type

Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.

Fix #55170.
2018-10-25 14:31:03 +02:00
Esteban Küber
d0bd69a2d5 review comments 2018-10-22 14:56:02 -07:00
Esteban Küber
e1e52eb5a0 Suggest appropriate syntax on missing lifetime specifier in return type
Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.
2018-10-22 14:54:29 -07:00
Scott McMurray
18f7db3d69 impl<'_> IceCube<'_> {} is now only one error in both editions 2018-10-19 22:57:41 -07:00
Scott McMurray
ae130b0889 Move an underscore-lifetime error test to an IHLE success test 2018-10-19 22:26:01 -07:00
bors
42dde960f9 Auto merge of #55162 - nikomatsakis:issue-54902-underscore-bound, r=tmandry
handle underscore bounds in unexpected places

Per the discussion on #54902, I made it a hard error to use lifetime bounds in various places where they used to be permitted:

- `where Foo: Bar<'_>` for example

I also moved error reporting to HIR lowering and added `Error` variants to let us suppress downstream errors that result.

I (imo) improved the error message wording to be clearer, as well.

In the process, I fixed the ICE in #52098.

Fixes #54902
Fixes #52098
2018-10-19 22:54:14 +00:00
Niko Matsakis
c294ec640b add more to the ERROR messages 2018-10-19 16:44:01 -04:00
Niko Matsakis
df8adb53c9 fix error messages 2018-10-19 16:41:29 -04:00
Niko Matsakis
1f4d100472 move E0637 to lowering and improve output, add more tests 2018-10-17 17:15:24 -04:00
David Wood
539404b77d Update output for borrowck=migrate compare mode.
This commit updates the test output for the updated NLL compare mode
that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The
previous commit changes `compiletest` and this commit only updates
`.nll.stderr` files.
2018-10-17 00:57:32 +02:00
Matthew Jasper
bd0895d7d0 Update ui tests 2018-09-19 20:50:09 +01:00
Wesley Wiser
b1211e8703 Fix tests 2018-09-06 22:57:05 -04:00
Basile Desloges
b01550a718 Update tests 2018-09-01 12:58:18 +02:00
Matthew Jasper
7f7fadaee6 Also use smaller spans for unsize adjustments 2018-08-27 12:36:49 +01:00
Matthew Jasper
371c23fe34 Update tests 2018-08-14 20:35:47 +01:00
David Wood
3fc7ab2373 Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
Niko Matsakis
0d918a8575 improve heuristics for what makes an interesting constraint 2018-07-25 16:36:03 +03:00
Niko Matsakis
a6adb1ebff find and highlight the & or '_ in region_name 2018-07-09 00:20:36 -04:00
Niko Matsakis
727f01700b write code to extract region names and emit new style message 2018-07-04 05:09:33 -04:00
David Wood
a11245f80e Ensure that changed errors are lower case. 2018-07-01 16:14:25 +01:00
David Wood
59e64e9085 Updated affected tests. 2018-07-01 16:14:25 +01:00
Zack M. Davis
4b1808578a add dyn to display of dynamic (trait) type names
The `dyn Trait` syntax was stabilized in 199ee327. Resolves #49277.
2018-06-23 18:10:25 -07:00
Christian Poveda
b80472d84c fixed tests 2018-04-27 11:02:36 -05:00
Christian Poveda
4bf35f93c9 updated stderr files and removed feature-gate test for dyn_trait 2018-04-27 10:05:51 -05:00
Christian Poveda
0efb5677d7 dyn_trait feature-gate just for stage0 2018-04-27 10:04:58 -05:00
Felix S. Klock II
032081cdff Trivial updates to .nll.stderr files post-rebase, reflecting s/-Znll/nll/ in messages. 2018-04-18 15:37:23 +02:00
Felix S. Klock II
746d63a203 Checkpoint the current status of NLL on ui tests via compare-mode=nll. 2018-04-11 00:38:35 +02:00
Taylor Cramer
e6e6bd27d5 Stabilize underscore lifetimes 2018-03-29 00:27:50 +02:00
Niko Matsakis
d913af8691 add new test for dyn<Trait + '_> used in a struct
`'_` is illegal in structs; this currently gets a duplicate error
2018-03-22 16:54:51 -04:00