From 36777f157b1f30f208e913c0ec04f9ac6b567a4e Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Mon, 8 Jul 2019 11:11:41 +0200 Subject: [PATCH] future-compat lint for newly handled cases of `#[structural_match]`. --- src/librustc/lint/builtin.rs | 6 ++++++ src/librustc_lint/lib.rs | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs index 45e598531b96..f7718cef3478 100644 --- a/src/librustc/lint/builtin.rs +++ b/src/librustc/lint/builtin.rs @@ -346,6 +346,12 @@ declare_lint! { "outlives requirements can be inferred" } +declare_lint! { + pub INDIRECT_STRUCTURAL_MATCH, + Warn, + "pattern with const indirectly referencing non-`#[structural_match]` type" +} + /// Some lints that are buffered from `libsyntax`. See `syntax::early_buffered_lints`. pub mod parser { declare_lint! { diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index d808a15982e3..4dc0fce1fc89 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -427,6 +427,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) { id: LintId::of(MUTABLE_BORROW_RESERVATION_CONFLICT), reference: "issue #59159 ", edition: None, + }, + FutureIncompatibleInfo { + id: LintId::of(INDIRECT_STRUCTURAL_MATCH), + reference: "issue #62411 ", + edition: None, } ]);