Skip to content

Commit

Permalink
Rollup merge of rust-lang#41761 - euclio:24106-test, r=estebank
Browse files Browse the repository at this point in the history
Add regression test for issue rust-lang#24106

Fixes rust-lang#24106.
  • Loading branch information
frewsxcv committed May 5, 2017
2 parents 26e067b + 4c1a505 commit 1ef0aef
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/run-pass-fulldeps/auxiliary/issue_24106.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// 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.

#![crate_type="lib"]

enum E { E0 = 0, E1 = 1 }
const E0_U8: u8 = E::E0 as u8;
const E1_U8: u8 = E::E1 as u8;

pub fn go<T>() {
match 0 {
E0_U8 => (),
E1_U8 => (),
_ => (),
}
}
17 changes: 17 additions & 0 deletions src/test/run-pass-fulldeps/issue_24106.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// 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.

// aux-build:issue_24106.rs

extern crate issue_24106;

fn main() {
issue_24106::go::<()>();
}

0 comments on commit 1ef0aef

Please sign in to comment.