Skip to content

Commit edd6af3

Browse files
committed
---
yaml --- r: 58709 b: refs/heads/try c: 87c46b5 h: refs/heads/master i: 58707: cf9eb2d v: v3
1 parent 6861e70 commit edd6af3

Some content is hidden

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

66 files changed

+5820
-2066
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 213f7b24ccd9a6833af7e1a329c5e7ffc8f9e3d2
5-
refs/heads/try: 6c478c7de889ec4943b9dcdcbfbb8a8244f479cc
5+
refs/heads/try: 87c46b548a5c9d3183a7d76db8c2e0660f917130
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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/try/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/try/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/try/src/libcore/core.rc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ pub mod linkhack {
124124
}
125125
}
126126

127-
// Internal macros
128-
mod macros;
129-
130127
/* The Prelude. */
131128

132129
pub mod prelude;

branches/try/src/libcore/macros.rs

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

branches/try/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
}

branches/try/src/libcore/rt/io/mem.rs

Lines changed: 7 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
use prelude::*;
1919
use super::*;
20-
use cmp::min;
20+
2121

2222
/// Writes to an owned, growable byte vector
2323
pub struct MemWriter {
@@ -29,15 +29,13 @@ impl MemWriter {
2929
}
3030

3131
impl Writer for MemWriter {
32-
fn write(&mut self, buf: &[u8]) {
33-
self.buf.push_all(buf)
34-
}
32+
fn write(&mut self, _buf: &[u8]) { fail!() }
3533

3634
fn flush(&mut self) { /* no-op */ }
3735
}
3836

3937
impl Seek for MemWriter {
40-
fn tell(&self) -> u64 { self.buf.len() as u64 }
38+
fn tell(&self) -> u64 { fail!() }
4139

4240
fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
4341
}
@@ -79,27 +77,13 @@ impl MemReader {
7977
}
8078

8179
impl Reader for MemReader {
82-
fn read(&mut self, buf: &mut [u8]) -> Option<uint> {
83-
{ if self.eof() { return None; } }
84-
85-
let write_len = min(buf.len(), self.buf.len() - self.pos);
86-
{
87-
let input = self.buf.slice(self.pos, self.pos + write_len);
88-
let output = vec::mut_slice(buf, 0, write_len);
89-
assert!(input.len() == output.len());
90-
vec::bytes::copy_memory(output, input, write_len);
91-
}
92-
self.pos += write_len;
93-
assert!(self.pos <= self.buf.len());
94-
95-
return Some(write_len);
96-
}
80+
fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
9781

98-
fn eof(&mut self) -> bool { self.pos == self.buf.len() }
82+
fn eof(&mut self) -> bool { fail!() }
9983
}
10084

10185
impl Seek for MemReader {
102-
fn tell(&self) -> u64 { self.pos as u64 }
86+
fn tell(&self) -> u64 { fail!() }
10387

10488
fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
10589
}
@@ -179,43 +163,4 @@ impl<'self> Seek for BufReader<'self> {
179163
fn tell(&self) -> u64 { fail!() }
180164

181165
fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
182-
}
183-
184-
#[cfg(test)]
185-
mod test {
186-
use prelude::*;
187-
use super::*;
188-
189-
#[test]
190-
fn test_mem_writer() {
191-
let mut writer = MemWriter::new();
192-
assert!(writer.tell() == 0);
193-
writer.write([0]);
194-
assert!(writer.tell() == 1);
195-
writer.write([1, 2, 3]);
196-
writer.write([4, 5, 6, 7]);
197-
assert!(writer.tell() == 8);
198-
assert!(writer.inner() == ~[0, 1, 2, 3, 4, 5 , 6, 7]);
199-
}
200-
201-
#[test]
202-
fn test_mem_reader() {
203-
let mut reader = MemReader::new(~[0, 1, 2, 3, 4, 5, 6, 7]);
204-
let mut buf = [];
205-
assert!(reader.read(buf) == Some(0));
206-
assert!(reader.tell() == 0);
207-
let mut buf = [0];
208-
assert!(reader.read(buf) == Some(1));
209-
assert!(reader.tell() == 1);
210-
assert!(buf == [0]);
211-
let mut buf = [0, ..4];
212-
assert!(reader.read(buf) == Some(4));
213-
assert!(reader.tell() == 5);
214-
assert!(buf == [1, 2, 3, 4]);
215-
assert!(reader.read(buf) == Some(3));
216-
assert!(buf.slice(0, 3) == [5, 6, 7]);
217-
assert!(reader.eof());
218-
assert!(reader.read(buf) == None);
219-
assert!(reader.eof());
220-
}
221-
}
166+
}

0 commit comments

Comments
 (0)