Skip to content

Commit af2993a

Browse files
---
yaml --- r: 140431 b: refs/heads/try2 c: 47050c4 h: refs/heads/master i: 140429: 5030979 140427: 1ec6f76 140423: f698c67 140415: a96adde v: v3
1 parent 8f2e2e7 commit af2993a

Some content is hidden

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

59 files changed

+457
-1435
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: 4332f8188b5dca743dfe2913b3f50a7a693ee3ef
8+
refs/heads/try2: 47050c499a7cc6823ce8ac94f9766dd7a5e61108
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/pipes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ struct BufferResource<T> {
303303
}
304304
305305
#[unsafe_destructor]
306-
impl<T> Drop for BufferResource<T> {
306+
impl<T> ::ops::Drop for BufferResource<T> {
307307
fn finalize(&self) {
308308
unsafe {
309309
let b = move_it!(self.buffer);
@@ -639,7 +639,7 @@ pub struct SendPacketBuffered<T, Tbuffer> {
639639
}
640640
641641
#[unsafe_destructor]
642-
impl<T:Owned,Tbuffer:Owned> Drop for SendPacketBuffered<T,Tbuffer> {
642+
impl<T:Owned,Tbuffer:Owned> ::ops::Drop for SendPacketBuffered<T,Tbuffer> {
643643
fn finalize(&self) {
644644
//if self.p != none {
645645
// debug!("drop send %?", option::get(self.p));
@@ -708,7 +708,7 @@ pub struct RecvPacketBuffered<T, Tbuffer> {
708708
}
709709
710710
#[unsafe_destructor]
711-
impl<T:Owned,Tbuffer:Owned> Drop for RecvPacketBuffered<T,Tbuffer> {
711+
impl<T:Owned,Tbuffer:Owned> ::ops::Drop for RecvPacketBuffered<T,Tbuffer> {
712712
fn finalize(&self) {
713713
//if self.p != none {
714714
// debug!("drop recv %?", option::get(self.p));

branches/try2/src/libcore/prelude.rs

Lines changed: 1 addition & 2 deletions
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, Equiv};
34+
pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
3535
pub use container::{Container, Mutable, Map, Set};
3636
pub use hash::Hash;
3737
pub use old_iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter};
@@ -51,7 +51,6 @@ pub use path::WindowsPath;
5151
pub use ptr::Ptr;
5252
pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
5353
pub use str::{StrSlice, OwnedStr};
54-
pub use from_str::{FromStr};
5554
pub use to_bytes::IterBytes;
5655
pub use to_str::{ToStr, ToStrConsume};
5756
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};

branches/try2/src/libcore/rt/io/file.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99
// except according to those terms.
1010

1111
use prelude::*;
12-
use super::support::PathLike;
12+
use super::misc::PathLike;
1313
use super::{Reader, Writer, Seek, Close};
14-
use super::SeekStyle;
14+
use super::{IoError, SeekStyle};
15+
16+
/// Open a file with the default FileMode and FileAccess
17+
/// # XXX are there sane defaults here?
18+
pub fn open_file<P: PathLike>(_path: &P) -> FileStream { fail!() }
1519

1620
/// # XXX
1721
/// * Ugh, this is ridiculous. What is the best way to represent these options?
@@ -42,7 +46,7 @@ impl FileStream {
4246
pub fn open<P: PathLike>(_path: &P,
4347
_mode: FileMode,
4448
_access: FileAccess
45-
) -> Option<FileStream> {
49+
) -> Result<FileStream, IoError> {
4650
fail!()
4751
}
4852
}

0 commit comments

Comments
 (0)