Skip to content

Commit 46df798

Browse files
committed
Merge branch 'master' of https://github.com/mozilla/rust
2 parents 64fedfb + 3764cfb commit 46df798

File tree

234 files changed

+2999
-4148
lines changed

Some content is hidden

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

234 files changed

+2999
-4148
lines changed

RELEASES.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 0.6 (?)
2+
---------------------------
3+
4+
* Libraries
5+
* `core::send_map` renamed to `core::hashmap`
6+
17
Version 0.5 (December 2012)
28
---------------------------
39

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ then
515515
| cut -d ' ' -f 2)
516516

517517
case $CFG_CLANG_VERSION in
518-
(3.0svn | 3.0 | 3.1* | 3.2* | 4.0* | 4.1*)
518+
(3.0svn | 3.0 | 3.1* | 3.2* | 4.0* | 4.1* | 4.2*)
519519
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
520520
CFG_C_COMPILER="clang"
521521
;;

mk/docs.mk

+6-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4545
--from=markdown --to=html \
4646
--css=rust.css \
4747
--css=manual.css \
48-
--include-before-body=doc/version_info.html \
48+
--include-before-body=doc/version_info.html \
4949
--output=$@
5050
endif
5151

@@ -66,6 +66,7 @@ doc/rust.tex: rust.md doc/version.md
6666
"$(CFG_PANDOC)" \
6767
--standalone --toc \
6868
--number-sections \
69+
--include-before-body=doc/version.md \
6970
--from=markdown --to=latex \
7071
--output=$@
7172

@@ -199,16 +200,17 @@ ifdef CFG_DISABLE_DOCS
199200
endif
200201

201202

