Skip to content

Commit e5a1bf6

Browse files
committed
---
yaml --- r: 63519 b: refs/heads/snap-stage3 c: 31b4b53 h: refs/heads/master i: 63517: b83e5fd 63515: 0eb72e7 63511: 9b39475 63503: 5978ba1 63487: 70fb7a9 v: v3
1 parent e39f099 commit e5a1bf6

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b8b2d1e5b41fd3351049fbb54846b42aa9b189bd
4+
refs/heads/snap-stage3: 31b4b53797337a3750bcb63b19b78642816f76de
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/resolve.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,24 +1415,26 @@ impl Resolver {
14151415
(ReducedGraphParent,
14161416
vt<ReducedGraphParent>)) {
14171417
let ident = variant.node.name;
1418-
let (child, _) = self.add_child(ident, parent, ForbidDuplicateValues,
1419-
variant.span);
1420-
1421-
let privacy;
1422-
match variant.node.vis {
1423-
public => privacy = Public,
1424-
private => privacy = Private,
1425-
inherited => privacy = parent_privacy
1426-
}
1418+
1419+
let privacy =
1420+
match variant.node.vis {
1421+
public => Public,
1422+
private => Private,
1423+
inherited => parent_privacy
1424+
};
14271425

14281426
match variant.node.kind {
14291427
tuple_variant_kind(_) => {
1428+
let (child, _) = self.add_child(ident, parent, ForbidDuplicateValues,
1429+
variant.span);
14301430
child.define_value(privacy,
14311431
def_variant(item_id,
14321432
local_def(variant.node.id)),
14331433
variant.span);
14341434
}
14351435
struct_variant_kind(_) => {
1436+
let (child, _) = self.add_child(ident, parent, ForbidDuplicateTypesAndValues,
1437+
variant.span);
14361438
child.define_type(privacy,
14371439
def_variant(item_id,
14381440
local_def(variant.node.id)),

branches/snap-stage3/src/libstd/rand.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ fn tls_rng_state(_v: @@mut IsaacRng) {}
843843
* `task_rng().gen::<int>()`.
844844
*/
845845
#[inline]
846-
pub fn task_rng() -> @mut IsaacRng {
846+
pub fn task_rng() -> @@mut IsaacRng {
847847
let r : Option<@@mut IsaacRng>;
848848
unsafe {
849849
r = local_data::local_data_get(tls_rng_state);
@@ -853,18 +853,20 @@ pub fn task_rng() -> @mut IsaacRng {
853853
unsafe {
854854
let rng = @@mut IsaacRng::new_seeded(seed());
855855
local_data::local_data_set(tls_rng_state, rng);
856-
*rng
856+
rng
857857
}
858858
}
859-
Some(rng) => *rng
859+
Some(rng) => rng
860860
}
861861
}
862862

863863
// Allow direct chaining with `task_rng`
864-
impl<R: Rng> Rng for @mut R {
864+
impl<R: Rng> Rng for @@mut R {
865865
#[inline]
866866
fn next(&mut self) -> u32 {
867-
(**self).next()
867+
match *self {
868+
@@ref mut r => r.next()
869+
}
868870
}
869871
}
870872

@@ -874,7 +876,9 @@ impl<R: Rng> Rng for @mut R {
874876
*/
875877
#[inline]
876878
pub fn random<T: Rand>() -> T {
877-
task_rng().gen()
879+
match *task_rng() {
880+
@ref mut r => r.gen()
881+
}
878882
}
879883

880884
#[cfg(test)]

0 commit comments

Comments
 (0)