Skip to content

Commit 8f2e2e7

Browse files
committed
---
yaml --- r: 140430 b: refs/heads/try2 c: 4332f81 h: refs/heads/master v: v3
1 parent 5030979 commit 8f2e2e7

Some content is hidden

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

58 files changed

+1432
-455
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: 02889f75072cd3eb75afc4000d15b8174eda6155
8+
refs/heads/try2: 4332f8188b5dca743dfe2913b3f50a7a693ee3ef
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))
241+
core.rc *.rs */*.rs */*/*rs */*/*/*rs))
242242

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

branches/try2/mk/docs.mk

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

1717

1818
######################################################################
19-
# Pandoc (reference-manual related)
19+
# Docs, from pandoc, rustdoc (which runs pandoc), and node
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
2821

2922
doc/rust.css: rust.css
3023
@$(call E, cp: $@)
@@ -34,6 +27,18 @@ doc/manual.css: manual.css
3427
@$(call E, cp: $@)
3528
$(Q)cp -a $< $@ 2> /dev/null
3629

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+
3742
DOCS += doc/rust.html
3843
doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
3944
@$(call E, pandoc: $@)
@@ -47,19 +52,8 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4752
--css=manual.css \
4853
--include-before-body=doc/version_info.html \
4954
--output=$@
50-
endif
5155

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
56+
DOCS += doc/rust.tex
6357
doc/rust.tex: rust.md doc/version.md
6458
@$(call E, pandoc: $@)
6559
$(Q)$(CFG_NODE) $(S)doc/prep.js $< | \
@@ -70,17 +64,6 @@ doc/rust.tex: rust.md doc/version.md
7064
--from=markdown --to=latex \
7165
--output=$@
7266

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-
8467
DOCS += doc/rustpkg.html
8568
doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
8669
@$(call E, pandoc: $@)
@@ -95,13 +78,6 @@ doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
9578
--include-before-body=doc/version_info.html \
9679
--output=$@
9780

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

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
156152
endif
157-
endif
158153

154+
endif # No pandoc / node
159155

160156
######################################################################
161157
# LLnextgen (grammar analysis from refman)

branches/try2/src/libcore/bool.rs

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

109109
#[test]
110110
fn test_bool_from_str() {
111-
use from_str::FromStr;
112-
113111
do all_values |v| {
114112
assert!(Some(v) == FromStr::from_str(to_str(v)))
115113
}

branches/try2/src/libcore/cast.rs

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

1111
//! Unsafe casting functions
1212
13+
#[cfg(not(stage0))]
1314
use sys;
15+
#[cfg(not(stage0))]
1416
use unstable;
1517

1618
pub mod rusti {

branches/try2/src/libcore/condition.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,27 @@ 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+
}
195218
}

branches/try2/src/libcore/core.rc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ 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;
114115
pub use to_str::ToStr;
115116
pub use clone::Clone;
116117

@@ -124,6 +125,9 @@ pub mod linkhack {
124125
}
125126
}
126127

128+
// Internal macros
129+
mod macros;
130+
127131
/* The Prelude. */
128132

129133
pub mod prelude;

branches/try2/src/libcore/flate.rs

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

1717
use libc;
1818
use libc::{c_void, size_t, c_int};
19-
use ptr;
2019
use vec;
2120

2221
#[cfg(test)] use rand;

branches/try2/src/libcore/macros.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#[macro_escape];
12+
13+
// Some basic logging
14+
macro_rules! rtdebug_ (
15+
($( $arg:expr),+) => ( {
16+
dumb_println(fmt!( $($arg),+ ));
17+
18+
fn dumb_println(s: &str) {
19+
use io::WriterUtil;
20+
let dbg = ::libc::STDERR_FILENO as ::io::fd_t;
21+
dbg.write_str(s);
22+
dbg.write_str("\n");
23+
}
24+
25+
} )
26+
)
27+
28+
// An alternate version with no output, for turning off logging
29+
macro_rules! rtdebug (
30+
($( $arg:expr),+) => ( $(let _ = $arg)*; )
31+
)
32+
33+
macro_rules! abort(
34+
($( $msg:expr),+) => ( {
35+
rtdebug!($($msg),+);
36+
37+
unsafe { ::libc::abort(); }
38+
} )
39+
)

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

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

1111
//! Operations and constants for `f32`
1212
13-
use from_str;
1413
use num::{Zero, One, strconv};
1514
use prelude::*;
1615

@@ -798,7 +797,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
798797
strconv::ExpNone, false, false)
799798
}
800799
801-
impl from_str::FromStr for f32 {
800+
impl FromStr for f32 {
802801
#[inline(always)]
803802
fn from_str(val: &str) -> Option<f32> { from_str(val) }
804803
}

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

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

1111
//! Operations and constants for `f64`
1212
13-
use from_str;
1413
use libc::c_int;
1514
use num::{Zero, One, strconv};
1615
use prelude::*;
@@ -840,7 +839,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f64> {
840839
strconv::ExpNone, false, false)
841840
}
842841
843-
impl from_str::FromStr for f64 {
842+
impl FromStr for f64 {
844843
#[inline(always)]
845844
fn from_str(val: &str) -> Option<f64> { from_str(val) }
846845
}

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

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

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

23-
use from_str;
2423
use libc::c_int;
2524
use num::{Zero, One, strconv};
2625
use prelude::*;
@@ -289,7 +288,7 @@ pub fn from_str_radix(num: &str, radix: uint) -> Option<float> {
289288
strconv::ExpNone, false, false)
290289
}
291290
292-
impl from_str::FromStr for float {
291+
impl FromStr for float {
293292
#[inline(always)]
294293
fn from_str(val: &str) -> Option<float> { from_str(val) }
295294
}

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

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

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

13-
use from_str::FromStr;
1413
use num::{ToStrRadix, FromStrRadix};
1514
use num::{Zero, One, strconv};
1615
use prelude::*;

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

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

14-
use from_str::FromStr;
1514
use num::{ToStrRadix, FromStrRadix};
1615
use num::{Zero, One, strconv};
1716
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> ::ops::Drop for BufferResource<T> {
306+
impl<T> 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> ::ops::Drop for SendPacketBuffered<T,Tbuffer> {
642+
impl<T:Owned,Tbuffer:Owned> 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> ::ops::Drop for RecvPacketBuffered<T,Tbuffer> {
711+
impl<T:Owned,Tbuffer:Owned> 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ 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};
5455
pub use to_bytes::IterBytes;
5556
pub use to_str::{ToStr, ToStrConsume};
5657
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};

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

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

1111
use prelude::*;
12-
use super::misc::PathLike;
12+
use super::support::PathLike;
1313
use super::{Reader, Writer, Seek, Close};
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!() }
14+
use super::SeekStyle;
1915

2016
/// # XXX
2117
/// * Ugh, this is ridiculous. What is the best way to represent these options?
@@ -46,7 +42,7 @@ impl FileStream {
4642
pub fn open<P: PathLike>(_path: &P,
4743
_mode: FileMode,
4844
_access: FileAccess
49-
) -> Result<FileStream, IoError> {
45+
) -> Option<FileStream> {
5046
fail!()
5147
}
5248
}

0 commit comments

Comments
 (0)