Skip to content

Commit 637629f

Browse files
committed
---
yaml --- r: 140443 b: refs/heads/try2 c: 2e3e0c0 h: refs/heads/master i: 140441: 23077a9 140439: 4338fbe v: v3
1 parent e57ff6a commit 637629f

Some content is hidden

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

76 files changed

+626
-1963
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5bf7e8bb50a948bdcef3575930928a9a37fbccc2
8+
refs/heads/try2: 2e3e0c0892d6fc9d20374d31db994eee4d083366
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ $(foreach target,$(CFG_TARGET_TRIPLES),\
238238

239239
CORELIB_CRATE := $(S)src/libcore/core.rc
240240
CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \
241-
core.rc *.rs */*.rs */*/*rs */*/*/*rs))
241+
core.rc *.rs */*.rs */*/*rs))
242242

243243
######################################################################
244244
# Standard library variables

branches/try2/mk/docs.mk

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ DOCS :=
1616

1717

1818
######################################################################
19-
# Docs, from pandoc, rustdoc (which runs pandoc), and node
19+
# Pandoc (reference-manual related)
2020
######################################################################
21+
ifeq ($(CFG_PANDOC),)
22+
$(info cfg: no pandoc found, omitting doc/rust.pdf)
23+
else
24+
25+
ifeq ($(CFG_NODE),)
26+
$(info cfg: no node found, omitting doc/tutorial.html)
27+
else
2128

2229
doc/rust.css: rust.css
2330
@$(call E, cp: $@)
@@ -27,18 +34,6 @@ doc/manual.css: manual.css
2734
@$(call E, cp: $@)
2835
$(Q)cp -a $< $@ 2> /dev/null
2936

30-
ifeq ($(CFG_PANDOC),)
31-
$(info cfg: no pandoc found, omitting docs)
32-
NO_DOCS = 1
33-
endif
34-
35-
ifeq ($(CFG_NODE),)
36-
$(info cfg: no node found, omitting docs)
37-
NO_DOCS = 1
38-
endif
39-
40-
ifneq ($(NO_DOCS),1)
41-
4237
DOCS += doc/rust.html
4338
doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4439
@$(call E, pandoc: $@)
@@ -52,8 +47,19 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
5247
--css=manual.css \
5348
--include-before-body=doc/version_info.html \
5449
--output=$@
50+
endif
5551

56-
DOCS += doc/rust.tex
52+
ifeq ($(CFG_PDFLATEX),)
53+
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
54+
else
55+
ifeq ($(CFG_XETEX),)
56+
$(info cfg: no xetex found, disabling doc/rust.pdf)
57+
else
58+
ifeq ($(CFG_LUATEX),)
59+
$(info cfg: lacking luatex, disabling pdflatex)
60+
else
61+
62+
DOCS += doc/rust.pdf
5763
doc/rust.tex: rust.md doc/version.md
5864
@$(call E, pandoc: $@)
5965
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
@@ -64,6 +70,17 @@ doc/rust.tex: rust.md doc/version.md
6470
--from=markdown --to=latex \
6571
--output=$@
6672

73+
doc/rust.pdf: doc/rust.tex
74+
@$(call E, pdflatex: $@)
75+
$(Q)$(CFG_PDFLATEX) \
76+
-interaction=batchmode \
77+
-output-directory=doc \
78+
$<
79+
80+
endif
81+
endif
82+
endif
83+
6784
DOCS += doc/rustpkg.html
6885
doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
6986
@$(call E, pandoc: $@)
@@ -78,6 +95,13 @@ doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
7895
--include-before-body=doc/version_info.html \
7996
--output=$@
8097

98+
######################################################################
99+
# Node (tutorial related)
100+
######################################################################
101+
ifeq ($(CFG_NODE),)
102+
$(info cfg: no node found, omitting doc/tutorial.html)
103+
else
104+
81105
DOCS += doc/tutorial.html
82106
doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css
83107
@$(call E, pandoc: $@)
@@ -129,29 +153,9 @@ doc/tutorial-tasks.html: tutorial-tasks.md doc/version_info.html doc/rust.css
129153
--include-before-body=doc/version_info.html \
130154
--output=$@
131155

132-
ifeq ($(CFG_PDFLATEX),)
133-
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
134-
else
135-
ifeq ($(CFG_XETEX),)
136-
$(info cfg: no xetex found, disabling doc/rust.pdf)
137-
else
138-
ifeq ($(CFG_LUATEX),)
139-
$(info cfg: lacking luatex, disabling pdflatex)
140-
else
141-
142-
DOCS += doc/rust.pdf
143-
doc/rust.pdf: doc/rust.tex
144-
@$(call E, pdflatex: $@)
145-
$(Q)$(CFG_PDFLATEX) \
146-
-interaction=batchmode \
147-
-output-directory=doc \
148-
$<
149-
150-
endif
151-
endif
152156
endif
157+
endif
153158

154-
endif # No pandoc / node
155159

156160
######################################################################
157161
# LLnextgen (grammar analysis from refman)

branches/try2/src/libcore/bool.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ mod tests {
108108

109109
#[test]
110110
fn test_bool_from_str() {
111+
use from_str::FromStr;
112+
111113
do all_values |v| {
112114
assert!(Some(v) == FromStr::from_str(to_str(v)))
113115
}

branches/try2/src/libcore/cast.rs

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

1111
//! Unsafe casting functions
1212
13-
#[cfg(not(stage0))]
1413
use sys;
15-
#[cfg(not(stage0))]
1614
use unstable;
1715

1816
pub mod rusti {

branches/try2/src/libcore/condition.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -192,27 +192,4 @@ mod test {
192192

193193
assert!(trapped);
194194
}
195-
196-
// Issue #6009
197-
mod m {
198-
condition! {
199-
sadness: int -> int;
200-
}
201-
202-
mod n {
203-
use super::sadness;
204-
205-
#[test]
206-
fn test_conditions_are_public() {
207-
let mut trapped = false;
208-
do sadness::cond.trap(|_| {
209-
trapped = true;
210-
0
211-
}).in {
212-
sadness::cond.raise(0);
213-
}
214-
assert!(trapped);
215-
}
216-
}
217-
}
218195
}

branches/try2/src/libcore/core.rc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ pub use num::{Bitwise, BitCount, Bounded};
111111
pub use num::{Primitive, Int, Float};
112112

113113
pub use ptr::Ptr;
114-
pub use from_str::FromStr;
115114
pub use to_str::ToStr;
116115
pub use clone::Clone;
117116

@@ -125,9 +124,6 @@ pub mod linkhack {
125124
}
126125
}
127126

128-
// Internal macros
129-
mod macros;
130-
131127
/* The Prelude. */
132128

133129
pub mod prelude;

branches/try2/src/libcore/flate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Simple compression
1616

1717
use libc;
1818
use libc::{c_void, size_t, c_int};
19+
use ptr;
1920
use vec;
2021

2122
#[cfg(test)] use rand;

branches/try2/src/libcore/macros.rs

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

branches/try2/src/libcore/num/f32.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
//! Operations and constants for `f32`
1212
13+
use from_str;
1314
use num::{Zero, One, strconv};
1415
use prelude::*;
1516

@@ -797,7 +798,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
797798
strconv::ExpNone, false, false)
798799
}
799800
800-
impl FromStr for f32 {
801+
impl from_str::FromStr for f32 {
801802
#[inline(always)]
802803
fn from_str(val: &str) -> Option<f32> { from_str(val) }
803804
}

branches/try2/src/libcore/num/f64.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
//! Operations and constants for `f64`
1212
13+
use from_str;
1314
use libc::c_int;
1415
use num::{Zero, One, strconv};
1516
use prelude::*;
@@ -839,7 +840,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f64> {
839840
strconv::ExpNone, false, false)
840841
}
841842
842-
impl FromStr for f64 {
843+
impl from_str::FromStr for f64 {
843844
#[inline(always)]
844845
fn from_str(val: &str) -> Option<f64> { from_str(val) }
845846
}

branches/try2/src/libcore/num/float.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// PORT this must match in width according to architecture
2222

23+
use from_str;
2324
use libc::c_int;
2425
use num::{Zero, One, strconv};
2526
use prelude::*;
@@ -288,7 +289,7 @@ pub fn from_str_radix(num: &str, radix: uint) -> Option<float> {
288289
strconv::ExpNone, false, false)
289290
}
290291
291-
impl FromStr for float {
292+
impl from_str::FromStr for float {
292293
#[inline(always)]
293294
fn from_str(val: &str) -> Option<float> { from_str(val) }
294295
}

branches/try2/src/libcore/num/int-template.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use T = self::inst::T;
1212

13+
use from_str::FromStr;
1314
use num::{ToStrRadix, FromStrRadix};
1415
use num::{Zero, One, strconv};
1516
use prelude::*;

branches/try2/src/libcore/num/uint-template.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use T = self::inst::T;
1212
use T_SIGNED = self::inst::T_SIGNED;
1313

14+
use from_str::FromStr;
1415
use num::{ToStrRadix, FromStrRadix};
1516
use num::{Zero, One, strconv};
1617
use prelude::*;

branches/try2/src/libcore/os.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -772,28 +772,6 @@ pub fn list_dir_path(p: &Path) -> ~[~Path] {
772772
list_dir(p).map(|f| ~p.push(*f))
773773
}
774774
775-
/// Removes a directory at the specified path, after removing
776-
/// all its contents. Use carefully!
777-
pub fn remove_dir_recursive(p: &Path) -> bool {
778-
let mut error_happened = false;
779-
for walk_dir(p) |inner| {
780-
if !error_happened {
781-
if path_is_dir(inner) {
782-
if !remove_dir_recursive(inner) {
783-
error_happened = true;
784-
}
785-
}
786-
else {
787-
if !remove_file(inner) {
788-
error_happened = true;
789-
}
790-
}
791-
}
792-
};
793-
// Directory should now be empty
794-
!error_happened && remove_dir(p)
795-
}
796-
797775
/// Removes a directory at the specified path
798776
pub fn remove_dir(p: &Path) -> bool {
799777
return rmdir(p);
@@ -899,10 +877,6 @@ pub fn copy_file(from: &Path, to: &Path) -> bool {
899877
if istream as uint == 0u {
900878
return false;
901879
}
902-
// Preserve permissions
903-
let from_mode = from.get_mode().expect("copy_file: couldn't get permissions \
904-
for source file");
905-
906880
let ostream = do as_c_charp(to.to_str()) |top| {
907881
do as_c_charp("w+b") |modebuf| {
908882
libc::fopen(top, modebuf)
@@ -934,15 +908,6 @@ pub fn copy_file(from: &Path, to: &Path) -> bool {
934908
}
935909
fclose(istream);
936910
fclose(ostream);
937-
938-
// Give the new file the old file's permissions
939-
unsafe {
940-
if do str::as_c_str(to.to_str()) |to_buf| {
941-
libc::chmod(to_buf, from_mode as mode_t)
942-
} != 0 {
943-
return false; // should be a condition...
944-
}
945-
}
946911
return ok;
947912
}
948913
}
@@ -1629,15 +1594,13 @@ mod tests {
16291594
== buf.len() as size_t))
16301595
}
16311596
assert!((libc::fclose(ostream) == (0u as c_int)));
1632-
let in_mode = in.get_mode();
16331597
let rs = os::copy_file(&in, &out);
16341598
if (!os::path_exists(&in)) {
16351599
fail!(fmt!("%s doesn't exist", in.to_str()));
16361600
}
16371601
assert!((rs));
16381602
let rslt = run::run_program(~"diff", ~[in.to_str(), out.to_str()]);
16391603
assert!((rslt == 0));
1640-
assert!(out.get_mode() == in_mode);
16411604
assert!((remove_file(&in)));
16421605
assert!((remove_file(&out)));
16431606
}

0 commit comments

Comments
 (0)