Skip to content

Commit 603c29e

Browse files
committed
---
yaml --- r: 45012 b: refs/heads/master c: 7b2b4fa h: refs/heads/master v: v3
1 parent 12e0a83 commit 603c29e

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 04ecab909a38a8c19405ea577e826facfe4d7da8
2+
refs/heads/master: 7b2b4faba84c1d43af35397d0103747fe085ee45
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/src/librustc/middle/trans/adt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ fn generic_fields_of(cx: @CrateContext, r: &Repr, sizing: bool)
139139
fn load_discr(bcx: block, scrutinee: ValueRef, min: int, max: int)
140140
-> ValueRef {
141141
let ptr = GEPi(bcx, scrutinee, [0, 0]);
142-
// XXX: write tests for the edge cases here
143142
if max + 1 == min {
144143
// i.e., if the range is everything. The lo==hi case would be
145144
// rejected by the LLVM verifier (it would mean either an
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub enum E64 {
12+
H64 = 0x7FFF_FFFF_FFFF_FFFF,
13+
L64 = 0x8000_0000_0000_0000
14+
}
15+
pub enum E32 {
16+
H32 = 0x7FFF_FFFF,
17+
L32 = 0x8000_0000
18+
}
19+
20+
pub fn f(e64: E64, e32: E32) -> (bool,bool) {
21+
(match e64 {
22+
H64 => true,
23+
L64 => false
24+
},
25+
match e32 {
26+
H32 => true,
27+
L32 => false
28+
})
29+
}
30+
31+
pub fn main() { }

0 commit comments

Comments
 (0)