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:
@@ -75,6 +75,9 @@ declare_features! (
|
||||
/// Allows the use of `#[derive(Anything)]` as sugar for `#[derive_Anything]`.
|
||||
(removed, custom_derive, "1.32.0", Some(29644),
|
||||
Some("subsumed by `#[proc_macro_derive]`")),
|
||||
/// Allows default type parameters to influence type inference.
|
||||
(removed, default_type_parameter_fallback, "CURRENT_RUSTC_VERSION", Some(27336),
|
||||
Some("never properly implemented; requires significant design work")),
|
||||
/// Allows using `#[doc(keyword = "...")]`.
|
||||
(removed, doc_keyword, "1.28.0", Some(51315),
|
||||
Some("merged into `#![feature(rustdoc_internals)]`")),
|
||||
|
||||
@@ -428,8 +428,6 @@ declare_features! (
|
||||
(unstable, custom_test_frameworks, "1.30.0", Some(50297)),
|
||||
/// Allows declarative macros 2.0 (`macro`).
|
||||
(unstable, decl_macro, "1.17.0", Some(39412)),
|
||||
/// Allows default type parameters to influence type inference.
|
||||
(unstable, default_type_parameter_fallback, "1.3.0", Some(27336)),
|
||||
/// Allows using `#[deprecated_safe]` to deprecate the safeness of a function or trait
|
||||
(unstable, deprecated_safe, "1.61.0", Some(94978)),
|
||||
/// Allows having using `suggestion` in the `#[deprecated]` attribute.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1241,7 +1241,7 @@ declare_lint! {
|
||||
Deny,
|
||||
"type parameter default erroneously allowed in invalid location",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
|
||||
reference: "issue #36887 <https://github.com/rust-lang/rust/issues/36887>",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user