202-
doc/version.md: $(MKFILE_DEPS) rust.md
203+
doc/version.md: $(MKFILE_DEPS) $(wildcard $(S)doc/*.*)
203204
@$(call E, version-stamp: $@)
204205
$(Q)echo "$(CFG_VERSION)" >$@
205206

206-
doc/version_info.html: version_info.html.template
207+
doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \
208+
$(wildcard $(S)doc/*.*)
207209
@$(call E, version-info: $@)
208210
sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
209211
$(CFG_VER_HASH) | head -c 8)/;\
210212
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
211213

212-
GENERATED += doc/version.md
214+
GENERATED += doc/version.md doc/version_info.html
213215

214216
docs: $(DOCS)

src/compiletest/compiletest.rc

+8-7
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn test_opts(config: config) -> test::TestOpts {
159159
}
160160
}
161161

162-
pub fn make_tests(config: config) -> ~[test::TestDesc] {
162+
pub fn make_tests(config: config) -> ~[test::TestDescAndFn] {
163163
debug!("making tests from %s",
164164
config.src_base.to_str());
165165
let mut tests = ~[];
@@ -196,13 +196,14 @@ pub fn is_test(config: config, testfile: &Path) -> bool {
196196
return valid;
197197
}
198198

199-
pub fn make_test(config: config, testfile: &Path) ->
200-
test::TestDesc {
201-
test::TestDesc {
202-
name: make_test_name(config, testfile),
199+
pub fn make_test(config: config, testfile: &Path) -> test::TestDescAndFn {
200+
test::TestDescAndFn {
201+
desc: test::TestDesc {
202+
name: make_test_name(config, testfile),
203+
ignore: header::is_test_ignored(config, testfile),
204+
should_fail: false
205+
},
203206
testfn: make_test_closure(config, testfile),
204-
ignore: header::is_test_ignored(config, testfile),
205-
should_fail: false
206207
}
207208
}
208209

src/libcargo/cargo.rc

+9-9
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ pub fn configure(opts: Options) -> Cargo {
731731
need_dir(&c.bindir);
732732

733733
for sources.each_key_ref |&k| {
734-
let mut s = sources.get(k);
734+
let mut s = sources.get(&k);
735735
load_source_packages(&c, s);
736736
sources.insert(k, s);
737737
}
@@ -981,7 +981,7 @@ pub fn install_named(c: &mut Cargo, wd: &Path, name: ~str) {
981981

982982
pub fn install_uuid_specific(c: &mut Cargo, wd: &Path, src: ~str,
983983
uuid: ~str) {
984-
match c.sources.find(src) {
984+
match c.sources.find(&src) {
985985
Some(s) => {
986986
for s.packages.each |p| {
987987
if p.uuid == uuid {
@@ -997,7 +997,7 @@ pub fn install_uuid_specific(c: &mut Cargo, wd: &Path, src: ~str,
997997

998998
pub fn install_named_specific(c: &mut Cargo, wd: &Path, src: ~str,
999999
name: ~str) {
1000-
match c.sources.find(src) {
1000+
match c.sources.find(&src) {
10011001
Some(s) => {
10021002
for s.packages.each |p| {
10031003
if p.name == name {
@@ -1064,7 +1064,7 @@ pub fn cmd_uninstall(c: &Cargo) {
10641064
}
10651065

10661066
pub fn install_query(c: &mut Cargo, wd: &Path, target: ~str) {
1067-
match c.dep_cache.find(target) {
1067+
match c.dep_cache.find(&target) {
10681068
Some(inst) => {
10691069
if inst {
10701070
return;
@@ -1156,7 +1156,7 @@ pub fn cmd_install(c: &mut Cargo) {
11561156

11571157
pub fn sync(c: &Cargo) {
11581158
for c.sources.each_key_ref |&k| {
1159-
let mut s = c.sources.get(k);
1159+
let mut s = c.sources.get(&k);
11601160
sync_one(c, s);
11611161
c.sources.insert(k, s);
11621162
}
@@ -1558,7 +1558,7 @@ pub fn cmd_list(c: &Cargo) {
15581558
if !valid_pkg_name(*name) {
15591559
error(fmt!("'%s' is an invalid source name", *name));
15601560
} else {
1561-
match c.sources.find(*name) {
1561+
match c.sources.find(name) {
15621562
Some(source) => {
15631563
print_source(source);
15641564
}
@@ -1754,7 +1754,7 @@ pub fn cmd_sources(c: &Cargo) {
17541754
return;
17551755
}
17561756

1757-
match c.sources.find(name) {
1757+
match c.sources.find(&name) {
17581758
Some(source) => {
17591759
let old = copy source.url;
17601760
let method = assume_source_method(url);
@@ -1785,7 +1785,7 @@ pub fn cmd_sources(c: &Cargo) {
17851785
return;
17861786
}
17871787

1788-
match c.sources.find(name) {
1788+
match c.sources.find(&name) {
17891789
Some(source) => {
17901790
let old = copy source.method;
17911791

@@ -1823,7 +1823,7 @@ pub fn cmd_sources(c: &Cargo) {
18231823
return;
18241824
}
18251825

1826-
match c.sources.find(name) {
1826+
match c.sources.find(&name) {
18271827
Some(source) => {
18281828
c.sources.remove(&name);
18291829
c.sources.insert(newn, source);

src/libcore/at_vec.rs

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
//! Managed vectors
1212
13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use cast::transmute;
1814
use kinds::Copy;
1915
use iter;

src/libcore/bool.rs

-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
// except according to those terms.
1010

1111

12-
// NB: transitionary, de-mode-ing.
13-
#[forbid(deprecated_mode)];
14-
#[forbid(deprecated_pattern)];
15-
1612
//! Boolean logic
1713
1814
use bool;

src/libcore/cast.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Unsafe operations
12-
#[forbid(deprecated_mode)]
13-
1411
#[abi = "rust-intrinsic"]
1512
extern mod rusti {
1613
fn forget<T>(-x: T);

src/libcore/char.rs

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
//! Utilities for manipulating the char type
1212
13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use char;
1814
use cmp::Eq;
1915
use option::{None, Option, Some};

src/libcore/cleanup.rs

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
#[doc(hidden)];
1212

13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use libc::{c_char, c_void, intptr_t, uintptr_t};
1814
use ptr::{mut_null, null, to_unsafe_ptr};
1915
use repr::BoxRepr;

src/libcore/cmp.rs

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ and `Eq` to overload the `==` and `!=` operators.
2020
2121
*/
2222

23-
// NB: transitionary, de-mode-ing.
24-
#[forbid(deprecated_mode)];
25-
#[forbid(deprecated_pattern)];
26-
2723
/**
2824
* Trait for values that can be compared for equality
2925
* and inequality.

src/libcore/container.rs

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
//! Container traits
1212
13-
#[forbid(deprecated_mode)];
14-
#[forbid(deprecated_pattern)];
15-
1613
use option::Option;
1714

1815
pub trait Container {

src/libcore/core.rc

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ Implicitly, all crates behave as if they included the following prologue:
4848
// Don't link to core. We are core.
4949
#[no_core];
5050

51-
#[warn(deprecated_mode)];
52-
#[warn(deprecated_pattern)];
5351
#[warn(vecs_implicitly_copyable)];
5452
#[deny(non_camel_case_types)];
5553
#[allow(deprecated_self)];

src/libcore/dlist.rs

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ Do not use ==, !=, <, etc on doubly-linked lists -- it may not terminate.
1818
1919
*/
2020

21-
// NB: transitionary, de-mode-ing.
22-
#[forbid(deprecated_mode)];
23-
#[forbid(deprecated_pattern)];
24-
2521
use kinds::Copy;
2622
use managed;
2723
use option::{None, Option, Some};

src/libcore/dvec.rs

-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ Note that recursive use is not permitted.
1919
2020
*/
2121

22-
// NB: transitionary, de-mode-ing.
23-
#[forbid(deprecated_mode)];
24-
#[forbid(deprecated_pattern)];
25-
2622
use cast;
2723
use cast::reinterpret_cast;
2824
use prelude::*;

src/libcore/either.rs

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// NB: transitionary, de-mode-ing.
12-
#[forbid(deprecated_mode)];
13-
#[forbid(deprecated_pattern)];
14-
1511
//! A type that represents one of two alternatives
1612
1713
use cmp::Eq;

src/libcore/extfmt.rs

-10
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
//! * s - str (any flavor)
5252
//! * ? - arbitrary type (does not use the to_str trait)
5353
54-
// NB: transitionary, de-mode-ing.
55-
#[forbid(deprecated_mode)];
56-
#[forbid(deprecated_pattern)];
57-
5854
// Transitional
5955
#[allow(structural_records)]; // Macros -- needs a snapshot
6056

@@ -499,12 +495,6 @@ pub mod rt {
499495

500496
pub enum Ty { TyDefault, TyBits, TyHexUpper, TyHexLower, TyOctal, }
501497

502-
#[cfg(stage0)]
503-
pub type Conv = {flags: u32, width: Count, precision: Count, ty: Ty};
504-
505-
#[cfg(stage1)]
506-
#[cfg(stage2)]
507-
#[cfg(stage3)]
508498
pub struct Conv {
509499
flags: u32,
510500
width: Count,

src/libcore/flate.rs

-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ Simple compression
1414
1515
*/
1616

17-
// NB: transitionary, de-mode-ing.
18-
#[forbid(deprecated_mode)];
19-
#[forbid(deprecated_pattern)];
20-
2117
use libc;
2218
use libc::{c_void, size_t, c_int};
2319
use ptr;

src/libcore/from_str.rs

-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
//! The trait for types that can be created from strings
1212
13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use option::Option;
1814

1915
pub trait FromStr {

src/libcore/gc.rs

-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ with destructors.
3535
3636
*/
3737

38-
// NB: transitionary, de-mode-ing.
39-
#[forbid(deprecated_mode)];
40-
#[forbid(deprecated_pattern)];
4138
// Transitional
4239
#[allow(structural_records)];
4340

src/libcore/hash.rs

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// NB: transitionary, de-mode-ing.
12-
#[forbid(deprecated_mode)];
13-
#[forbid(deprecated_pattern)];
14-
1511
/*!
1612
* Implementation of SipHash 2-4
1713
*

src/libcore/hashmap.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
//! Sendable hash maps.
1212
13-
// NB: transitionary, de-mode-ing.
14-
#[forbid(deprecated_mode)];
15-
#[forbid(deprecated_pattern)];
16-
1713
use container::{Container, Mutable, Map, Set};
1814
use cmp::Eq;
1915
use hash::Hash;
@@ -49,9 +45,8 @@ pub mod linear {
4945
buckets: ~[Option<Bucket<K, V>>],
5046
}
5147

52-
// FIXME(#3148) -- we could rewrite FoundEntry
53-
// to have type Option<&Bucket<K, V>> which would be nifty
54-
// However, that won't work until #3148 is fixed
48+
// We could rewrite FoundEntry to have type Option<&Bucket<K, V>>
49+
// which would be nifty
5550
enum SearchResult {
5651
FoundEntry(uint), FoundHole(uint), TableFull
5752
}
@@ -296,8 +291,6 @@ pub mod linear {
296291
FoundEntry(idx) => {
297292
match self.buckets[idx] {
298293
Some(ref bkt) => {
299-
// FIXME(#3148)---should be inferred
300-
let bkt: &self/Bucket<K, V> = bkt;
301294
Some(&bkt.value)
302295
}
303296
None => {

0 commit comments

Comments
 (0)