about summary refs log tree commit diff
path: root/src/test/ui/confuse-field-and-method
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-378/+0
2022-12-15Trim paths in E0599Esteban Küber-2/+2
2022-07-08Auto merge of #98816 - estebank:implicit-sized, r=oli-obkbors-14/+14
Track implicit `Sized` obligations in type params When we evaluate `ty::GenericPredicates` we introduce the implicit `Sized` predicate of type params, but we do so with only the `Predicate` its `Span` as context, we don't have an `Obligation` or `ObligationCauseCode` we could influence. To try and carry this information through, we add a new field to `ty::GenericPredicates` that tracks both which predicates come from a type param and whether that param has any bounds already (to use in suggestions). We also suggest adding a `?Sized` bound if appropriate on E0599. Address part of #98539.
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-14/+14
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-07-07Shorten span for closures.Camille GILLOT-2/+2
2022-06-22point to type param definition when not finding variant, method and assoc typeTakayuki Maeda-14/+14
use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span` use `body_id.owner` directly add description to label
2021-08-11Modify structured suggestion outputEsteban Küber-14/+14
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-05-21remove generic argument insead of displaying "_"Aliénore Bouttefeux-7/+7
2021-04-15elision of generic argument in E0599 if the methode has not been found ↵Aliénore Bouttefeux-7/+7
anywhere and sugetion of type with method when found.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+2
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-01-08Unify output of "variant not found" errorsEsteban Küber-17/+17
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+14
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-05-29Update ui test suite to use dynmemoryruins-5/+5
2019-05-24Deprecate `FnBox`. `Box<dyn FnOnce()>` can be called directly, since 1.35Simon Sapin-22/+18
FCP completion: https://github.com/rust-lang/rust/issues/28796#issuecomment-439731515
2019-03-22Rollup merge of #59297 - euclio:field-method-suggestions, r=estebankMazdak Farrokhzad-20/+48
convert field/method confusion help to suggestions
2019-03-19convert field/method confusion help to suggestionsAndy Russell-20/+48
2019-03-15rustc: print ExistentialProjection with spaces around `=`, e.g. `dyn Foo<A = ↵Eduard-Mihai Burtescu-1/+1
X>`.
2019-03-11Update testsVadim Petrochenkov-13/+13
2018-12-25Remove licensesMark Rousskov-72/+22
2018-07-18Implement existential typesOliver Schneider-0/+390