Skip to content

Commit 7f043be

Browse files
committed
---
yaml --- r: 55287 b: refs/heads/master c: 783392f h: refs/heads/master i: 55285: 8443a94 55283: 1b57083 55279: 0e01eeb v: v3
1 parent c539609 commit 7f043be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2522
-1450
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: e2c7a4def2730e33babf26ff834abe32a1de9a04
2+
refs/heads/master: 783392f70fcfd6770782796bef06bed47043cabf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ expression context, the final namespace qualifier is omitted.
441441
Two examples of paths with type arguments:
442442

443443
~~~~
444-
# use core::hashmap::linear::LinearMap;
444+
# use core::hashmap::HashMap;
445445
# fn f() {
446446
# fn id<T:Copy>(t: T) -> T { t }
447-
type t = LinearMap<int,~str>; // Type arguments used in a type expression
447+
type t = HashMap<int,~str>; // Type arguments used in a type expression
448448
let x = id::<int>(10); // Type arguments used in a call expression
449449
# }
450450
~~~~

trunk/doc/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ custom destructors.
988988

989989
# Boxes
990990

991-
Many modern languages represent values as pointers to heap memory by
991+
Many modern languages represent values as as pointers to heap memory by
992992
default. In contrast, Rust, like C and C++, represents such types directly.
993993
Another way to say this is that aggregate data in Rust are *unboxed*. This
994994
means that if you `let x = Point { x: 1f, y: 1f };`, you are creating a struct
@@ -1888,8 +1888,8 @@ illegal to copy and pass by value.
18881888
Generic `type`, `struct`, and `enum` declarations follow the same pattern:
18891889

18901890
~~~~
1891-
# use core::hashmap::linear::LinearMap;
1892-
type Set<T> = LinearMap<T, ()>;
1891+
# use core::hashmap::HashMap;
1892+
type Set<T> = HashMap<T, ()>;
18931893
18941894
struct Stack<T> {
18951895
elements: ~[T]

trunk/mk/install.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
119119
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBSYNTAX_GLOB_$(CFG_BUILD_TRIPLE)))
120120
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTI_GLOB_$(CFG_BUILD_TRIPLE)))
121121
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUST_GLOB_$(CFG_BUILD_TRIPLE)))
122+
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTPKG_GLOB_$(CFG_BUILD_TRIPLE)))
123+
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTDOC_GLOB_$(CFG_BUILD_TRIPLE)))
122124
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)))
123125
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE)))
124126
$(Q)$(call INSTALL,$(S)/man, \

trunk/src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn target_env(lib_path: ~str, prog: ~str) -> ~[(~str,~str)] {
2626

2727
// Make sure we include the aux directory in the path
2828
assert!(prog.ends_with(~".exe"));
29-
let aux_path = prog.slice(0u, prog.len() - 4u) + ~".libaux";
29+
let aux_path = prog.slice(0u, prog.len() - 4u).to_owned() + ~".libaux";
3030
3131
env = do vec::map(env) |pair| {
3232
let (k,v) = *pair;

trunk/src/libcore/at_vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub mod raw {
208208
*/
209209
#[inline(always)]
210210
pub unsafe fn set_len<T>(v: @[T], new_len: uint) {
211-
let repr: **VecRepr = ::cast::reinterpret_cast(&addr_of(&v));
211+
let repr: **mut VecRepr = ::cast::reinterpret_cast(&addr_of(&v));
212212
(**repr).unboxed.fill = new_len * sys::size_of::<T>();
213213
}
214214

@@ -226,7 +226,7 @@ pub mod raw {
226226

227227
#[inline(always)] // really pretty please
228228
pub unsafe fn push_fast<T>(v: &mut @[T], initval: T) {
229-
let repr: **VecRepr = ::cast::reinterpret_cast(&v);
229+
let repr: **mut VecRepr = ::cast::reinterpret_cast(&v);
230230
let fill = (**repr).unboxed.fill;
231231
(**repr).unboxed.fill += sys::size_of::<T>();
232232
let p = addr_of(&((**repr).unboxed.data));

trunk/src/libcore/cell.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! A mutable, nullable memory location
1212
13-
use cast::transmute;
13+
use cast::transmute_mut;
1414
use prelude::*;
1515

1616
/*
@@ -20,16 +20,12 @@ Similar to a mutable option type, but friendlier.
2020
*/
2121

2222
pub struct Cell<T> {
23-
mut value: Option<T>
23+
value: Option<T>
2424
}
2525

2626
impl<T:cmp::Eq> cmp::Eq for Cell<T> {
2727
fn eq(&self, other: &Cell<T>) -> bool {
28-
unsafe {
29-
let frozen_self: &Option<T> = transmute(&mut self.value);
30-
let frozen_other: &Option<T> = transmute(&mut other.value);
31-
frozen_self == frozen_other
32-
}
28+
(self.value) == (other.value)
3329
}
3430
fn ne(&self, other: &Cell<T>) -> bool { !self.eq(other) }
3531
}
@@ -46,6 +42,7 @@ pub fn empty_cell<T>() -> Cell<T> {
4642
pub impl<T> Cell<T> {
4743
/// Yields the value, failing if the cell is empty.
4844
fn take(&self) -> T {
45+
let mut self = unsafe { transmute_mut(self) };
4946
if self.is_empty() {
5047
fail!(~"attempt to take an empty cell");
5148
}
@@ -57,6 +54,7 @@ pub impl<T> Cell<T> {
5754
5855
/// Returns the value, failing if the cell is full.
5956
fn put_back(&self, value: T) {
57+
let mut self = unsafe { transmute_mut(self) };
6058
if !self.is_empty() {
6159
fail!(~"attempt to put a value back into a full cell");
6260
}

trunk/src/libcore/gc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use io;
4343
use libc::{size_t, uintptr_t};
4444
use option::{None, Option, Some};
4545
use ptr;
46-
use hashmap::linear::LinearSet;
46+
use hashmap::HashSet;
4747
use stackwalk;
4848
use sys;
4949

@@ -344,7 +344,7 @@ pub fn cleanup_stack_for_failure() {
344344
ptr::null()
345345
};
346346

347-
let mut roots = LinearSet::new();
347+
let mut roots = HashSet::new();
348348
for walk_gc_roots(need_cleanup, sentinel) |root, tydesc| {
349349
// Track roots to avoid double frees.
350350
if roots.contains(&*root) {

0 commit comments

Comments
 (0)