diff options
| author | lcnr <rust@lcnr.de> | 2023-07-14 10:28:18 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2023-07-16 15:36:19 +0200 |
| commit | e449daad6cc3db4890d4dbaa4d0ab2fa66215091 (patch) | |
| tree | abb785f0e82b846d55878fc276bf4d1ecc818320 /compiler/rustc_trait_selection | |
| parent | 19d46b690a8dddcb19e4919c19939844c4441594 (diff) | |
| download | rust-e449daad6cc3db4890d4dbaa4d0ab2fa66215091.tar.gz rust-e449daad6cc3db4890d4dbaa4d0ab2fa66215091.zip | |
stop mentioning number of applicate implementations
Diffstat (limited to 'compiler/rustc_trait_selection')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index a821d1be64b..c14839fe9be 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -2388,14 +2388,11 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { // If there is only one implementation of the trait, suggest using it. // Otherwise, use a placeholder comment for the implementation. let (message, impl_suggestion) = if non_blanket_impl_count == 1 {( - "use the fully-qualified path to the only available implementation".to_string(), + "use the fully-qualified path to the only available implementation", format!("<{} as ", self.tcx.type_of(impl_def_id).instantiate_identity()) - )} else {( - format!( - "use a fully-qualified path to a specific available implementation ({} found)", - non_blanket_impl_count - ), - "</* self type */ as ".to_string() + )} else { + ("use a fully-qualified path to a specific available implementation", + "</* self type */ as ".to_string() )}; let mut suggestions = vec