diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-02-02 02:49:13 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-02-02 03:25:04 +0100 |
| commit | 5906237b32a83a1df215b87bbafcc926bf49cd66 (patch) | |
| tree | d3355ec0af3ea3972d7b21dea577e380180f9515 /compiler/rustc_resolve/src/errors.rs | |
| parent | 3f7b1a5f491a66365e9973babc1b3dde2c90ad55 (diff) | |
| download | rust-5906237b32a83a1df215b87bbafcc926bf49cd66.tar.gz rust-5906237b32a83a1df215b87bbafcc926bf49cd66.zip | |
Suggest changing ty to const params if appropriate
Diffstat (limited to 'compiler/rustc_resolve/src/errors.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/errors.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index 50ff09feb4d..655fc9812d7 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -1,4 +1,4 @@ -use rustc_errors::codes::*; +use rustc_errors::{codes::*, Applicability}; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::{ symbol::{Ident, Symbol}, @@ -787,3 +787,16 @@ pub(crate) struct IsNotDirectlyImportable { pub(crate) span: Span, pub(crate) target: Ident, } + +#[derive(Subdiagnostic)] +#[suggestion( + resolve_unexpected_res_change_ty_to_const_param_sugg, + code = "const ", + style = "verbose" +)] +pub(crate) struct UnexpectedResChangeTyToConstParamSugg { + #[primary_span] + pub span: Span, + #[applicability] + pub applicability: Applicability, +} |
