Patryk Wychowaniec
a8d34c1062
Improve reporting errors and suggestions for trait bounds
2020-02-09 10:33:47 +01:00
Esteban Küber
413bfa4b98
Wording changes to object unsafe trait errors
...
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02 11:53:10 -08:00
Esteban Küber
144e259445
Slight rewording of diagnostic message
2020-02-02 11:53:10 -08:00
Esteban Küber
4b2f1db6e4
Tweak Self: Sized
restriction diagnostic output
2020-02-02 11:52:34 -08:00
Esteban Küber
0dcdbaec0b
Point at the def span of trait refs E0277
2020-01-08 09:30:27 -08:00
Donough Liu
751fe7c43d
Add error code explanation for E0477
2019-12-30 14:41:46 +08:00
Esteban Küber
7a2f3ee73f
Account for rustc_on_unimplemented
2019-11-16 13:23:19 -08:00
Esteban Küber
f57413b717
Suggest borrowing when it would satisfy an unmet trait bound
...
When there are multiple implementors for the same trait that is present
in an unmet binding, modify the E0277 error to refer to the parent
obligation and verify whether borrowing the argument being passed in
would satisfy the unmet bound. If it would, suggest it.
2019-11-16 13:23:19 -08:00
bors
4a8c5b20c7
Auto merge of #57545 - bovinebuddha:object_safe_for_dispatch, r=nikomatsakis
...
Object safe for dispatch
cc #43561
2019-10-23 13:34:27 +00:00
Mathias Blikstad
ef5acdeceb
RFC 2027: "first draft" of implementation
...
These are a squashed series of commits.
2019-10-22 15:24:33 -04:00
Esteban Küber
daa8491648
Update NLL tests
2019-10-15 13:55:44 -07:00
Esteban Küber
190589f8a7
Use structured suggestion for restricting bounds
...
When a trait bound is not met and restricting a type parameter would
make the restriction hold, use a structured suggestion pointing at an
appropriate place (type param in param list or `where` clause).
Account for opaque parameters where instead of suggesting extending
the `where` clause, we suggest appending the new restriction:
`fn foo(impl Trait + UnmetTrait)`.
2019-10-15 13:55:43 -07:00
Esteban Küber
ff75124a37
fix nll tests
2019-09-22 11:54:38 -07:00
Esteban Küber
3ea0d10979
hack to avoid incorrect suggestion
2019-09-22 11:33:13 -07:00
Esteban Küber
4be51c879e
Point at type param when it's cause of unfulfilled obligation
2019-09-22 11:33:13 -07:00
Esteban Küber
b370c111fd
On obligation errors point at the unfulfilled binding when possible
2019-09-22 11:33:12 -07:00
Esteban Küber
02e3fb89a7
When possible point at argument causing item obligation failure
2019-09-19 12:10:23 -07:00
Esteban Küber
aee6cd937a
Fix nll tests
2019-08-31 13:40:20 -07:00
Esteban Küber
444bc3ca66
Use span label instead of note for cause in E0631
2019-08-31 00:14:23 -07: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
Vadim Petrochenkov
fa72a81bea
Update tests
2019-03-11 23:10:26 +03:00
Matthias Krüger
68860989eb
remove remaining copyright headers
2018-12-28 21:50:33 +01:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07: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
Basile Desloges
b01550a718
Update tests
2018-09-01 12:58:18 +02:00
David Wood
3fc7ab2373
Merged migrated compile-fail tests and ui tests. Fixes #46841 .
2018-08-14 11:12:09 +02:00