about summary refs log tree commit diff
path: root/src/test/ui/methods
AgeCommit message (Collapse)AuthorLines
2021-03-24resolve late lifetimes by itemJack Huey-1/+18
This reverts commit 22ae20733515d710c1134600bc1e29cdd76f6b9b.
2021-02-01Test exploring the interactions between all of the different kinds of method ↵Felix S. Klock II-0/+190
collisions I could imagine. The different impls are all guarded by cfg-flags, and the revisions could be used to cover the full power-set of combinations. (I only included 20 of the possible 32 cases here; the null-set is not interesting, and the remaining 11 all yielded ambiguous method resolution errors which did not mix well with this testing strategy; I'm not trying to check UI for the resolution diagnostics; I'm trying to create checkpoint of current resolution semantics when compilation succeeds.)
2021-01-26Avoid describing a method as 'not found' when bounds are unsatisfiedAaron Hill-4/+4
Fixes #76267 When there is a single applicable method candidate, but its trait bounds are not satisfied, we avoid saying that the method is "not found". Insted, we update the error message to directly mention which bounds are not satisfied, rather than mentioning them in a note.
2021-01-10Rework diagnostics for wrong number of generic argsPatryk Wychowaniec-44/+86
2020-10-27Make tidy happySantiago Pastorino-14/+15
2020-10-27Add unsized_locals to INCOMPLETE_FEATURES listSantiago Pastorino-10/+20
2020-10-27Add unsized_fn_params featureSantiago Pastorino-1/+1
2020-10-19Auto merge of #77278 - camelid:use-correct-article, r=estebankbors-1/+1
Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.
2020-10-15ensure arguments are included in count mismatch spanAndy Russell-12/+24
2020-09-29Say "doesn't" instead of "wouldn't" in convert messageCamelid-1/+1
2020-09-29Add article after "to"Camelid-1/+1
Also added missing backtick in "you can cast" message.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-16/+16
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-10Tweak wordingYuki Okushi-1/+1
2020-07-10Add a help to use `in_band_lifetimes` in nightlyYuki Okushi-0/+2
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-13/+13
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-13Remove `FnCtxt::impl_self_ty`Yuki Okushi-2/+2
2020-03-24rustc_typeck: remove rustc_hir_pretty usageMazdak Farrokhzad-3/+3
2020-03-22Use more targetted span for error labelEsteban Küber-2/+2
2020-03-22Add span label to primary error spanEsteban Küber-4/+4
2020-03-22Increase verbosity when suggesting subtle code changesEsteban Küber-2/+12
2020-03-12update testsMark Mansi-14/+14
2020-03-10--bless some testsMazdak Farrokhzad-2/+5
2020-03-08Rollup merge of #69422 - JohnTitor:remove-unwrap, r=XanewokMazdak Farrokhzad-0/+43
Remove use of `unwrap()` from save-analysis Fix #69409, fix #69416
2020-02-28Do not suggest implementing traits if present in predicatesEsteban Küber-3/+2
2020-02-28Review comments: split requirement text to multiple lines for readabilityEsteban Küber-1/+2
2020-02-28Show information of chain of bound obligationsEsteban Küber-1/+1
When the obligation that couldn't be fulfilled is specific to a nested obligation, maintain both the nested and parent obligations around for more accurate and detailed error reporting.
2020-02-28Track all predicates in errors, not just trait obligationsEsteban Küber-1/+3
Surface associated type projection bounds that could not be fulfilled in E0599 errors. Always present the list of unfulfilled trait bounds, regardless of whether we're pointing at the ADT or trait that didn't satisfy it.
2020-02-28Deduplicate information in E0599Esteban Küber-3/+1
2020-02-28Reduce vebosity of E0599Esteban Küber-1/+0
2020-02-28Add more context to E0599 errorsEsteban Küber-2/+6
Point at the intermediary unfullfilled trait bounds.
2020-02-25Tweak testsYuki Okushi-0/+43
2020-02-11On mismatched argument count point at argumentsEsteban Küber-14/+33
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-2/+0
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-1/+1
2020-01-24Normalise notes with the/isvarkor-2/+2
2020-01-19When encountering an undefined named lifetime, point to where it can beEsteban Küber-0/+2
This doesn't mention that using an existing lifetime is possible, but that would hopefully be clear as always being an option. The intention of this is to teach newcomers what the lifetime syntax is.
2020-01-08Unify output of "variant not found" errorsEsteban Küber-2/+2
2019-12-20Rollup merge of #67127 - estebank:disambiguate-suggestion, r=varkorMazdak Farrokhzad-13/+52
Use structured suggestion for disambiguating method calls Fix #65635.
2019-12-11review commentsEsteban Küber-4/+4
2019-12-11Use structured suggestion for disambiguating method callsEsteban Küber-13/+52
Fix #65635.
2019-12-11Add more context for type parametersEsteban Küber-1/+1
2019-11-21Point at type in `let` assignment on type errorsEsteban Küber-6/+18
2019-11-18Surround types with backticks in type errorsEsteban Küber-13/+13
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-21/+1
2019-11-18review comments: tweak prefix stringsEsteban Küber-10/+10
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-8/+8
2019-10-28Improve the "try using a variant of the expected type" hint.Patryk Wychowaniec-12/+12
2019-10-27Point at local similarly named element and tweak references to variantsEsteban Küber-15/+15
Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+4
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-09-29Rollup merge of #64735 - GuillaumeGomez:long-err-explanation-E0533, r=CentrilMazdak Farrokhzad-1/+26
Add long error explanation for E0533 Part of https://github.com/rust-lang/rust/issues/61137