Andy Russell
9f88d75710
reword "possible candidate" import suggestion
2020-05-07 00:33:25 -04:00
Esteban Küber
854b78fe22
Normalize wording of privacy access labels
2020-03-22 15:36:54 -07:00
Vadim Petrochenkov
28c3f6eb40
resolve: Point at the private item definitions in privacy errors
2020-01-16 21:59:11 +03:00
Esteban Küber
b26ddb8af3
Point at local similarly named element and tweak references to variants
...
Point at the span for the definition of ADTs internal to the current
crate.
Look at the leading char of the ident to determine whether we're
expecting a likely fn or any of a fn, a tuple struct or a tuple variant.
Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-27 11:50:43 -07:00
Esteban Küber
0baf61bfdb
Increase spacing for suggestions in diagnostics
...
Make the spacing between the code snippet and verbose structured
suggestions consistent with note and help messages.
2019-10-24 12:26:01 -07:00
Dan Aloni
9d11bda8dd
resolve: shorten wording on private constructor error
2019-10-11 22:18:07 +03:00
Dan Aloni
7140c024c2
resolve: fix error title regarding private constructors
...
The constructor is private, not the type.
Idea credit to @petrochenkov, discussed at #65153
2019-10-11 18:09:23 +03:00
Vadim Petrochenkov
48f8beddd8
resolve: Use field spans for reporting the private constructor error
2019-10-09 18:07:22 +03:00
Esteban Küber
2ae9016553
Point at definition when misusing ADT
...
When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at
`Foo`'s definition in the error.
2019-09-22 11:27:55 -07:00
Esteban Küber
b9865d9e3f
Mention that tuple structs are private if their fields are
2019-08-09 12:52:02 -07:00
Andy Russell
b6f148c8bd
hide --explain
hint if error has no extended info
2019-04-18 13:29:28 -04:00
David Wood
48b0c9da69
Only suggest imports if not imported.
...
This commit modifies name resolution error reporting so that if a name
is in scope and has been imported then we do not suggest importing it.
This can occur when we add a label about constructors not being visible
due to private fields. In these cases, we know that the struct/variant
has been imported and we should silence any suggestions to import the
struct/variant.
2019-02-11 19:29:10 +01:00
Andy Russell
404ad50d14
clarify resolve typo suggestion
...
Include the kind of the binding that we're suggesting, and use a
structured suggestion.
2019-01-09 14:11:00 -05:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Vadim Petrochenkov
acdbd0643c
resolve: More precise spans for privacy errors
2018-10-28 02:56:12 +03:00
Guillaume Gomez
2e104a77cf
update tests
2018-03-14 00:53:24 +01:00
Vadim Petrochenkov
7ba5fd168a
Update UI tests
2018-02-26 20:24:42 +03:00
Vadim Petrochenkov
fa2d9fc4b9
Update UI tests
2018-02-26 20:24:02 +03:00
Guillaume Gomez
5747fd6611
Update ui tests
2018-02-25 12:15:05 +01:00
Esteban Küber
4a7691692c
Further tweaks to the output
...
- Properly address Variant Ctors
- Show signature if span of trait method without `self` is not available
2018-01-15 12:35:15 -08:00
Esteban Küber
a317da42b1
Suggest the correct syntax for different struct types
2018-01-15 02:03:02 -08:00
Esteban Küber
9bab0f09d3
Hide suggestion to use struct ctor when it is not visible
2018-01-15 02:03:02 -08:00
Vadim Petrochenkov
1f5b201aff
Remove NOTE/HELP annotations from UI tests
2017-12-14 23:26:39 +03:00
Oliver Schneider
8937d6a6cf
Merge cfail and ui tests into ui tests
2017-11-24 11:32:35 +01:00
Oliver Schneider
47c7e430d3
Remove left over dead code from suggestion diagnostic refactoring
2017-11-16 16:36:49 +01:00
Oliver Schneider
74748b11bb
WIP: don't suggest placing use
statements into expanded code
2017-08-31 15:45:16 +02:00
Oliver Schneider
e0ba29c413
Improve placement of use
suggestions
2017-08-17 18:16:15 +02:00
gaurikholkar
26a8357f5c
reorder span labels
2017-07-18 00:07:37 +05:30
Esteban Küber
697c85a4f1
Only underline suggestion if it is not the only code being shown
2017-07-06 14:36:49 -07:00
Esteban Küber
eb478e2381
Add extra whitespace for suggestions
2017-07-06 14:36:48 -07:00
Esteban Küber
7c84914635
Make suggestion include the line number
...
When there're more than one suggestions in the same diagnostic, they are
displayed in their own block, instead of inline. In order to reduce
confusion, those blocks now display the line number.
2017-07-06 14:36:48 -07:00
Ariel Ben-Yehuda
77f4022303
Revert "Change error count messages"
...
This reverts commit 5558c64f33
.
2017-07-02 13:49:30 +03:00
Guillaume Gomez
6675bb3e73
Add E0603 error code
2017-06-02 21:40:22 +02:00
Michael Kohl
5558c64f33
Change error count messages
...
See #33525 for details.
2017-05-24 16:14:38 +07:00
Oliver Schneider
e2f781c7ea
Example usage of multiple suggestions
2017-05-10 13:20:27 +02:00
Freyskeyd
0d7e6cf900
refac Move levenchstein before context dependent check
...
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2017-04-28 20:40:11 +02:00
Taylor Cramer
28626ca5b1
Stabilize pub(restricted)
2017-03-15 22:39:04 -07:00
Vadim Petrochenkov
d38a8ad488
Improve diagnostics for inaccessible constructors
2017-01-29 02:57:14 +03:00