Skip to content

Commit d3ed5c6

Browse files
committed
---
yaml --- r: 46795 b: refs/heads/auto c: 7b2b4fa h: refs/heads/master i: 46793: 8cb6075 46791: ef8db3f v: v3
1 parent 97aae7f commit d3ed5c6

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
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 04ecab909a38a8c19405ea577e826facfe4d7da8
17+
refs/heads/auto: 7b2b4faba84c1d43af35397d0103747fe085ee45

branches/auto/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)