Skip to content

Commit 3d78a89

Browse files
---
yaml --- r: 72627 b: refs/heads/dist-snap c: 02889f7 h: refs/heads/master i: 72625: 9150d41 72623: d530c7f v: v3
1 parent bb4b005 commit 3d78a89

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 984180c600b083b272237c0b343bb3e3dd844086
10+
refs/heads/dist-snap: 02889f75072cd3eb75afc4000d15b8174eda6155
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub use io::{print, println};
3131
/* Reexported types and traits */
3232

3333
pub use clone::Clone;
34-
pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
34+
pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater, Equiv};
3535
pub use container::{Container, Mutable, Map, Set};
3636
pub use hash::Hash;
3737
pub use old_iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter};

branches/dist-snap/src/librustc/middle/ty.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,15 +2499,12 @@ pub fn type_is_enum(ty: t) -> bool {
24992499
// constructors
25002500
pub fn type_is_c_like_enum(cx: ctxt, ty: t) -> bool {
25012501
match get(ty).sty {
2502-
ty_enum(did, _) => {
2503-
let variants = enum_variants(cx, did);
2504-
if variants.len() == 0 {
2505-
false
2506-
} else {
2507-
variants.all(|v| v.args.len() == 0)
2508-
}
2509-
}
2510-
_ => false
2502+
ty_enum(did, _) => {
2503+
let variants = enum_variants(cx, did);
2504+
let some_n_ary = vec::any(*variants, |v| vec::len(v.args) > 0u);
2505+
return !some_n_ary;
2506+
}
2507+
_ => return false
25112508
}
25122509
}
25132510

branches/dist-snap/src/test/compile-fail/uninhabited-enum-cast.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)