Remove LintDiagnostic::msg
* instead simply set the primary message inside the lint decorator functions * it used to be this way before [#]101986 which introduced `msg` to prevent good path delayed bugs (which no longer exist) from firing under certain circumstances when lints were suppressed / silenced * this is no longer necessary for various reasons I presume * it shaves off complexity and makes further changes easier to implement
This commit is contained in:
@@ -317,8 +317,9 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
|
||||
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
|
||||
param.hir_id,
|
||||
param.span,
|
||||
TYPE_DEFAULT_NOT_ALLOWED,
|
||||
|_| {},
|
||||
|lint| {
|
||||
lint.primary_message(TYPE_DEFAULT_NOT_ALLOWED);
|
||||
},
|
||||
);
|
||||
}
|
||||
Defaults::Deny => {
|
||||
|
||||
Reference in New Issue
Block a user