diff options
| author | Tom Martin <tom.martin1239@gmail.com> | 2023-06-18 07:19:19 +0100 |
|---|---|---|
| committer | Tom Martin <tom.martin1239@gmail.com> | 2023-06-18 12:28:16 +0100 |
| commit | 8fa9003621d0031a76b208b277c7832a06e1570a (patch) | |
| tree | 8c0b4fcbc30905b43a5522172793a847ce7d70f0 /compiler/rustc_resolve/src/errors.rs | |
| parent | 0c2c243342ec2a2427f0624fac5ac59f0ee6fbcd (diff) | |
| download | rust-8fa9003621d0031a76b208b277c7832a06e1570a.tar.gz rust-8fa9003621d0031a76b208b277c7832a06e1570a.zip | |
Add translatable diagnostic for changing import binding
Diffstat (limited to 'compiler/rustc_resolve/src/errors.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/errors.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index e88cbb955b5..b7b5e9d15bc 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -586,3 +586,22 @@ pub(crate) enum ParamKindInEnumDiscriminant { #[note(resolve_lifetime_param_in_enum_discriminant)] Lifetime, } + +#[derive(Subdiagnostic)] +#[label(resolve_change_import_binding)] +pub(crate) struct ChangeImportBinding { + #[primary_span] + pub(crate) span: Span, +} + +#[derive(Subdiagnostic)] +#[suggestion( + resolve_change_import_binding, + code = "{suggestion}", + applicability = "maybe-incorrect" +)] +pub(crate) struct ChangeImportBindingSuggestion { + #[primary_span] + pub(crate) span: Span, + pub(crate) suggestion: String, +} |
