Skip to content

Commit

Permalink
add testcase for #3462
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jan 3, 2019
1 parent 5277a1f commit 24ff813
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/run-pass/ice-3462.rs
Original file line number Diff line number Diff line change
@@ -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 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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() {}

0 comments on commit 24ff813

Please sign in to comment.