From 24ff813f543e0bf24efc12ee7f305b245f012e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 3 Jan 2019 11:08:05 +0100 Subject: [PATCH] add testcase for #3462 --- tests/run-pass/ice-3462.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/run-pass/ice-3462.rs diff --git a/tests/run-pass/ice-3462.rs b/tests/run-pass/ice-3462.rs new file mode 100644 index 000000000000..8aea905cd806 --- /dev/null +++ b/tests/run-pass/ice-3462.rs @@ -0,0 +1,30 @@ +// Copyright 2014-2019 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![warn(clippy::all)] +#![allow(clippy::blacklisted_name)] +#![allow(unused)] + +enum Foo { + Bar, + Baz, +} + +fn bar(foo: Foo) { + macro_rules! baz { + () => { + if let Foo::Bar = foo {} + }; + } + + baz!(); + baz!(); +} + +fn main() {}