rust/src/test/ui/resolve
bors 1d5b7c3c96 Auto merge of #78420 - estebank:suggest-assoc-fn, r=petrochenkov
Suggest calling associated `fn` inside `trait`s

When calling a function that doesn't exist inside of a trait's
associated `fn`, and another associated `fn` in that trait has that
name, suggest calling it with the appropriate fully-qualified path.

Expand the label to be more descriptive.

Prompted by the following user experience:
https://users.rust-lang.org/t/cannot-find-function/50663
2020-11-01 06:49:16 +00:00
..
auxiliary
associated-fn-called-as-fn.rs Suggest calling associated fn inside traits 2020-10-26 16:31:11 -07:00
associated-fn-called-as-fn.stderr Suggest calling associated fn inside traits 2020-10-26 16:31:11 -07:00
block-with-trait-parent.rs resolve: Adjust hygienic_lexical_parent to account for enum and trait modules 2019-09-07 17:42:24 +03:00
enums-are-namespaced-xc.rs Point at local similarly named element and tweak references to variants 2019-10-27 11:50:43 -07:00
enums-are-namespaced-xc.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
impl-items-vis-unresolved.rs Appease tidy 2020-01-12 15:37:50 +00:00
impl-items-vis-unresolved.stderr Update output-default.json and rustdoc test 2020-01-12 15:37:50 +00:00
issue-2356.rs
issue-2356.stderr Suggest calling associated fn inside traits 2020-10-26 16:31:11 -07:00
issue-3907-2.rs
issue-3907-2.stderr review comments 2020-10-20 09:26:15 -07:00
issue-3907.rs
issue-3907.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
issue-5035-2.rs
issue-5035-2.stderr Add unsized_fn_params feature 2020-10-27 14:45:02 -03:00
issue-5035.rs
issue-5035.stderr Tweak some suggestions in rustc_resolve 2020-04-26 11:43:43 -07:00
issue-6702.rs Point at local similarly named element and tweak references to variants 2019-10-27 11:50:43 -07:00
issue-6702.stderr Suggest struct pat on incorrect unit or tuple pat 2020-07-14 10:41:44 -07:00
issue-14254.rs
issue-14254.stderr Suggest calling associated fn inside traits 2020-10-26 16:31:11 -07:00
issue-16058.rs Ignore SGX on a few ui tests 2020-05-05 19:19:39 -07:00
issue-16058.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
issue-17518.rs
issue-17518.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
issue-18252.rs Point at local similarly named element and tweak references to variants 2019-10-27 11:50:43 -07:00
issue-18252.stderr Suggest struct pat on incorrect unit or tuple pat 2020-07-14 10:41:44 -07:00
issue-19452.rs
issue-19452.stderr Point at item definition in foreign crates 2020-08-10 12:04:10 -07:00
issue-21221-1.rs
issue-21221-1.stderr Prefer accessible paths in 'use' suggestions 2020-06-21 18:49:39 +03:00
issue-21221-2.rs
issue-21221-2.stderr Add re-exports to use suggestions 2020-06-23 13:37:50 +03:00
issue-21221-3.rs
issue-21221-3.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
issue-21221-4.rs
issue-21221-4.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
issue-22692.rs
issue-22692.stderr
issue-23305.rs
issue-23305.stderr Add descriptions for all queries 2020-05-31 20:15:32 +01:00
issue-24968.rs
issue-24968.stderr
issue-33876.rs
issue-33876.stderr
issue-39226.rs
issue-39226.stderr Tweak ordering of suggestions 2020-08-10 12:04:10 -07:00
issue-54379.rs
issue-54379.stderr Fix span for incorrect pattern field and add label 2020-10-02 00:44:16 -07:00
issue-57523.rs Use check-pass in ui tests where appropriate 2019-11-04 16:03:46 +01:00
issue-65025-extern-static-parent-generics.rs resolve: prohibit foreign statics w/ generics 2019-10-08 18:46:24 +01:00
issue-65025-extern-static-parent-generics.stderr resolve: prohibit foreign statics w/ generics 2019-10-08 18:46:24 +01:00
issue-65035-static-with-parent-generics.rs adjust tests 2020-05-09 14:40:17 +02:00
issue-65035-static-with-parent-generics.stderr Suggest minimal subset features in incomplete_features lint 2020-10-17 02:01:08 +09:00
issue-69401-trait-fn-no-body-ty-local.rs late resolve, visit_fn: bail early if there's no body. 2020-02-28 07:58:37 +01:00
issue-69401-trait-fn-no-body-ty-local.stderr late resolve, visit_fn: bail early if there's no body. 2020-02-28 07:58:37 +01:00
issue-70736-async-fn-no-body-def-collector.rs def_collector, visit_fn: account for no body 2020-04-03 17:01:21 +02:00
issue-70736-async-fn-no-body-def-collector.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
levenshtein.rs tests: remove ignore directives from tests that mention core/alloc/std spans. 2020-04-02 11:48:34 +03:00
levenshtein.stderr mv std libs to library/ 2020-07-27 19:51:13 -05:00
name-clash-nullary.rs
name-clash-nullary.stderr pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
privacy-enum-ctor.rs
privacy-enum-ctor.stderr resolve: suggest variants with placeholders 2020-10-15 17:57:57 +01:00
privacy-struct-ctor.rs resolve: fix error title regarding private constructors 2019-10-11 18:09:23 +03:00
privacy-struct-ctor.stderr Suggest struct pat on incorrect unit or tuple pat 2020-07-14 10:41:44 -07:00
raw-ident-in-path.rs resolve: Fix regression in resolution of raw keywords in paths 2020-03-14 19:21:38 +03:00
raw-ident-in-path.stderr resolve: Fix regression in resolution of raw keywords in paths 2020-03-14 19:21:38 +03:00
resolve-assoc-suggestions.rs Point at local similarly named element and tweak references to variants 2019-10-27 11:50:43 -07:00
resolve-assoc-suggestions.stderr Suggest calling associated fn inside traits 2020-10-26 16:31:11 -07:00
resolve-bad-import-prefix.rs
resolve-bad-import-prefix.stderr
resolve-bad-visibility.rs resolve: Move late resolution into a separate visitor 2019-08-10 13:15:15 +03:00
resolve-bad-visibility.stderr Update ui tests 2019-10-30 14:49:53 +01:00
resolve-conflict-extern-crate-vs-extern-crate.rs Remove lint annotations in specific crates that are already enforced by rustbuild 2019-07-28 18:46:24 +03:00
resolve-conflict-extern-crate-vs-extern-crate.stderr Remove lint annotations in specific crates that are already enforced by rustbuild 2019-07-28 18:46:24 +03:00
resolve-conflict-import-vs-extern-crate.rs
resolve-conflict-import-vs-extern-crate.stderr
resolve-conflict-import-vs-import.fixed Audit uses of tool_only_span_suggestion 2020-07-02 15:18:33 +09:00
resolve-conflict-import-vs-import.rs Audit uses of tool_only_span_suggestion 2020-07-02 15:18:33 +09:00
resolve-conflict-import-vs-import.stderr Audit uses of tool_only_span_suggestion 2020-07-02 15:18:33 +09:00
resolve-conflict-item-vs-extern-crate.rs
resolve-conflict-item-vs-extern-crate.stderr
resolve-conflict-item-vs-import.rs
resolve-conflict-item-vs-import.stderr
resolve-conflict-type-vs-import.rs
resolve-conflict-type-vs-import.stderr
resolve-hint-macro.rs
resolve-hint-macro.stderr Add missing primary label 2020-08-10 12:04:10 -07:00
resolve-inconsistent-binding-mode.rs resolve, inconsistent binding mode: tweak wording. 2020-03-04 03:58:52 +01:00
resolve-inconsistent-binding-mode.stderr resolve, inconsistent binding mode: tweak wording. 2020-03-04 03:58:52 +01:00
resolve-inconsistent-names.rs resolve, inconsistent binding mode: tweak wording. 2020-03-04 03:58:52 +01:00
resolve-inconsistent-names.stderr resolve, inconsistent binding mode: tweak wording. 2020-03-04 03:58:52 +01:00
resolve-label.rs resolve: disallow label use through closure/async 2020-07-02 13:48:32 +01:00
resolve-label.stderr resolve: disallow label use through closure/async 2020-07-02 13:48:32 +01:00
resolve-primitive-fallback.rs On mismatched argument count point at arguments 2020-02-11 12:42:00 -08:00
resolve-primitive-fallback.stderr reword "possible candidate" import suggestion 2020-05-07 00:33:25 -04:00
resolve-self-in-impl-2.rs
resolve-self-in-impl-2.stderr
resolve-self-in-impl.rs
resolve-self-in-impl.stderr Add descriptions for all queries 2020-05-31 20:15:32 +01:00
resolve-speculative-adjustment.rs
resolve-speculative-adjustment.stderr Suggest calling associated fn inside traits 2020-10-26 16:31:11 -07:00
resolve-type-param-in-item-in-trait.rs
resolve-type-param-in-item-in-trait.stderr
resolve-unknown-trait.rs
resolve-unknown-trait.stderr
resolve-variant-assoc-item.rs
resolve-variant-assoc-item.stderr
suggest-path-instead-of-mod-dot-item.rs
suggest-path-instead-of-mod-dot-item.stderr Tweak ordering of suggestions 2020-08-10 12:04:10 -07:00
token-error-correct-2.rs tweak wording of mismatched delimiter errors 2020-01-03 08:40:15 -05:00
token-error-correct-2.stderr tweak wording of mismatched delimiter errors 2020-01-03 08:40:15 -05:00
token-error-correct-3.rs Do not emit type errors after parse error in last statement of block 2019-07-12 18:55:01 -07:00
token-error-correct-3.stderr Remove "here" from "expected one of X here" 2019-11-06 17:26:20 -08:00
token-error-correct-4.fixed Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
token-error-correct-4.rs Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
token-error-correct-4.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
token-error-correct.rs tweak wording of mismatched delimiter errors 2020-01-03 08:40:15 -05:00
token-error-correct.stderr tweak wording of mismatched delimiter errors 2020-01-03 08:40:15 -05:00
tuple-struct-alias.rs Point at local similarly named element and tweak references to variants 2019-10-27 11:50:43 -07:00
tuple-struct-alias.stderr Point at local similarly named element and tweak references to variants 2019-10-27 11:50:43 -07:00
typo-suggestion-named-underscore.rs Do not suggest things named underscore 2020-02-02 04:55:37 +09:00
typo-suggestion-named-underscore.stderr Do not suggest things named underscore 2020-02-02 04:55:37 +09:00
unboxed-closure-sugar-nonexistent-trait.rs
unboxed-closure-sugar-nonexistent-trait.stderr Tweak some suggestions in rustc_resolve 2020-04-26 11:43:43 -07:00
unresolved_static_type_field.rs
unresolved_static_type_field.stderr
use_suggestion.rs Improve E0433, so that it suggests missing imports 2020-06-02 20:41:25 +02:00
use_suggestion.stderr Clarify message about unresolved use 2020-09-01 18:38:14 +01:00
use_suggestion_placement.rs
use_suggestion_placement.stderr Remove noisy suggestion of hash_map #72642 2020-06-09 08:49:05 +05:30
visibility-indeterminate.rs resolve: Remove ! from "cannot find" diagnostics for macros 2019-09-15 13:22:07 +03:00
visibility-indeterminate.stderr update ui tests 2019-10-31 14:27:16 +01:00