about summary refs log tree commit diff
path: root/src/test/ui/suggestions
AgeCommit message (Collapse)AuthorLines
2020-02-05Use spans for input borrowed types unrelated to return typeEsteban Küber-2/+10
2020-02-04When suggesting associated fn with type parameters, include in the ↵Esteban Küber-0/+113
structured suggestion
2020-02-04Rollup merge of #68819 - estebank:split_at_mut, r=oli-obkDylan DPC-0/+23
Suggest `split_at_mut` on multiple mutable index access cc #58792.
2020-02-04Auto merge of #68377 - estebank:fn-obligations-spans, r=oli-obkbors-15/+191
Tweak obligation error output - Point at arguments or output when fn obligations come from them, or ident when they don't - Point at `Sized` bound (fix #47990) - When object unsafe trait uses itself in associated item suggest using `Self` (fix #66424, fix #33375, partially address #38376, cc #61525) - Point at reason in object unsafe trait with `Self` in supertraits or `where`-clause (cc #40533, cc #68377) - On implicit type parameter `Sized` obligations, suggest `?Sized` (fix #57744, fix #46683)
2020-02-03Suggest `split_at_mut` on multiple mutable index accessEsteban Küber-0/+23
2020-02-03Auto merge of #67668 - matthewjasper:or-patterns, r=pnkfelixbors-25/+56
Implement MIR lowering for or-patterns This is the last thing needed to get meaningful run-pass tests for or-patterns. There probably need to be more tests before stabilizing this, but the most important cases should have been covered. Note: we can generate exponentially large MIR CFGs when using or-patterns containing bindings, type ascriptions, or that are for a match arm with a guard. `src/test/mir-opt/exponential-or.rs` shows the best case for what we currently do. cc #54883 closes #60350 closes #67514 cc @Centril r? @pnkfelix
2020-02-02Deal with spans showing `std` libEsteban Küber-1/+6
Address #53081
2020-02-02add tests for structured suggestionEsteban Küber-0/+103
2020-02-02Use more appropriate spans on object unsafe traits and provide structured ↵Esteban Küber-1/+4
suggestions when possible
2020-02-02Wording changes to object unsafe trait errorsEsteban Küber-2/+8
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02Point at `Sized` requirementsEsteban Küber-0/+5
Make #47990 easier to understand
2020-02-02Slight rewording of diagnostic messageEsteban Küber-1/+1
2020-02-02Use more accurate failed predicate spansEsteban Küber-14/+7
2020-02-02Tweak `Self: Sized` restriction diagnostic outputEsteban Küber-2/+0
2020-02-02review commentsEsteban Küber-2/+2
2020-02-02When object unsafe trait uses itself in associated item suggest using `Self`Esteban Küber-0/+63
2020-02-02parser: address review comments re. `self`.Mazdak Farrokhzad-0/+4
2020-02-01Update existing tests for or-patternsMatthew Jasper-25/+56
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-2/+2
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-26Suggest defining type parameter when appropriateEsteban Küber-0/+4
``` error[E0412]: cannot find type `T` in this scope --> file.rs:3:12 | 3 | impl Trait<T> for Struct {} | - ^ not found in this scope | | | help: you might be missing a type parameter: `<T>` ``` Fix #64298.
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-23use `diagnostic_item` and modify wordingEsteban Küber-1/+1
2020-01-21Suggest borrowing `Vec<NonCopy>` in for loopEsteban Küber-0/+42
Partially address #64167.
2020-01-11Auto merge of #65912 - estebank:variants-orig, r=petrochenkovbors-4/+13
Point at the span for the definition of crate foreign ADTs Follow up to #65421. Partially addresses #65386. Blocked on #53081.
2020-01-11Rollup merge of #68014 - estebank:unify-e0599, r=cramertjYuki Okushi-34/+34
Unify output of "variant not found" errors Fix #49566.
2020-01-10Ignore platforms that can't point to stdEsteban Küber-6/+10
2020-01-10Use `def_span` to minimize definition span to first line when possibleEsteban Küber-1/+1
2020-01-10Point at the span for the definition of crate foreign ADTsEsteban Küber-0/+5
2020-01-10Rollup merge of #66463 - estebank:point-at-closure-and-opaque-types, r=CentrilMazdak Farrokhzad-1/+4
Point at opaque and closure type definitions in type errors Fixes #57266, fixes #67117.
2020-01-08review commentsEsteban Küber-2/+2
2020-01-08Point at opaque and closure type definitions in type errorsEsteban Küber-1/+4
2020-01-08Unify output of "variant not found" errorsEsteban Küber-34/+34
2020-01-09Rollup merge of #67849 - cjkenn:check-sorted-words, r=estebankYuki Okushi-0/+13
Add a check for swapped words when we can't find an identifier Fixes #66968 Couple things here: 1. The matches take the precedence of case insensitive match, then levenshtein match, then swapped words match. Doing this allows us to not even check for swapped words unless the other checks return `None`. 2. I've assumed that the swapped words check is not held to the limits of the max levenshtein distance threshold (ie. we want to try and find a match even if the levenshtein distance is very high). This means that we cannot perform this check in the `fold` that occurs after the `filter_map` call, because the candidate will be filtered out. So, I've split this into two separate `fold` calls, and had to collect the original iterator into a vec so it can be copied (I don't think we want to change the function signature to take a vec or require the `Copy` trait). An alternative implemenation may be to remove the `filter_map`, `fold` over the entire iterator, and do a check against `max_dist` inside the relevant cases there. r? @estebank
2020-01-05Add backticks to various diagnosticsvarkor-3/+3
2020-01-04add ui testcjkenn-0/+13
2019-12-31parser::pat: remove .fatal callsMazdak Farrokhzad-1/+2
2019-12-24Account for multiple trait bounds with missing associated typesEsteban Küber-2/+2
2019-12-24Tweak errors for missing associated types and type parametersEsteban Küber-6/+3
2019-12-21Update tests for GATsMatthew Jasper-10/+3
* Make some run-pass or check-pass * Use `#![allow(incomplete_features)]` * Update FIXMEs now that some of the issues have been addressed * Add regression tests
2019-12-12Don't suggest wrong snippet in closureYuki Okushi-0/+34
2019-12-03Accurately portray raw identifiers in error messagesEsteban Küber-2/+2
When refering to or suggesting raw identifiers, refer to them with `r#`. Fix #65634.
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-106/+19
Various tweaks to diagnostic output
2019-11-25Tweak move error due to non-CopyEsteban Küber-106/+19
2019-11-24Auto merge of #66592 - estebank:raw-raw-ah-ah-ah, r=cramertjbors-0/+45
Rework raw ident suggestions Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion. Fix #66126.
2019-11-23Rework raw ident suggestionsEsteban Küber-0/+45
Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion.
2019-11-21Point at type in `let` assignment on type errorsEsteban Küber-86/+118
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-128/+78
Specific labels when referring to "expected" and "found" types
2019-11-19Rollup merge of #66239 - estebank:suggest-async-closure-call, r=CentrilMazdak Farrokhzad-3/+42
Suggest calling async closure when needed When using an async closure as a value in a place that expects a future, suggest calling the closure. Fix #65923.
2019-11-18Surround types with backticks in type errorsEsteban Küber-37/+37
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-53/+3