diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-07-16 19:45:07 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-07 21:18:00 +0000 |
| commit | 99196657fcb5c1e20c13e76166c7f52d35584e88 (patch) | |
| tree | ebdcbf3a557a056fc26648ca21cb32555fd318a0 /compiler/rustc_trait_selection/messages.ftl | |
| parent | 2fd855fbfc8239285aa2d596f76a8cc75e17ce02 (diff) | |
| download | rust-99196657fcb5c1e20c13e76166c7f52d35584e88.tar.gz rust-99196657fcb5c1e20c13e76166c7f52d35584e88.zip | |
Use `tcx.short_string()` in more diagnostics
`TyCtxt::short_string` ensures that user visible type paths aren't overwhelming on the terminal output, and properly saves the long name to disk as a side-channel. We already use these throughout the compiler and have been using them as needed when users find cases where the output is verbose. This is a proactive search of some cases to use `short_string`. We add support for shortening the path of "trait path only". Every manual use of `short_string` is a bright marker that that error should be using structured diagnostics instead (as they have proper handling of long types without the maintainer having to think abou tthem). When we don't actually print out a shortened type we don't need the "use `--verbose`" note. On E0599 show type identity to avoid expanding the receiver's generic parameters. Unify wording on `long_ty_path` everywhere.
Diffstat (limited to 'compiler/rustc_trait_selection/messages.ftl')
| -rw-r--r-- | compiler/rustc_trait_selection/messages.ftl | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/messages.ftl b/compiler/rustc_trait_selection/messages.ftl index 8232da4df43..fcb25025087 100644 --- a/compiler/rustc_trait_selection/messages.ftl +++ b/compiler/rustc_trait_selection/messages.ftl @@ -171,8 +171,6 @@ trait_selection_fps_remove_ref = consider removing the reference trait_selection_fps_use_ref = consider using a reference trait_selection_fulfill_req_lifetime = the type `{$ty}` does not fulfill the required lifetime -trait_selection_full_type_written = the full type name has been written to '{$path}' - trait_selection_ignored_diagnostic_option = `{$option_name}` is ignored due to previous definition of `{$option_name}` .other_label = `{$option_name}` is first declared here .label = `{$option_name}` is already declared here |
