about summary refs log tree commit diff
path: root/src/test/ui/kindck
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-808/+0
2022-12-05Tweak "the following other types implement trait"Esteban Küber-20/+2
When *any* of the suggested impls is an exact match, *only* show the exact matches. This is particularly relevant for integer types. fix fmt
2022-08-21Adjust messages, address some nitsMichael Goulet-4/+4
2022-08-21Rework point-at-argMichael Goulet-18/+20
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-18/+18
2022-07-16Use typeck_results to avoid duplicate ast_ty_to_ty callMichael Goulet-4/+4
2022-07-07Shorten span for closures.Camille GILLOT-3/+3
2022-06-28Note concrete type being coerced into objectMichael Goulet-6/+6
2022-06-19Greatly improve error reporting for futures and generators in ↵Joshua Nelson-1/+5
`note_obligation_cause_code` Most futures don't go through this code path, because they're caught by `maybe_note_obligation_cause_for_async_await`. But all generators do, and `maybe_note` is imperfect and doesn't catch all futures. Improve the error message for those it misses. At some point, we may want to consider unifying this with the code for `maybe_note_async_await`, so that `async_await` notes all parent constraints, and `note_obligation` can point to yield points. But both functions are quite complicated, and it's not clear to me how to combine them; this seems like a good incremental improvement.
2022-06-03Fully stabilize NLLJack Huey-183/+16
2022-05-22Use revisions for NLL in various directoriesJack Huey-39/+45
2022-04-05Rollup merge of #95525 - ohno418:suggest-derivable-trait-E0277, ↵Dylan DPC-0/+8
r=compiler-errors Suggest derivable trait on E0277 error Closes https://github.com/rust-lang/rust/issues/95099 .
2022-04-05Fix ui test for nllohno418-0/+4
2022-04-05Suggest only when all fields impl the traitohno418-4/+0
2022-04-05Suggest derivable trait on E0277ohno418-0/+8
2022-04-04Remove hack, fix fmt and testsEsteban Kuber-0/+2
2022-04-04Dedup logic and improve output for other types that impl traitEsteban Kuber-18/+18
2022-04-04Fix list lengthEsteban Kuber-0/+8
2022-04-04Fix #90970, doesn't address #87437Esteban Kuber-0/+2
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-2/+2
When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the following other types implement trait `Foo`: Option<T> i32 str note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` Mention implementers of traits in `ImplObligation`s. Do not mention other `impl`s for closures, ranges and `?`.
2022-02-14further update `fuzzy_match_tys`lcnr-12/+8
2022-02-14fuzzify `fuzzy_match_tys`lcnr-8/+12
2022-02-14Make `find_similar_impl_candidates` a little fuzzier.Ben Reeves-0/+8
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-9/+9
2021-09-16Point at call span that introduced obligation for the argEsteban Kuber-3/+9
2021-08-16Use note to point at bound introducing requirementEsteban Küber-75/+134
2021-08-11Modify structured suggestion outputEsteban Küber-8/+8
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-07-31Point at unmet explicit lifetime obligation boundEsteban Küber-1/+5
2021-04-07rebase and update testsEsteban Küber-6/+30
2021-04-06Point at `impl` and type defs introducing requirements on E0277Esteban Küber-9/+45
2021-03-31give full path of constraint in suggest_constraining_type_paramhi-rustin-16/+16
revert file bless with nll mode
2020-10-20review commentsEsteban Küber-3/+3
2020-10-20Tweak "object unsafe" errorsEsteban Küber-14/+21
Fix #77598.
2020-09-28pretty.rs: Update Closure and Generator printAman Arora-3/+3
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com> Co-authored-by: Logan Mosier <logmosier@gmail.com>
2020-09-02pretty: trim paths of unique symbolsDan Aloni-122/+122
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-07-14Remove redundant explanatory `note` for type parametersEsteban Küber-4/+0
2020-04-08Small tweaks to required bound spanEsteban Küber-25/+25
2020-03-29Tweak `suggest_constraining_type_param`Esteban Küber-40/+32
Some of the bound restriction structured suggestions were incorrect while others had subpar output.
2020-02-09Improve reporting errors and suggestions for trait boundsPatryk Wychowaniec-24/+40
2020-02-02Wording changes to object unsafe trait errorsEsteban Küber-3/+9
Stemming from the thread at https://twitter.com/indygreg/status/1223279056398929920
2020-02-02Slight rewording of diagnostic messageEsteban Küber-3/+3
2020-02-02Tweak `Self: Sized` restriction diagnostic outputEsteban Küber-4/+9
2020-01-08Point at the def span of trait refs E0277Esteban Küber-1/+3
2019-12-30Add error code explanation for E0477Donough Liu-2/+4
2019-11-16Account for `rustc_on_unimplemented`Esteban Küber-1/+1
2019-11-16Suggest borrowing when it would satisfy an unmet trait boundEsteban Küber-3/+3
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-10-23Auto merge of #57545 - bovinebuddha:object_safe_for_dispatch, r=nikomatsakisbors-6/+37
Object safe for dispatch cc #43561
2019-10-22RFC 2027: "first draft" of implementationMathias Blikstad-6/+37
These are a squashed series of commits.
2019-10-15Update NLL testsEsteban Küber-4/+12
2019-10-15Use structured suggestion for restricting boundsEsteban Küber-4/+12
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)`.