Skip to content

Commit

Permalink
future-compat lint for newly handled cases of #[structural_match].
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Jul 8, 2019
1 parent 507ee72 commit 36777f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc/lint/builtin.rs
Expand Up @@ -346,6 +346,12 @@ declare_lint! {
"outlives requirements can be inferred" "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`. /// Some lints that are buffered from `libsyntax`. See `syntax::early_buffered_lints`.
pub mod parser { pub mod parser {
declare_lint! { declare_lint! {
Expand Down
5 changes: 5 additions & 0 deletions src/librustc_lint/lib.rs
Expand Up @@ -427,6 +427,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
id: LintId::of(MUTABLE_BORROW_RESERVATION_CONFLICT), id: LintId::of(MUTABLE_BORROW_RESERVATION_CONFLICT),
reference: "issue #59159 <https://github.com/rust-lang/rust/issues/59159>", reference: "issue #59159 <https://github.com/rust-lang/rust/issues/59159>",
edition: None, edition: None,
},
FutureIncompatibleInfo {
id: LintId::of(INDIRECT_STRUCTURAL_MATCH),
reference: "issue #62411 <https://github.com/rust-lang/rust/issues/62411>",
edition: None,
} }
]); ]);


Expand Down

0 comments on commit 36777f1

Please sign in to comment.