make invalid_type_param_default lint show up in cargo future-compat reports

and remove the feature gate that silenced the lint
This commit is contained in:
Ralf Jung 2024-07-15 21:25:03 +02:00
parent b286722878
commit 9d9b55cd2b
12 changed files with 115 additions and 30 deletions

View file

@ -323,8 +323,6 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
if default.is_some() {
match allow_defaults {
Defaults::Allowed => {}
Defaults::FutureCompatDisallowed
if tcx.features().default_type_parameter_fallback => {}
Defaults::FutureCompatDisallowed => {
tcx.node_span_lint(
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,