Skip to content

Commit 41aac59

Browse files
committed
---
yaml --- r: 55678 b: refs/heads/master c: 69eb218 h: refs/heads/master v: v3
1 parent 2f545db commit 41aac59

File tree

27 files changed

+219
-1905
lines changed

27 files changed

+219
-1905
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e782e1f37183b7ad7731cf0fbb474b55d199a9d5
2+
refs/heads/master: 69eb218ffccfba72258b091bb18f4cadf83343b9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/src/etc/x86.supp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@
583583
{
584584
llvm-optimization-reads-uninitialized-memory-3
585585
Memcheck:Cond
586-
fun:_ZN4test9run_tests4anon13expr_fn_*
586+
fun:_ZN4test9run_tests*
587587
...
588588
}
589589

trunk/src/libcore/rt/io/blocking/file.rs

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

trunk/src/libcore/rt/io/comm_adapters.rs

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

trunk/src/libcore/rt/io/file.rs

Lines changed: 10 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,79 +9,35 @@
99
// except according to those terms.
1010

1111
use prelude::*;
12-
use super::misc::PathLike;
13-
use super::{Reader, Writer, Seekable, Closeable};
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!() }
19-
20-
/// # XXX
21-
/// * Ugh, this is ridiculous. What is the best way to represent these options?
22-
enum FileMode {
23-
/// Opens an existing file. IoError if file does not exist.
24-
Open,
25-
/// Creates a file. IoError if file exists.
26-
Create,
27-
/// Opens an existing file or creates a new one.
28-
OpenOrCreate,
29-
/// Opens an existing file or creates a new one, positioned at EOF.
30-
Append,
31-
/// Opens an existing file, truncating it to 0 bytes.
32-
Truncate,
33-
/// Opens an existing file or creates a new one, truncating it to 0 bytes.
34-
CreateOrTruncate,
35-
}
36-
37-
enum FileAccess {
38-
Read,
39-
Write,
40-
ReadWrite
41-
}
12+
use super::Stream;
4213

4314
pub struct FileStream;
4415

45-
impl FileStream {
46-
pub fn open<P: PathLike>(_path: &P,
47-
_mode: FileMode,
48-
_access: FileAccess
49-
) -> Result<FileStream, IoError> {
16+
pub impl FileStream {
17+
fn new(_path: Path) -> FileStream {
5018
fail!()
5119
}
5220
}
5321

54-
impl Reader for FileStream {
55-
fn read(&mut self, _buf: &mut [u8]) -> Option<uint> {
22+
impl Stream for FileStream {
23+
fn read(&mut self, _buf: &mut [u8]) -> uint {
5624
fail!()
5725
}
5826

5927
fn eof(&mut self) -> bool {
6028
fail!()
6129
}
62-
}
63-
64-
impl Writer for FileStream {
65-
fn write(&mut self, _v: &[u8]) { fail!() }
6630

67-
fn flush(&mut self) { fail!() }
68-
}
69-
70-
impl Seekable for FileStream {
71-
fn tell(&self) -> u64 { fail!() }
72-
73-
fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
74-
}
75-
76-
impl Closeable for FileStream {
77-
fn close(&mut self) { fail!() }
31+
fn write(&mut self, _v: &const [u8]) {
32+
fail!()
33+
}
7834
}
7935

8036
#[test]
8137
#[ignore]
8238
fn super_simple_smoke_test_lets_go_read_some_files_and_have_a_good_time() {
8339
let message = "it's alright. have a good time";
84-
let filename = &Path("test.txt");
85-
let mut outstream = FileStream::open(filename, Create, Read).unwrap();
40+
let filename = Path("test.txt");
41+
let mut outstream = FileStream::new(filename);
8642
outstream.write(message.to_bytes());
8743
}

trunk/src/libcore/rt/io/flate.rs

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

0 commit comments

Comments
 (0)