about summary refs log tree commit diff
path: root/src/test/ui/suggestions
AgeCommit message (Collapse)AuthorLines
2019-03-24Provide suggestion when using field access instead of pathEsteban Küber-0/+24
When trying to access an associated constant as if it were a field of an instance, provide a suggestion for the correct syntax.
2019-03-24Add nll testEsteban Küber-0/+24
2019-03-24When moving out of a for loop head, suggest borrowing itEsteban Küber-0/+34
When encountering code like the following, suggest borrowing the for loop head to avoid moving it into the for loop pattern: ``` fn main() { let a = vec![1, 2, 3]; for i in &a { for j in a { println!("{} * {} = {}", i, j, i * j); } } } ```
2019-03-22review commentsEsteban Küber-1/+1
2019-03-22Add suggestion to use `&*var` when `&str: From<String>` is expectedEsteban Küber-0/+23
2019-03-22Hide "type ascription is experimental error" unless it's the only oneEsteban Küber-24/+5
In order to minimize the verbosity of common syntax errors that are parsed as type ascription, hide the feature gate error unless there are no other errors being emitted by the parser.
2019-03-22Only suggest let assignment for type ascription if we find an equals signEsteban Küber-9/+3
2019-03-22Tweak labelsEsteban Küber-5/+1
2019-03-22Expand suggestions for type ascription parse errorsEsteban Küber-0/+108
2019-03-22Auto merge of #59035 - estebank:closure-instacall, r=davidtwcobors-0/+19
When encountering `||{}()`, suggest the likely intended `(||{})()` Fix #55851.
2019-03-18filter suggestions from extern preludeAndy Russell-0/+23
2019-03-12Suggest adding lifetime to struct fieldEsteban Küber-3/+11
2019-03-12review commentsEsteban Küber-2/+2
2019-03-12Suggest return lifetime when there's only one named lifetimeEsteban Küber-0/+27
2019-03-11Update testsVadim Petrochenkov-48/+48
2019-03-08When encountetring `||{}()`, suggest the likely intended `(||{})()`Esteban Küber-0/+19
2019-03-08Rollup merge of #58883 - estebank:unused-closure-arg, r=varkorPietro Albini-0/+40
Suggest appropriate code for unused field when destructuring pattern Fix #56472.
2019-03-08Rollup merge of #58877 - estebank:macro-borrow, r=davidtwcoPietro Albini-0/+33
Suggest removal of `&` when borrowing macro and appropriate Fix #58815.
2019-03-04On return type `impl Trait` for block with no expr point at last semiEsteban Küber-0/+20
2019-03-02Suggest appropriate code for unused field when desrtucturing pattternEsteban Küber-0/+40
Fix #56472.
2019-03-02Suggest removal of `&` when borrowing macro and appropriateEsteban Küber-0/+33
Fix #58815.
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