summary refs log tree commit diff
path: root/src/test/ui/suggestions
AgeCommit message (Collapse)AuthorLines
2019-02-13suggestion-diagnostics: as_ref improve snippetDan Robertson-8/+8
Improve the code snippet suggested in suggestion-diagnostics when suggesting the use of as_ref.
2019-02-07Update testsvarkor-114/+97
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-01-27add typo suggestion to unknown attribute errorAndy Russell-0/+40
2019-01-25Combining move lifetime and type suggestions.David Wood-5/+106
This commit combines the move lifetime and move type suggestions so that when rustfix applies them they don't conflict with each other.
2019-01-25Suggestion moving types before associated types.David Wood-0/+91
This commit extends existing suggestions to move lifetimes before types in generic arguments to also suggest moving types behind associated type bindings.
2019-01-24Rollup merge of #57795 - estebank:did-you-mean, r=zackmdavisMazdak Farrokhzad-9/+3
Use structured suggestion in stead of notes
2019-01-24Rollup merge of #57779 - estebank:recover-struct-fields, r=davidtwcoMazdak Farrokhzad-0/+53
Recover from parse errors in literal struct fields and incorrect float literals Fix #52496.
2019-01-20Use structured suggestion in stead of notesEsteban Küber-9/+3
2019-01-20Extend incorrect float literal recovery to account for suffixesEsteban Küber-0/+53
2019-01-19Suggest correct cast for struct fields with shorthand syntaxEsteban Küber-0/+96
2019-01-18Fix suggestions given mulitple bad lifetimesDan Robertson-2/+2
When given multiple lifetimes prior to type parameters in generic parameters, do not ICE and print the correct suggestion.
2019-01-13Recover from item trailing semicolonEsteban Küber-0/+66
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-1/+1
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-31Auto merge of #57047 - euclio:field-structured-suggestions, r=estebankbors-3/+3
use structured suggestions for nonexistent fields r? @estebank
2018-12-31use structured suggestions for nonexistent fieldsAndy Russell-3/+3
2018-12-28Suggest `.as_ref()` when appropriate for `Option` and `Result`Esteban Küber-0/+106
2018-12-25Remove licensesMark Rousskov-324/+214
2018-12-16Rollup merge of #56761 - estebank:path-display, r=zackmdavisMazdak Farrokhzad-0/+21
Suggest using `.display()` when trying to print a `Path` Fix #38997.
2018-12-13Wording changesEsteban Küber-2/+2
2018-12-12Suggest using `.display()` when trying to print a `Path`Esteban Küber-0/+21
2018-12-12Account for `impl Trait` when suggesting lifetimeEsteban Küber-0/+55
2018-12-04Update ui testsOliver Scherer-12/+12
2018-12-04Update testsOliver Scherer-22/+27
2018-11-29Rollup merge of #56220 - estebank:suggest-lifetime-move, r=nikomatsakisGuillaume Gomez-0/+63
Suggest appropriate place for lifetime when declared after type arguments
2018-11-26Emit one diagnostic for multiple misplaced lifetimesEsteban Küber-3/+19
2018-11-25Move lifetimes before the *first* type argumentEsteban Küber-2/+2
2018-11-25Suggest appropriate place for lifetime when declared after type argumentsEsteban Küber-0/+47
2018-11-24Suggest correct enum variant on typoEsteban Küber-0/+35
2018-11-22Reword and fix testEsteban Küber-3/+3
2018-11-22Suggest correct syntax when writing type arg instead of assoc typeEsteban Küber-0/+39
When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
2018-11-10in which the E0618 "expected function" diagnostic gets a makeoverZack M. Davis-0/+24
Now the main span focuses on the erroneous not-a-function callee, while showing the entire call expression is relegated to a secondary span. In the case where the erroneous callee is itself a call, we point out the definition, and, if the call expression spans multiple lines, tentatively suggest a semicolon (because we suspect that the "outer" call is actually supposed to be a tuple). The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is only called by `check_call`, which is only called with a first arg of kind `ExprKind::Call` in `check_expr_kind`). Resolves #51055.
2018-10-18Auto merge of #54979 - estebank:path-unsized, r=nikomatsakisbors-0/+21
Custom E0277 diagnostic for `Path` r? @nikomatsakis we have a way to target `Path` exclusively, we need to identify the correct text to show to consider #23286 fixed.
2018-10-10Custom E0277 diagnostic for `Path`Esteban Küber-0/+21
2018-10-09Reword `rustc_on_unimplemented` errors for `Iterator`Esteban Küber-9/+9
- Detect one element array of `Range` type, which is potentially a typo: `for _ in [0..10] {}` where iterating between `0` and `10` was intended. (#23141) - Suggest `.bytes()` and `.chars()` for `String`. - Suggest borrowing or `.iter()` on arrays (#36391) - Suggest using range literal when iterating on integers (#34353) - Do not suggest `.iter()` by default (#50773, #46806)
2018-08-15Split tests more and bless them againashtneoi-602/+653
2018-08-15Move tests into their own directoryashtneoi-0/+0
2018-08-15Re-bless testashtneoi-0/+63
2018-08-15Test move-into-Fn/FnMut errors tooashtneoi-2/+530
2018-08-15Add another FIXME about suggestionsashtneoi-81/+83
2018-08-15Bless UI testsashtneoi-21/+21
2018-08-15Test patterns in tuplesashtneoi-71/+249
2018-08-15Coalesce var-is-not-Copy notes per moveashtneoi-141/+40
2018-08-15Dedup suggestionsashtneoi-102/+643
2018-08-15Remove unnecessary underscoreashtneoi-7/+7
2018-08-15Change TODOs to FIXMEsashtneoi-9/+9
2018-08-15Make move errors more consistent with typeck errorsashtneoi-22/+22
2018-08-15Make move error suggestions clearerashtneoi-80/+80
2018-08-15Add backquotes around variable nameashtneoi-51/+51
2018-08-15Fix move errors for index expressionsashtneoi-17/+44
The suggestion logic gave up too early, which kept it from suggesting borrowing index expressions.
2018-08-15Test move errors for index expressionsashtneoi-80/+313