Suggest changing ty to const params if appropriate
This commit is contained in:
parent
3f7b1a5f49
commit
5906237b32
7 changed files with 160 additions and 1 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue